AI-103 courseLesson 16 of 18 · 15 min
Retrieval Pipelines in Azure AI Search: Indexers, Skillsets, OCR and Vector Search (AI-103)
XUtilHub Team ·
Exam skills covered
- Ingest and index content, such as documents, images, audio, and video
- Configure semantic search, hybrid search, and vector search for grounding
- Implement enrichment by using custom or built-in skills for text, images, and layout
- Configure RAG ingestion flow, including documents and using optical character recognition (OCR)
RAG and agent knowledge are only as good as the index behind them. This lesson covers the Build retrieval and grounding pipelines skill group: getting documents, images, audio and video into Azure AI Search, enriching them, and choosing the right search type.
Azure AI Search building blocks
| Component | What it is |
|---|---|
| Data source | Where content lives: Blob Storage, ADLS Gen2, SQL, Cosmos DB, SharePoint, OneLake |
| Index | The searchable schema: fields (text, vectors, filterable metadata) and settings |
| Indexer | A crawler that pulls from the data source on a schedule, with change detection |
| Skillset | An enrichment pipeline the indexer runs: OCR, layout, chunking, embedding, custom logic |
| Vectorizer | Converts query text to a vector at search time (integrated vectorization) |
| Semantic configuration | Which fields the semantic ranker uses |
Two ways to load data:
- Pull: an indexer reads the data source, which is the easiest way to keep the index in sync
- Push: your code uploads documents through the SDK or REST API, for full control or unsupported sources
A RAG ingestion flow
For a folder of PDFs, Word files and scans in Blob Storage:
- Crack documents: the indexer extracts text and images
- OCR / layout: the OCR skill reads text from images and scanned pages; the Document Layout skill (powered by Document Intelligence) returns structure such as headings, tables and paragraphs, as Markdown
- Chunk: the Text Split skill splits pages into passages, or chunk by layout section
- Embed: the Azure OpenAI Embedding skill creates a vector per chunk
- Project: index projections write each chunk as its own search document, linked to its parent file
- Index the chunks with metadata: title, URL, page, date, permissions
The Import data (new) wizard in the portal builds this whole pipeline (data source, skillset, index, indexer, vectorizer) in a few clicks, which is a fast way to see the JSON you'd put in source control.
Built-in and custom skills
Built-in skills cover common enrichment:
- Text: language detection, key phrases, entity recognition, PII detection, translation, text split
- Images: OCR, image analysis (captions, tags)
- Layout: Document Layout
- Vectors: Azure OpenAI embeddings, and multimodal embeddings for images
Custom skills run your own logic:
- Custom Web API skill: calls your endpoint (often an Azure Function) with a defined input/output JSON contract, for example to call an internal classifier or clean text
- Azure Machine Learning skill: calls a model hosted in Azure ML
- GenAI prompt skill: calls a chat model during indexing to summarise, classify or describe images, where available
Images, audio and video
- Images: OCR the text, generate captions or verbalisations with a multimodal model, and/or create multimodal embeddings so text queries can find images
- Audio and video: transcribe and segment first, using Content Understanding (transcripts, segments, descriptions) or Speech batch transcription, then index the text and timestamps so answers can link to the exact moment
- Scanned documents: OCR or layout is essential; without it, the index stays empty for those files
Choosing search types for grounding
| Type | Strength | Configure |
|---|---|---|
| Keyword (full text) | Exact terms, IDs, rare words | Searchable fields, analyzers |
| Vector | Meaning and paraphrase | Vector field + HNSW profile + vectorizer |
| Hybrid | Best of both, merged by RRF | Search text + vector query in one request |
| Semantic ranker | Re-ranks top results by meaning; captions and answers | Semantic configuration, query_type="semantic" |
| Agentic retrieval | Splits complex questions into sub-queries for agents | Knowledge sources and knowledge bases (Foundry IQ) |
Hybrid + semantic ranker is the usual default for RAG. Add filters for metadata and security trimming, and scoring profiles to boost fresh or authoritative content.
Connect retrieval to workflows and agents
- Code: call the search client in your app, as in the RAG lesson
- Agents: add an Azure AI Search tool (via a project connection) or a Foundry IQ knowledge base, so the agent retrieves and cites on its own
- Workflows: a retrieval step feeds the next agent or model step
- MCP: expose search as an MCP tool for any MCP-capable agent
Keep it healthy
Schedule indexers, watch failed and warning documents, re-index after changing skills or chunking, and keep a set of test queries to measure relevance after every change (see monitoring).
Key takeaways
- Pipeline: data source → indexer → skillset (OCR, layout, split, embed, custom) → index projections → index, plus a vectorizer for queries.
- Integrated vectorization chunks and embeds during indexing and vectorizes queries.
- Custom logic = Custom Web API skill; scanned files need OCR / layout.
- Ground with hybrid + semantic ranker, filters for security, and agent tools or Foundry IQ for agents.
Next lesson: document extraction with Content Understanding.
Check your understanding
Exam-style questions on this lesson. Get them all right to mark the lesson complete.
Finished reading?