# RAG

Concept · [Building with AI](https://ecosystem.samcarlton.com/ai)

Also called: retrieval-augmented generation, retrieval augmented generation, retrieval, knowledge base, chat with your documents

Retrieval-augmented generation. A setup where an AI tool first looks up relevant passages in your own documents and then hands them to an [LLM](https://ecosystem.samcarlton.com/llm) to answer from, so the answer is based on your material.

**For example:** A support assistant gets a question, pulls the two most relevant pages from your help center and writes its answer from those pages.

## Connects to (20)

- [Vector database](https://ecosystem.samcarlton.com/vector-database): A database built to store embeddings and quickly find the items closest in meaning to a question, not just the ones that share its exact…
- [Embedding](https://ecosystem.samcarlton.com/embedding): A way of turning a piece of text into a list of numbers that captures its meaning, so software can tell which pieces of text are about…
- [Hallucination](https://ecosystem.samcarlton.com/hallucination): When an AI model states something false or invented as though it were true.
- [Chunking](https://ecosystem.samcarlton.com/chunking): Splitting long documents into smaller passages before creating embeddings, so a search can return just the relevant part instead of a…
- [Reranking](https://ecosystem.samcarlton.com/reranking): A second pass in search where a more careful model reorders the first batch of results by how well each actually answers the question.
- [Hybrid search](https://ecosystem.samcarlton.com/hybrid-search): Combining keyword search and similarity search, so results match both exact terms, such as product codes, and overall meaning.
- [Training](https://ecosystem.samcarlton.com/training): Teaching an AI model by showing it a very large number of examples before anyone uses it.
- [Context window](https://ecosystem.samcarlton.com/context-window): How much text an LLM can take into account at one time.
- [Fine-tuning](https://ecosystem.samcarlton.com/fine-tuning): Extra training of an existing model on a smaller, narrower set of examples, so it suits one task or style.
- [Knowledge cutoff](https://ecosystem.samcarlton.com/knowledge-cutoff): The date where a model's training data ends.
- [Contextual knowledge](https://ecosystem.samcarlton.com/contextual-knowledge): Facts the model can read directly in front of it right now, such as documents you pasted, files the agent opened or search results.
- [Knowledge graph](https://ecosystem.samcarlton.com/knowledge-graph): A way of storing information as things and the named connections between them, such as 'course A teaches skill B'.
- [Lexical search](https://ecosystem.samcarlton.com/lexical-search): Search that matches the exact words in a query.
- [Answer engine optimization](https://ecosystem.samcarlton.com/answer-engine-optimization): Making your content easy for AI chat and AI search tools to find, understand and cite when they answer people's questions.
- [Context engineering](https://ecosystem.samcarlton.com/context-engineering): Deciding what information, instructions, examples and tools to put in front of an AI model for each task, and what to leave out.
- [Perplexity](https://ecosystem.samcarlton.com/perplexity): An AI search tool.
- [Custom GPTs](https://ecosystem.samcarlton.com/custom-gpts): Versions of ChatGPT that a person sets up for one job, with their own instructions, files and tools, and can share with others.
- [Gemini Notebook](https://ecosystem.samcarlton.com/gemini-notebook): A Google research tool, formerly called NotebookLM, that answers questions using the documents a person adds, with citations, and can turn…
- [Firecrawl](https://ecosystem.samcarlton.com/firecrawl): A service that turns web pages into clean text that AI models can use.
- [Blue J](https://ecosystem.samcarlton.com/blue-j): An AI research tool for tax professionals.

Map view: https://ecosystem.samcarlton.com/rag
