Overview

View as Markdown

Ask Fern is Fern’s AI Search feature, powered by Retrieval Augmented Generation (RAG), that indexes your documentation and provides an interface for your end users to ask questions and get answers. It appears as a side panel that works with all Fern Docs layouts, so users can ask questions without leaving the page.

The side panel stays open as users navigate between pages, expands to full screen on mobile, and supports document-specific queries via a dropdown. Responses are filtered by version, product, and role, and Ask Fern can reference your SDK code alongside documentation.

Ask Fern helps you:

  • Reduce support burden – Enable your users to quickly find answers in your documentation without contacting your support team.
  • Accelerate user onboarding – Help users integrate your product faster by surfacing relevant code samples and guides.
  • Identify documentation gaps – Understand where your docs need improvement through user search patterns and feedback.

Get started

Enable Ask Fern in your docs.yml file:

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

Under the hood

1

Content and code indexing

Fern automatically processes your documentation pages and Fern-generated SDK code, breaking them into semantic chunks and converting each chunk into a vector using sentence embedding models. They’re stored in a database that serves as Ask Fern’s search index.

2

Query processing

When users ask questions, Ask Fern vectorizes their query and searches the database to find the most relevant documentation and code chunks. If you have role-based access control configured, Ask Fern filters results based on the user’s permissions.

3

Response generation

Ask Fern uses the retrieved chunks as context to generate accurate answers with citations for the user. If the initial context isn’t sufficient, it performs an additional keyword search.