*** title: Overview description: >- Ask Fern is an AI search feature that indexes your documentation and helps users find answers instantly. Reduce support burden and accelerate onboarding. ------------------------------------------------------------------------------ For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see [https://buildwithfern.com/learn/llms.txt](https://buildwithfern.com/learn/llms.txt). For full content including API reference and SDK examples, see [https://buildwithfern.com/learn/llms-full.txt](https://buildwithfern.com/learn/llms-full.txt). 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. Responses include citations that link directly to source pages. ## Get started Open the [Fern Dashboard](https://dashboard.buildwithfern.com/). Navigate to the **Settings** tab and click **Enable** on the Ask AI card. Enabling Ask Fern triggers an automatic reindex of your content. This typically takes a few minutes, though sites with extensive custom components may take longer. Once this process is finished, the Ask Fern side panel will appear on your site. Connect Ask Fern to [Slack](/learn/docs/ai-features/ask-fern/slack-app) or [Discord](/learn/docs/ai-features/ask-fern/discord-bot) so your users can ask questions directly from chat. Finetune Ask Fern's behavior: Add additional documents and websites. Override responses to sensitive queries. ## Features Ask Fern comes with built-in tools to help you understand how users interact with your documentation and ensure answers are accurate and trustworthy. View queries and conversations per day in the [Fern Dashboard](http://dashboard.buildwithfern.com). Drill down into individual conversations and export data to CSV. You can open Ask Fern ([example](https://buildwithfern.com/learn/home?searchType=ai\&query=custom+header)) or the search dialog ([example](https://buildwithfern.com/learn/home?query=custom+header)) directly from a URL using query parameters. This is useful for linking from a help chat widget, support portal, or onboarding flow. | Parameter | Description | | ------------ | ------------------------------------------------------------------------------- | | `query` | The search query or prompt, URL-encoded. | | `searchType` | Optional. Set to `ai` to open the Ask AI panel, or omit to open regular search. | Ask Fern automatically respects the [role-based access control (RBAC) settings configured in your documentation](/learn/docs/authentication/features/rbac). When users query Ask Fern, they only receive answers from documentation they have permission to access based on their assigned roles. This works at all levels, from entire sections down to individual pages and conditional content within pages. ## Under the hood Ask Fern uses Retrieval Augmented Generation (RAG) to answer user questions: 1. **Content and code indexing** — Fern processes your documentation pages and Fern-generated SDK code, breaking them into semantic chunks and converting each into a vector embedding stored in a search index. 2. **Query processing** — When users ask questions, Ask Fern vectorizes the query and retrieves the most relevant chunks. If RBAC is configured, results are filtered by user permissions. 3. **Response generation** — Ask Fern uses the retrieved chunks as context to generate answers with citations. If the initial context isn't sufficient, it performs an additional keyword search. ```mermaid sequenceDiagram autonumber participant U as User participant C as /chat Endpoint participant V as Documentation Database participant A as Ask Fern U->>C: Submit question via Ask Fern searchbox C->>C: Convert query to vector C->>C: Check user roles (if RBAC enabled) C->>V: Search for relevant chunks V->>C: Return matching documents user can access C->>A: Send query + context A->>V: Perform additional keyword search if needed V->>A: Return additional chunks user can access A->>A: Generate response A->>U: Return answer with citations ```