> For the complete documentation index, see [llms.txt](https://dnotifier.gitbook.io/product-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dnotifier.gitbook.io/product-docs/examples/rag-assistant.md).

# RAG assistant (advanced)

Index documents into the knowledge base, run semantic search, and answer questions grounded in your content.

## What this example does

1. Connect over HTTP
2. `addDocument()` — seed help-center articles
3. `search()` — find relevant chunks for a user question
4. `sendAI()` with `useKnowledgeBase: true` — generate an answer with RAG

## Prerequisites

* AI enabled on your plan
* Knowledge-base quota available (`knowledgeBaseMaxWords` in plan limits)

## Pipeline

```
addDocument()  →  indexed vectors
                      ↓
search(query)  →  top-k chunks
                      ↓
sendAI({ useKnowledgeBase: true })  →  grounded answer
```

## Language guides

* [**JavaScript / TypeScript**](/product-docs/examples/rag-assistant/javascript-typescript.md)
* [**Dart / Flutter**](/product-docs/examples/rag-assistant/dart-flutter.md)

## Related docs

* [Manage documents](https://github.com/smartguy6666/dnotifier-sdk/blob/main/docs/examples/ai/manage-documents/README.md)
* [Semantic search](https://github.com/smartguy6666/dnotifier-sdk/blob/main/docs/examples/ai/semantic-search/README.md)
* [Build a RAG Q\&A bot](https://github.com/smartguy6666/dnotifier-sdk/blob/main/docs/examples/ai/example-rag-bot/README.md)
