Azure AI Search — Powering RAG Applications
Build semantic search and RAG applications with Azure AI Search — vector search, hybrid search, and AI enrichment.
“Welcome back. Today we're covering Azure AI Search — formerly Cognitive Search — which has evolved from a traditional search engine into the critical data layer for AI applications. If you want to build a RAG system that lets users chat with your documents, Azure AI Search is where your documents live and how the relevant passages get retrieved. In Azure AI Foundry you add AI Search as a named connection, and Prompt Flow uses it automatically as the retrieval tool. Understanding AI Search is fundamental to building enterprise AI applications.”
“Azure AI Search is a fully managed search service that indexes your content and makes it searchable. You can index documents from Azure Blob Storage, Azure SQL, Cosmos DB, or push data directly via API. What makes it modern is its support for multiple search paradigms — traditional keyword search, semantic ranking using language models, and vector search for meaning-based similarity. For AI applications, hybrid search combining keyword and vector gives the best results.”
“Traditional keyword search finds documents containing the exact words you searched for. If you search 'car maintenance', you won't find documents about 'vehicle servicing' even though they're the same thing. Semantic ranking uses a language model to re-rank keyword results by true relevance. Vector search converts your query and all documents into numerical vectors using an embedding model — documents with similar meaning end up close together in vector space, so a search for 'car maintenance' finds 'vehicle servicing' too.”
“Embeddings are the mathematical representation of text meaning. An embedding model — like OpenAI's text-embedding-3-large — converts a piece of text into an array of 1,536 numbers. Texts with similar meaning produce similar number arrays. When you index your documents, you generate embeddings for each chunk and store them. At query time, you generate an embedding for the user's question and find the document chunks whose embeddings are closest — those are the most relevant passages.”
“A search index is like a database table optimized for search. You define fields — title, content, category — and mark which are searchable, filterable, or sortable. For vector search, add a vector field configured with the right dimensions for your embedding model. An indexer automatically crawls data sources — Azure Blob Storage, SQL Database, Cosmos DB — and updates the index on a schedule. Large documents must be chunked into smaller passages before indexing — typically 500-1000 tokens per chunk, with some overlap.”
“The complete RAG architecture has two phases. Ingestion: split your documents into chunks, generate embeddings for each chunk using Azure OpenAI, and store both the text and vectors in Azure AI Search. Query: when a user asks a question, embed the question, run a hybrid search to find the most relevant chunks, include those chunks in a GPT-4o prompt, and return the generated answer with citations. This pattern lets users chat with any document corpus — manuals, contracts, research papers, knowledge bases.”
“AI Search can apply AI transformations to your content during indexing using Skillsets. OCR extracts text from scanned PDFs or images — making even old paper-based documents searchable. Entity extraction automatically identifies people, places, and organizations in documents. Key phrase extraction surfaces the main topics. These enriched fields are stored in the index alongside the original content, dramatically improving search relevance and enabling new query patterns.”
“Let's build a search index from scratch. I'll create an AI Search resource, define an index with both text and vector fields, upload and index some sample documents, then compare the results of keyword search versus vector search on the same query. Finally, I'll wire it up to Azure OpenAI to demonstrate the complete RAG flow — user question to search to GPT-4o answer with document citations.”
“Azure AI Search is the search backbone of enterprise AI. Paired with Azure OpenAI, it enables powerful RAG applications that let users interact naturally with any document corpus. Next video we go deep on Azure Machine Learning — for when pre-built AI APIs aren't enough and you need to train custom models on your own data. This is where data science meets cloud engineering.”
- 1Create an Azure AI Search resource in Azure Portal
- 2In Azure AI Foundry (ai.azure.com) — add AI Search as a connection
- 3Create an index with title, content, and vector fields
- 4Upload and index sample documents
- 5Run a keyword search query
- 6Run a vector similarity search
- 7Run a hybrid search (keyword + vector)
- 8Use AI Foundry Prompt Flow to wire AI Search + OpenAI for RAG