We offer simple, easy to follow quickstarts for learning the fundamentals of a pattern or feature. This collection of quickstarts consists of code samples for the classic RAG pattern in Azure AI Search, where classic RAG uses the original search engine pipeline instead of agentic retrieval.
Key points about classic RAG include:
- LLM integration is used only for answer formulation over search results. There's no preliminary LLM query planning step (querydecomposition or rewriting), or built-in answer synthesis.
- Queries target a single search index on a search service.
- Queries are issued using the Search Documents API (or SDK equivalent).
- You can use hybrid search (one text query with one or more vector queries) but the entire query payload must stay under the API limits for a request.
We now recommend agentric retrieval for modern RAG workloads. However, if you already have an existing solution built on Azure AI Search, a classic RAG pattern might meet your application requirements with fewer code changes. For a comparison of classic RAG and agentic retrieval, see RAG in Azure AI Search.
The code in this series shows you how to send search results to a chat completion model. It assumes hotels sample data. You can use a different index, but we recommend that you create your own hotels-sample index if you want to use the code as-is.