Skip to content

Commit 5bf3849

Browse files
committed
consolidate setup info
1 parent 0977a10 commit 5bf3849

File tree

6 files changed

+71
-97
lines changed

6 files changed

+71
-97
lines changed

fern/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,8 @@ redirects:
461461
destination: /learn/ask-fern/features/citations
462462
- source: /learn/ask-fern/custom-prompting
463463
destination: /learn/ask-fern/configuration/custom-prompts
464+
- source: /learn/ask-fern/configuration/locations-and-datasources
465+
destination: /learn/ask-fern/configuration/setup
464466

465467
# General Ask Fern patterns
466468
- 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: 5 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,26 @@
11
---
2-
title: Locations and Datasources
2+
title: Setup
33
subtitle: Configure where Ask Fern is available and what content it can access.
44
---
55

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.
6+
## Basic setup
77

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

1210
```yaml docs.yml
1311
ai-search:
1412
location:
1513
- docs
1614
- slack
17-
- discord
1815
```
1916
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
45-
```
46-
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>
17+
## Configuration
5618
57-
## Preview Environments
19+
<Markdown src="/snippets/ask-fern-config.mdx" />
5820
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.
6021
61-
<Note>
62-
Preview environments don't interfere with your production Ask Fern deployment.
63-
</Note>
6422
65-
## Best Practices
6623
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>
7124
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>
7525
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>
7926
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>

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 configure Ask Fern via the [Fern Dashboard](https://dashboard.buildwithfern.com/) or directly in your [`docs.yml` file](/learn/docs/configuration/what-is-docs-yml#ai-search-configuration).
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: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -619,32 +619,11 @@ analytics:
619619
Your PostHog project API key. Defaults to the api-host of "https://us.i.posthog.com".
620620
</ParamField>
621621

622-
## AI search configuration
622+
## Ask Fern configuration
623623

624-
Configure [Ask Fern](/learn/ask-fern/getting-started/what-is-ask-fern), Fern's AI-powered search feature, to control where it appears and what content it can access.
624+
Specify [Ask Fern](/learn/ask-fern/getting-started/what-is-ask-fern) to control where it appears and what content it can access.
625625

626-
```yaml docs.yml
627-
ai-search:
628-
location:
629-
- docs
630-
- slack
631-
- discord
632-
datasources:
633-
- url: https://example.com/additional-docs
634-
title: Additional Documentation
635-
```
636-
637-
<ParamField path="ai-search.location" type="list of strings" required={false} toc={true}>
638-
Specifies where Ask Fern will be available. Options: `docs`, `slack`, `discord`.
639-
</ParamField>
640-
641-
<ParamField path="ai-search.datasources" type="list of objects" required={false} toc={true}>
642-
Additional content sources that Ask Fern should index and search. Each datasource requires a `url` and optional `title`.
643-
</ParamField>
644-
645-
<Note>
646-
Ask Fern can also be configured via the [Fern Dashboard](https://dashboard.buildwithfern.com/). Configuration in `docs.yml` provides version control and allows for preview environment testing. Learn more about [locations and datasources configuration](/learn/ask-fern/configuration/locations-and-datasources).
647-
</Note>
626+
<Markdown src="/snippets/ask-fern-config.mdx" />
648627

649628
## Dynamic snippets configuration
650629

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)