Retrieval & Tool Use
Grounding generation in external information and letting models call functions, search, and other tools.
- BM25PTL-0127
- Chain-of-NotePTL-0237
- ChunkingPTL-0125
- Citation GenerationPTL-0139
- ColBERTPTL-0130
- Contextual RetrievalPTL-0132
- Dense RetrievalPTL-0126
- EmbeddingPTL-0123
- Function CallingPTL-0060
- Code Execution ToolPTL-0138
- Programmatic Tool CallingPTL-0223
- Tool SearchPTL-0222
- Web Search ToolPTL-0137
- Hybrid SearchPTL-0128
- Model Context ProtocolPTL-0061
- Query RewritingPTL-0131
- ReActPTL-0058
- RerankingPTL-0129
- Retrieval-Augmented GenerationPTL-0055
- Active RetrievalPTL-0136
- Agentic RAGPTL-0134
- Corrective RAGPTL-0135
- GraphRAGPTL-0133
- Hypothetical Document EmbeddingsPTL-0056
- Self-RAGPTL-0057
- Structured OutputsPTL-0062
- ToolformerPTL-0059
- Vector DatabasePTL-0124
Definitions
- Active Retrieval
- Active retrieval augmented generation decides during generation when and what to retrieve; in FLARE, the model drafts the next sentence and, if it contains low-confidence tokens, uses that draft as a search query and regenerates the sentence with the retrieved evidence.
- Agentic RAG
- Agentic RAG is retrieval-augmented generation in which an agent, rather than a fixed pipeline, decides whether to retrieve, what to search for, which sources or tools to use, and whether the evidence is sufficient, retrieving iteratively until it can answer.
- BM25
- BM25 is a keyword ranking function that scores documents by how often the query's terms appear in them, weighted by how rare each term is across the collection and normalized for document length.
- Chain-of-Note
- Chain-of-Note (CoN) is a retrieval-augmented generation method in which the model writes a short reading note for each retrieved document, assessing whether and how it bears on the question, before combining those notes into a final answer or saying that the answer is unknown.
- Chunking
- Chunking is splitting documents into smaller passages before indexing them for retrieval, so that each retrieved unit is small enough to fit the context and focused enough to match a query.
- Citation Generation
- Citation generation is having a model attach citations to the sources that support each claim in its answer, so readers can verify the answer and unsupported claims are easier to spot.
- Code Execution Tool
- A code execution tool gives a language model a sandboxed environment in which it can write and run code, such as Python or shell commands, and read the output, so that it can compute, analyze data, and check its own work.
- ColBERT
- ColBERT is a retrieval model that embeds every token of the query and of each passage separately and scores relevance by matching each query token to its most similar passage token, an approach called late interaction.
- Contextual Retrieval
- Contextual retrieval is a RAG preprocessing technique in which a language model writes a short explanation of where each chunk fits in its source document and prepends it to the chunk before the chunk is embedded and indexed for keyword search.
- Corrective RAG
- Corrective RAG (CRAG) adds a lightweight evaluator that grades retrieved documents for relevance and, depending on the grade, uses them, discards them in favor of web search, or combines both before generation.
- Dense Retrieval
- Dense retrieval finds relevant passages by embedding the query and every passage as dense vectors, usually with a dual encoder, and returning the passages whose vectors are most similar to the query's.
- Embedding
- An embedding is a fixed-length vector of numbers that represents a piece of text, or another input, so that inputs with similar meaning have vectors that are close together, typically measured by cosine similarity.
- Function Calling
- Function calling, or tool use, is a model capability in which the model outputs a structured request to invoke a developer-defined function with arguments, which the application executes and returns as a result to the model.
- GraphRAG
- GraphRAG is a retrieval-augmented generation approach that uses a language model to extract an entity-and-relationship graph from a document collection, summarizes communities of related entities, and answers questions from those summaries.
- Hybrid Search
- Hybrid search combines keyword retrieval, such as BM25, with dense embedding retrieval and merges the two result lists, so that a query benefits from both exact-term matching and semantic matching.
- Hypothetical Document Embeddings
- Hypothetical Document Embeddings (HyDE) improves retrieval by having a model write a hypothetical answer to the query, embedding that answer, and searching for real documents similar to it.
- Model Context Protocol
- The Model Context Protocol (MCP) is an open standard, introduced by Anthropic in 2024, that defines how applications expose tools, data resources, and prompt templates to language-model clients through a common client-server interface.
- Programmatic Tool Calling
- Programmatic tool calling is a tool-use pattern in which the model writes code that calls tools as functions inside a sandboxed execution environment, so that several tool calls and the processing of their results happen in code rather than through a separate model turn for each call.
- Query Rewriting
- Query rewriting uses a language model to reformulate a user's question into one or more queries better suited to the retriever before retrieval is run.
- ReAct
- ReAct is a prompting pattern that interleaves reasoning traces ("Thought") with actions such as tool calls ("Action") and their results ("Observation"), letting a model plan, act, and update its plan in a loop.
- Reranking
- Reranking is a second retrieval stage in which a more accurate but slower model, typically a cross-encoder that reads the query and each candidate together, rescores the top results from a fast first-stage search and reorders them.
- Retrieval-Augmented Generation
- Retrieval-augmented generation (RAG) supplies a language model with passages retrieved from an external corpus at query time, so its output is grounded in that information rather than only in its trained parameters.
- Self-RAG
- Self-RAG trains a model to decide when to retrieve, and to emit special reflection tokens that critique whether retrieved passages are relevant and whether its own output is supported by them.
- Structured Outputs
- Structured outputs constrain a language model to produce responses that conform to a specified format, typically a JSON Schema, either through instructions or through constrained decoding that guarantees validity.
- Tool Search
- Tool search is an agent capability in which tool definitions are not all loaded into the model's context up front, and the model instead searches a tool catalog and loads only the definitions it needs for the current task.
- Toolformer
- Toolformer is a method in which a language model teaches itself to use external tools, such as a calculator or search API, by generating candidate API calls in text and keeping those that reduce its prediction loss.
- Vector Database
- A vector database stores embeddings alongside their source content and metadata and answers queries by finding the stored vectors nearest to a query vector, usually with approximate nearest-neighbor search.
- Web Search Tool
- A web search tool lets a language model issue search queries, read the results, and ground its answer in current web content, usually returning citations to the pages it used.