Overview
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:
Configure where Ask Fern is available.
Analytics, citations, and more.
Add documents and websites.
Under the hood
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.
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.
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.