Skip to content

Commit 5fc7a39

Browse files
devin-ai-integration[bot]Ryan-Amirthandevalog
authored
docs: add ai-search configuration documentation (#1304)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Devin Logan <[email protected]>
1 parent 29309bf commit 5fc7a39

File tree

6 files changed

+75
-80
lines changed

6 files changed

+75
-80
lines changed

fern/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ redirects:
466466
destination: /learn/ask-fern/features/citations
467467
- source: /learn/ask-fern/custom-prompting
468468
destination: /learn/ask-fern/configuration/custom-prompts
469+
- source: /learn/ask-fern/configuration/locations-and-datasources
470+
destination: /learn/ask-fern/configuration/setup
469471

470472
# General Ask Fern patterns
471473
- source: /learn/ai-search/getting-started/:slug*

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ navigation:
99
href: https://buildwithfern.com/showcase#ask-fern-customers
1010
- section: Configuration
1111
contents:
12+
- page: Setup
13+
path: ./pages/configuration/locations-and-datasources.mdx
14+
slug: setup
1215
- page: Custom prompts
1316
path: ./pages/configuration/custom-prompting.mdx
14-
- page: Locations and datasources
15-
path: ./pages/configuration/locations-and-datasources.mdx
1617
- page: Guidance
1718
path: ./pages/features/guidance.mdx
1819
- page: Documents
Lines changed: 6 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,20 @@
11
---
2-
title: Locations and datasources
2+
title: Setup
33
subtitle: Configure where Ask Fern is available and what content it can access.
4+
max-toc-depth: 2
45
---
56

6-
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 access to relevant information.
7+
## Basic setup
78

8-
## Locations
9-
10-
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:
9+
Enable Ask Fern by adding the `ai-search` configuration to your `docs.yml` file:
1110

1211
```yaml docs.yml
1312
ai-search:
1413
location:
1514
- docs
1615
- slack
17-
- discord
18-
```
19-
20-
### Available locations
21-
22-
<ParamField path="docs" type="string">
23-
Enables Ask Fern on your documentation site. Users will see the AI search interface directly in your docs.
24-
</ParamField>
25-
26-
<ParamField path="slack" type="string">
27-
Enables Ask Fern in Slack. Learn more about the [Slack app integration](/ask-fern/features/slack-app).
28-
</ParamField>
29-
30-
<ParamField path="discord" type="string">
31-
Enables Ask Fern in Discord. This allows your community to get AI-powered answers in your Discord server.
32-
</ParamField>
33-
34-
## Datasources (coming soon)
35-
36-
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.
37-
38-
```yaml docs.yml
39-
ai-search:
40-
datasources:
41-
- url: https://example.com/additional-docs
42-
title: Additional Documentation
43-
- url: https://blog.example.com
44-
title: Company Blog
4516
```
4617
47-
### Website datasources
48-
49-
<ParamField path="url" type="string" required>
50-
The URL of the website to index. Ask Fern will crawl and index the content from this URL.
51-
</ParamField>
52-
53-
<ParamField path="title" type="string">
54-
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.
55-
</ParamField>
56-
57-
## Preview environments
58-
59-
Setting `location: [docs]` enables Ask Fern on preview deployments generated with `fern generate --docs --preview`, allowing you to test the AI search functionality before publishing to production.
60-
61-
<Note>
62-
Preview environments don't interfere with your production Ask Fern deployment.
63-
</Note>
64-
65-
## Best practices
66-
67-
<AccordionGroup>
68-
<Accordion title="Start with docs location">
69-
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.
70-
</Accordion>
71-
72-
<Accordion title="Use descriptive titles for datasources">
73-
Always provide a `title` for your datasources. This helps users understand the source of information when Ask Fern provides citations.
74-
</Accordion>
75-
76-
<Accordion title="Keep datasources relevant">
77-
Only include datasources that contain information relevant to your users' questions. Too many datasources can dilute the quality of search results.
78-
</Accordion>
18+
## Configuration
7919
80-
<Accordion title="Test with previews">
81-
Use preview deployments to test your Ask Fern configuration, including locations and datasources, before deploying to production.
82-
</Accordion>
83-
</AccordionGroup>
20+
<Markdown src="/snippets/ask-fern-config.mdx" />

fern/products/ask-fern/pages/getting-started/what-is-ask-fern.mdx

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ description: Let your customers find answers in your documentation instantly.
55

66
Ask Fern is Fern's AI Search feature that indexes your documentation and provides an interface for your end users to ask questions and get answers. It appears as a side panel on your documentation site so users can ask questions without leaving the page.
77

8-
You can turn Ask Fern on or off via the [Fern Dashboard](https://dashboard.buildwithfern.com/).
9-
108
<Frame>
119
<video
1210
style={{ aspectRatio: '16 / 9', width: '100%' }}
@@ -24,9 +22,27 @@ Ask Fern helps you:
2422
- **Accelerate user onboarding** – Help users integrate your product faster by surfacing relevant code samples and guides.
2523
- **Identify documentation gaps** – Understand where your docs need improvement through user search patterns and feedback.
2624

27-
## Get started
25+
26+
## Quickstart
27+
28+
Enable Ask Fern in your [`docs.yml` file](/learn/ask-fern/configuration/setup):
29+
30+
```yaml docs.yml
31+
ai-search:
32+
location:
33+
- docs
34+
- slack # or discord
35+
```
2836
2937
<CardGroup cols={2}>
38+
<Card
39+
title="Setup"
40+
icon="regular lightbulb"
41+
href="/learn/ask-fern/configuration/setup"
42+
>
43+
Configure locations and additional data sources.
44+
</Card>
45+
3046
<Card
3147
title="How it works"
3248
icon="regular lightbulb"
@@ -35,6 +51,12 @@ Ask Fern helps you:
3551
Learn about Ask Fern's interface, behavior, and technical architecture.
3652
</Card>
3753
54+
</CardGroup>
55+
56+
## Features
57+
58+
<CardGroup cols={2}>
59+
3860
<Card
3961
title="Custom prompting"
4062
icon="regular book-open"
@@ -43,12 +65,6 @@ Ask Fern helps you:
4365
Write custom prompts to improve accuracy and tailor responses for your users.
4466
</Card>
4567
46-
</CardGroup>
47-
48-
## Features
49-
50-
<CardGroup cols={2}>
51-
5268
<Card
5369
title="Analytics"
5470
icon="regular fa-chart-simple"

fern/products/docs/pages/customization/what-is-docs-yml.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,12 @@ analytics:
744744
Your PostHog project API key. Defaults to the api-host of "https://us.i.posthog.com".
745745
</ParamField>
746746

747+
## Ask Fern configuration
748+
749+
Specify [Ask Fern](/learn/ask-fern/getting-started/what-is-ask-fern) to control where it appears and what content it can access.
750+
751+
<Markdown src="/snippets/ask-fern-config.mdx" />
752+
747753
## Dynamic snippets configuration
748754

749755
By default, SDK snippets are static code examples that are displayed in your API Reference. Alternatively, you can use dynamic SDK snippets that allow users to modify parameters and see code examples update in real time.

fern/snippets/ask-fern-config.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
```yaml docs.yml
2+
ai-search:
3+
location:
4+
- docs
5+
- slack
6+
- discord
7+
datasources:
8+
- url: https://example.com/additional-docs
9+
title: Additional documentation
10+
- url: https://blog.example.com
11+
title: Company blog
12+
```
13+
14+
<ParamField path="ai-search.location" type="list of strings" required={false} toc={true}>
15+
Specifies where Ask Fern will be available. Options:
16+
- `docs` enables Ask Fern on your documentation site
17+
- `slack` enables Ask Fern in Slack
18+
- `discord` enables Ask Fern in Discord
19+
20+
Most users should enable Ask Fern for both `docs` and either `slack` or `discord`.
21+
</ParamField>
22+
23+
<ParamField path="ai-search.datasources" type="list of objects" required={false} toc={true}>
24+
Additional content sources that Ask Fern should index and search.
25+
</ParamField>
26+
27+
<ParamField path="datasources.url" type="string" required={true}>
28+
The URL of the website to index. Ask Fern will crawl and index the content from this URL.
29+
</ParamField>
30+
31+
<ParamField path="datasources.title" type="string">
32+
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.
33+
</ParamField>

0 commit comments

Comments
 (0)