Skip to content

Commit 795019a

Browse files
docs: add documentation for ai-search locations and datasources configuration
Co-Authored-By: [email protected] <[email protected]>
1 parent adcb871 commit 795019a

File tree

2 files changed

+108
-1
lines changed

2 files changed

+108
-1
lines changed

fern/products/ask-fern/ask-fern.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ navigation:
1111
contents:
1212
- page: Custom prompts
1313
path: ./pages/configuration/custom-prompting.mdx
14+
- page: Locations and datasources
15+
path: ./pages/configuration/locations-and-datasources.mdx
1416
- page: Guidance
1517
path: ./pages/features/guidance.mdx
1618
- page: Documents
@@ -36,4 +38,4 @@ navigation:
3638
- customers
3739
layout:
3840
- page: Overview
39-
path: ./pages/getting-started/api-get-started.mdx
41+
path: ./pages/getting-started/api-get-started.mdx
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
title: Locations and Datasources
3+
subtitle: Configure where Ask Fern is available and what content it can access.
4+
---
5+
6+
<Markdown src="/snippets/pro-plan.mdx" />
7+
8+
Ask Fern can be configured to appear in multiple locations and pull content from various datasources. This allows you to provide AI-powered assistance wherever your users need it and ensure the AI has access to all relevant information.
9+
10+
## Locations
11+
12+
The `location` field in your `ai-search` configuration determines where Ask Fern will be available to your users. You can specify one or more locations:
13+
14+
```yaml docs.yml
15+
ai-search:
16+
location:
17+
- docs
18+
- slack
19+
- discord
20+
```
21+
22+
### Available Locations
23+
24+
<ParamField path="docs" type="string">
25+
Enables Ask Fern on your documentation site. Users will see the AI search interface directly in your docs.
26+
</ParamField>
27+
28+
<ParamField path="slack" type="string">
29+
Enables Ask Fern in Slack. Learn more about the [Slack app integration](/ask-fern/features/slack-app).
30+
</ParamField>
31+
32+
<ParamField path="discord" type="string">
33+
Enables Ask Fern in Discord. This allows your community to get AI-powered answers in your Discord server.
34+
</ParamField>
35+
36+
## Datasources
37+
38+
The `datasources` field allows you to specify additional content sources that Ask Fern should index and search. This is useful when you want to include content from external websites or documentation that isn't part of your main docs.
39+
40+
```yaml docs.yml
41+
ai-search:
42+
datasources:
43+
- url: https://example.com/additional-docs
44+
title: Additional Documentation
45+
- url: https://blog.example.com
46+
title: Company Blog
47+
```
48+
49+
### Website Datasources
50+
51+
<ParamField path="url" type="string" required>
52+
The URL of the website to index. Ask Fern will crawl and index the content from this URL.
53+
</ParamField>
54+
55+
<ParamField path="title" type="string">
56+
An optional display name for this datasource. This helps users understand where the information is coming from when Ask Fern cites content from this source.
57+
</ParamField>
58+
59+
## Complete Example
60+
61+
Here's a complete example showing how to configure both locations and datasources:
62+
63+
```yaml docs.yml
64+
ai-search:
65+
system-prompt: |
66+
You are a helpful AI assistant for our documentation.
67+
Provide clear, accurate answers based on the available documentation.
68+
model: claude-3.7
69+
location:
70+
- docs
71+
- slack
72+
datasources:
73+
- url: https://help.example.com
74+
title: Help Center
75+
- url: https://blog.example.com
76+
title: Engineering Blog
77+
```
78+
79+
## Preview Environments
80+
81+
When using `fern generate --preview`, the `location` configuration determines whether Ask Fern will be enabled in your preview environment. If you specify `location: [docs]`, Ask Fern will be available in your preview deployments, allowing you to test the AI search functionality before publishing to production.
82+
83+
<Note>
84+
Preview environments use separate namespaces to ensure that test data doesn't interfere with your production Ask Fern instance.
85+
</Note>
86+
87+
## Best Practices
88+
89+
<AccordionGroup>
90+
<Accordion title="Start with docs location">
91+
Begin by enabling Ask Fern on your documentation site (`location: [docs]`) to test and refine the experience before expanding to other channels like Slack or Discord.
92+
</Accordion>
93+
94+
<Accordion title="Use descriptive titles for datasources">
95+
Always provide a `title` for your datasources. This helps users understand the source of information when Ask Fern provides citations.
96+
</Accordion>
97+
98+
<Accordion title="Keep datasources relevant">
99+
Only include datasources that contain information relevant to your users' questions. Too many datasources can dilute the quality of search results.
100+
</Accordion>
101+
102+
<Accordion title="Test with previews">
103+
Use preview deployments to test your Ask Fern configuration, including locations and datasources, before deploying to production.
104+
</Accordion>
105+
</AccordionGroup>

0 commit comments

Comments
 (0)