---
title: "Retrieval-Augmented Generation (RAG)"
description: "Using Tiptap Semantic Search to retrieve context for your Tiptap AI commands."
---

> [Tiptap Editor 3.0 is out. Start here](https://tiptap.dev/docs/resources/whats-new.md)

# Retrieval-Augmented Generation (RAG)

Using Tiptap Semantic Search to retrieve context for your Tiptap AI commands.

The following example shows how you can use [Tiptap Semantic Search](https://tiptap.dev/docs/v2/collaboration/documents/semantic-search.md) to generate meaningful context for Tiptap AI.

With this approach, your AI commands can use existing documents as knowledge, improving the quality of the answer.

> **Interactive demo:** [RAG](https://ai-demo.tiptap.dev/preview/Examples/RAG)
