Locations and Datasources

Configure where Ask Fern is available and what content it can access.

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.

Locations

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:

docs.yml
1ai-search:
2 location:
3 - docs
4 - slack
5 - discord

Available Locations

docs
string

Enables Ask Fern on your documentation site. Users will see the AI search interface directly in your docs.

slack
string

Enables Ask Fern in Slack. Learn more about the Slack app integration.

discord
string

Enables Ask Fern in Discord. This allows your community to get AI-powered answers in your Discord server.

Datasources (coming soon)

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.

docs.yml
1ai-search:
2 datasources:
3 - url: https://example.com/additional-docs
4 title: Additional Documentation
5 - url: https://blog.example.com
6 title: Company Blog

Website Datasources

url
stringRequired

The URL of the website to index. Ask Fern will crawl and index the content from this URL.

title
string

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.

Preview Environments

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.

Preview environments don’t interfere with your production Ask Fern deployment.

Best Practices

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.

Always provide a title for your datasources. This helps users understand the source of information when Ask Fern provides citations.

Only include datasources that contain information relevant to your users’ questions. Too many datasources can dilute the quality of search results.

Use preview deployments to test your Ask Fern configuration, including locations and datasources, before deploying to production.