Retrieval & Grounding Pipelines
Indexers · vector, hybrid and semantic search · skillsets (OCR, Text Split, layout, custom) · integrated vectorization · agent retrieval tools
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Ingest and index content
- An indexer is a crawler that extracts data from a supported source and fills a search index through field mappings. It's the pull model: no code of yours adds the data.
- Run on demand or on a schedule as often as every five minutes. More frequent updates need the push model, where your code sends data to the index.
- One indexer uses one data source and writes to one index. A data source can feed several indexers, and several indexers can write to the same index.
- Sources include Azure Blob Storage, Azure Cosmos DB, Azure Data Lake Storage Gen2, Azure SQL Database and Microsoft OneLake. Azure Cosmos DB for Cassandra isn't supported.
- Change detection: automatic for blob data; for Azure SQL or Azure Cosmos DB it must be enabled.
- Blob indexer: the search service's managed identity needs Storage Blob Data Reader when you use Entra roles. Text goes into a
contentfield; the indexer fills only metadata fields already defined in the index. - Image extraction during document cracking is off by default (
imageAction) and has an extra fee.
Indexer stages, in order
- Document cracking: open files and extract text, images and metadata.
- Field mappings: send source fields to index fields as-is (optional).
- Skillset execution: optional enrichment into an in-memory enriched document.
- Output field mappings: copy enriched nodes into index fields. Required for any transformed content you want in the index.
Field mappings move source content unchanged. Skill output lives only in the enriched document, so it reaches the index only through an output field mapping. Enriched content is temporary unless you save it, for example to a knowledge store.
Azure Content Understanding in Foundry Tools ingests documents, images, video and audio into a defined output format and can feed a search index, with figure descriptions to make visuals searchable.
Vector, hybrid and semantic search
| Mode | What it does | Key detail |
|---|---|---|
| Full-text | Keyword match, BM25 scoring | Precise for codes, jargon and names |
| Vector | Finds content with similar meaning by comparing embeddings | Vector fields are Collection(Edm.Single) with dimensions and a vector profile (hnsw or exhaustiveKnn) |
| Hybrid | One request with both search and vectorQueries; runs in parallel, merged by RRF | k = vector matches given to RRF; top = results returned |
| Semantic ranker | Reranks a BM25 or RRF result; adds captions and answers | queryType = semantic plus semanticConfiguration; top 50 are reranked |
- Vector conversion is one-way (nonvector to vector), so indexes hold both vector and nonvector fields. Return readable fields with
select. - A vector field isn't filterable; filter on a text or numeric field instead.
- The vectorizer used at query time must match the embedding model used to encode the content. All vector fields in one query must use the same model.
exhaustiveforces exhaustive KNN even if the field is indexed for HNSW;fieldstargets up to 10 vector fields.- Semantic ranking needs a plain text query:
*or an empty string applies no semantic ranking. It is a premium feature billed by usage. - Vector search is available in all regions and tiers at no extra charge; embedding calls can cost money.
Enrichment with skills
| Skill | Does | Notes |
|---|---|---|
| OCR | Reads printed and handwritten text in image files and embedded images | Needs a billable Foundry resource beyond 20 documents per indexer per day; outputs text and layoutText |
| Text Split | Chunks text by pages or sentences | Not bound to Foundry Tools, non-billable; maximumPageLength default 5000, pageOverlapLength sets overlap |
| Document Layout | Detects structure with the Document Intelligence layout model; outputs Markdown or text | Needs a billable resource beyond 20 documents per indexer per day; times out past five minutes |
| Azure Content Understanding | Extraction and chunking in one skill; tables and figures as Markdown; cross-page tables as one unit | No free 20 documents per indexer per day; no Text Split needed |
| Document Extraction | Extracts text and images from a file, with control over naming | Text extraction free; image extraction billed by Azure AI Search |
| GenAI Prompt | Verbalizes images into short text descriptions with an LLM | Used in the multimodal pipeline |
| Custom Web API | Calls your endpoint for custom processing | HTTPS only; PUT or POST; default timeout 30 s, max 230 s; default batchSize 1000 |
- A skillset is an array of skills. Each skill has a context (
/documentor a lower node), inputs and outputs; outputs become children of the context node. - Built-in skills include OCR, image analysis, language detection, translation, entity recognition, key phrase extraction and embeddings. Raw content must be text or images: you can't enrich vectors.
- Custom Web API skill: the response must contain the outputs the skill declares, or no enrichment happens. The indexer retries twice on 502, 503 and 429.
- With managed identity,
authResourceIdis the app ID URI of the app hosting the code, not the URL of the search service.
RAG ingestion flow
- Indexer reads raw data from a supported data source.
- Chunking strategy in the skillset: Text Split, Azure Content Understanding, or a document parsing mode. Chunking is needed unless documents are small, to meet embedding token limits.
- Embedding skill creates the vectors (AzureOpenAIEmbedding, a custom skill, Azure Vision multimodal, or an AML skill).
- Index receives chunked, vectorized content; a vectorizer on the vector field converts text queries at query time.
| Embedding skill | Matching vectorizer |
|---|---|
| AzureOpenAIEmbedding skill | Azure OpenAI vectorizer |
| Custom skill | Custom Web API vectorizer |
| Azure Vision multimodal embeddings skill | Azure Vision vectorizer |
| AML skill (Foundry model catalog) | Microsoft Foundry model catalog vectorizer |
Multimodal pipeline (Import data wizard)
- Extract content with Document Extraction or Azure Content Understanding.
- Chunk text with Text Split.
- Describe images with GenAI Prompt, or skip verbalization and use a multimodal embedding model.
- Create embeddings of text and images in a shared vector space.
- Store extracted images in the knowledge store so clients can return them.
Without integrated vectorization, you can generate embeddings outside the service and push prevectorized content into vector fields.
Connect retrieval to agents
| Option | How it retrieves | Use it when |
|---|---|---|
| Classic search | One query against one index in one request-response; no LLM planning | Predictable, low-latency queries; GA features required |
| Agentic retrieval | LLM-based query planning, parallel subqueries, semantic reranking, merged result with references | Complex, multi-part or context-dependent questions; accepts extra latency |
| Azure AI Search tool | Agent queries one index through a project connection | You own an index with searchable text and vector fields |
| Foundry IQ knowledge base | Agent calls the knowledge_base_retrieve MCP tool of the knowledge base | Shared, multi-source, permission-aware grounding for several agents |
- Azure AI Search tool index needs:
Edm.Stringfields that are searchable and retrievable,Collection(Edm.Single)vector fields that are searchable, and a retrievable source URL field for citations. - Foundry account managed identity roles on the search service: Search Index Data Contributor and Search Service Contributor.
- Private virtual network with the tool: Entra project managed identity; key-based authentication isn't supported.
- Knowledge base reasoning effort is
minimal,low(default) ormedium. Atminimalthe planning step is skipped. - Availability: the page says the
2026-04-01REST API covers generally available knowledge source types with minimal, extractive retrieval; LLM-based query planning, answer synthesis and non-minimal reasoning effort need the2026-08-01-previewAPI. Treat these as preview. - Knowledge base connection to an agent: a
RemoteToolconnection (marked preview on the page) that uses the project's managed identity, and an MCP tool withallowed_toolsset toknowledge_base_retrieve. Hub-based projects aren't supported. - File search grounds an agent on user documents: files go into a vector store and, with standard agent setup, your Azure AI Search resource ingests them.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Hybrid query with the Python SDK | client = SearchClient(endpoint=endpoint, index_name=index_name, credential=credential) | - |
| Build the vector part of a hybrid query (Python) | VectorizedQuery(vector=query_vector, k_nearest_neighbors=10, fields="DescriptionVector", exhaustive=True) | - |
| Run the hybrid search (Python) | results = client.search(
search_text="historic hotel walk to restaurants and shopping",
vector_queries=[vector_query],
select=["HotelName", "Description", "Address/City"],
top=10
) | - |
| Attach an Azure AI Search index to an agent (Python) | AzureAISearchTool(
azure_ai_search=AzureAISearchToolResource(
indexes=[
AISearchIndexResource(
project_connection_id=connection_id,
index_name=SEARCH_INDEX_NAME,
query_type=AzureAISearchQueryType.SIMPLE,
),
]
)
) | - |
Exam Tips
Tick each tip once you can answer it without looking.
“Crawl Blob Storage into an index on a schedule without writing code that adds documents” → Indexer with a data source and a schedule (as often as every five minutes). Trap: The push model means your code sends data to the index.
“Indexer limits” → One data source and one index per indexer; many indexers can write to one index. Trap: One indexer can't write to several indexes.
“Change detection for new or updated content” → Automatic for blobs; must be enabled for Azure SQL and Azure Cosmos DB. Trap: Don't assume every source detects changes by default.
“Skill output (OCR text, chunks) isn't in the index” → Add an output field mapping from the enriched document. Trap: Field mappings copy source fields as-is; they don't see enriched nodes.
“Split extracted text into overlapping chunks for an embedding model, no billing” → Text Split skill (pages or sentences, pageOverlapLength). Trap: Document Layout and OCR call Foundry Tools and become billable beyond 20 documents per indexer per day.
“Structure-aware chunks, cross-page tables and tables as Markdown, no Text Split” → Azure Content Understanding skill. Trap: The Content Understanding skill page contrasts it with Document Layout, which outputs tables and figures as plain text and gives 20 free documents per indexer per day before a billable resource is needed.
“Scanned images or embedded images that must become searchable text” → OCR skill (JPEG, JPG, PNG, BMP, TIFF; also images embedded in PDFs). Trap: Image extraction must be on (imageAction) and has an extra fee.
“Your own enrichment code in the pipeline” → Custom Web API skill: HTTPS, PUT or POST, returns the declared outputs. Trap: Any other response is an error and no enrichment is performed.
“Keyword precision plus meaning in one request” → Hybrid: search + vectorQueries, merged by RRF. Trap: The semantic ranker is a separate reranking step, not the merge.
“Semantic ranker is configured but isn't reranking” → The query is * or empty; use a plain text query with queryType = semantic and a semanticConfiguration. Trap: Semantic ranking only reranks the top 50 results.
“Text queries must be converted to vectors at query time” → Vectorizer in the index schema that matches the embedding model used for indexing. Trap: A mismatched model compares vectors from different spaces.
“Vector field definition” → Collection(Edm.Single), searchable, dimensions from the embedding model, a vector profile. Trap: A vector field isn't filterable; filter on a text or numeric field.
“Azure AI Search tool defaults” → top_k = 5, query_type = vector_semantic_hybrid. Trap: project_connection_id and index_name are required.
“Agent grounding through an Azure AI Search knowledge base” → MCP tool with allowed_tools = knowledge_base_retrieve, via a RemoteTool project connection. Trap: Hub-based projects aren't supported.
“Complex multi-part questions that depend on chat history” → Agentic retrieval: LLM query planning, parallel reranked subqueries, merged result. Trap: Classic search is one query against one index and adds no LLM planning.
Sources
- Azure AI Search overview
- RAG and generative AI in Azure AI Search
- Indexer overview
- Index data from Azure Blob Storage
- AI enrichment concepts
- Skillsets in Azure AI Search
- Integrated vectorization
- OCR skill
- Document Layout skill
- Text Split skill
- Custom Web API skill
- Azure Content Understanding skill
- Document Extraction skill
- Multimodal search
- Vector search overview
- Create a vector index
- Run vector queries
- Hybrid search overview
- Create a hybrid query
- Semantic ranker overview
- Create a semantic query
- Agentic retrieval overview
- Connect an Azure AI Search index to Foundry agents
- What is Foundry IQ?
- Connect agents to Foundry IQ knowledge bases
- File search tool for Foundry agents
- Azure Content Understanding overview
Checked against Microsoft Learn on November 13, 2026.