---
title: Ask AI
description: An AI-powered chat assistant that helps users understand your documentation with context-aware responses
type: conceptual
summary: An AI-powered chat assistant with context-aware search, persistent history, and suggested prompts for your documentation.
prerequisites:
  - /docs/env
related:
  - /docs/open-in-chat
  - /docs/llms-txt
  - /docs/configuration
---

# Ask AI



The Ask AI feature provides an intelligent chat assistant built directly into your documentation. Users can ask questions about your docs and get instant, context-aware answers powered by AI. The assistant can search through your documentation, understand context, and provide helpful responses.

## How It Works

The AI chat assistant is available in two ways:

### 1. Per-Page Quick Access

Each documentation page has an "Ask AI about this page" button in the table of contents sidebar. When clicked, it:

1. Opens the chat interface
2. Pre-fills a prompt asking the AI to read the current page
3. Allows users to ask specific questions about that page

### 2. Global Chat Interface

Users can open the chat interface at any time by:

* Clicking the "Ask AI" button in the navbar
* Using the keyboard shortcut: `⌘I` (Mac) or `Ctrl+I` (Windows/Linux)

Once open, users can:

* Ask questions about any part of your documentation
* Upload files or images for context
* View AI-powered search results from your docs
* Get step-by-step guidance on complex topics

## Features

### Context-Aware Search

The AI assistant includes a built-in `search_docs` tool that:

1. Searches through your documentation content
2. Finds relevant pages based on the user's question
3. Shows source citations with links to the referenced pages
4. Uses the content to provide accurate, contextual answers

### Persistent Chat History

Conversations are automatically saved to the browser's IndexedDB, providing:

* Chat history that persists across page reloads
* Ability to continue previous conversations
* Option to start a new chat or clear history
* Offline access to past conversations

### Interactive Features

* **Suggestions**: First-time users see suggested questions to get started
* **File Upload**: Users can attach files or images for context
* **Markdown Support**: Responses are formatted with proper Markdown rendering
* **Code Syntax Highlighting**: Code blocks in responses include syntax highlighting
* **Reasoning Display**: In development mode, view the AI's reasoning process

### Mobile-Responsive

The chat interface adapts to different screen sizes:

* **Desktop**: Slides in from the right side as a sidebar panel
* **Mobile**: Opens as a bottom drawer for easy access

## Configuration

The environment variables `AI_GATEWAY_API_KEY` and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` must be set, which you can read more about in the [Environment Variables](/docs/env) section.

The model used is `openai/gpt-4.1-mini` via the Vercel AI Gateway.

## Suggested Prompts

You can customize the initial suggested prompts shown to users. These are configured in the Geistdocs configuration file, which you can read more about in the [Configuration](/docs/configuration) section.


---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)