Enrich Content with Built-in and Custom Skills
30-second answer
A skillset in Azure AI Search is a chain of skills that enrich each document while an indexer runs. Built-in skills cover text (PII Detection, Key Phrase Extraction, Text Split, Entity Recognition), images (OCR, Image Analysis) and layout (the Content Understanding skill). A custom skill calls your own endpoint through the Web API skill. Each skill reads and writes nodes in an enrichment tree, and only what you map with output field mappings or index projections reaches the index.
Simulate it » No Azure account neededExam objective: 5.1.3 Implement enrichment by using custom or built-in skills for text, images and layout. (Skills measured as of April 16, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Open the search service and go to <strong>Skillsets</strong>.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Open the search service and go to Skillsets.
- Type srch-agt-kb01 in the search bar and pick srch-agt-kb01 under Services.
- A skillset is a list of skills that run on each document, in dependency order. Select + Add skillset to edit its JSON.
- Each skill names its context, inputs and outputs. Here OCR reads images and PII Detection returns a masked copy of the text.
- Need logic no built-in skill has? Add a Web API skill. It calls your own endpoint, usually an Azure Function, with batches of records and reads the answers back.
- Skills write into an enrichment tree. Only what you map with output field mappings (or index projections for chunks) reaches the index.
- After a skillset change, Reset and Run the indexer. Otherwise it only processes new and changed files. Turn on enrichment caching to avoid paying twice for skills whose inputs didn't change.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Enrich with skills
A skillset is a chain of skills that adds fields to each document: built-in skills such as OCR, PII Detection and Key Phrase Extraction, a Web API custom skill for your own code, and the Content Understanding skill for layout-aware chunking. Outputs reach the index through output field mappings or index projections.
🤔 What happens if…
Read this tour as text
- Ingest and index content. An indexer reads files from a data source, runs a skillset (OCR, Text Split, an embedding model) and writes one search document per chunk into the index. Scanned images only become searchable when the OCR skill gets the images (imageAction: generateNormalizedImages).
- Keyword, vector, hybrid and semantic. Keyword search (BM25) matches words. Vector search compares embeddings, so it matches meaning. Hybrid runs both in parallel and merges them with Reciprocal Rank Fusion. The semantic ranker then re-reads the top 50 results with a language model and adds captions.
- Enrich with skills. A skillset is a chain of skills that adds fields to each document: built-in skills such as OCR, PII Detection and Key Phrase Extraction, a Web API custom skill for your own code, and the Content Understanding skill for layout-aware chunking. Outputs reach the index through output field mappings or index projections.
- Connect retrieval to an agent. A Foundry agent gets a knowledge base as a tool (an MCP endpoint). The project’s managed identity needs the Search Index Data Reader role. A retrieval reasoning effort of minimal, low or medium decides whether a model plans subqueries. Answers should come back with citations.
- Content Understanding analyzers. An analyzer turns a document into Markdown (layout, tables, figures) and into fields you define. Each field uses a method: extract (text on the page), classify (a fixed list) or generate (the model writes it). Fields come with a confidence score and a source location.
Contoso keeps its HR and finance policies as PDFs in Blob Storage, plus a scanned claim form. Build the four objects of an Azure AI Search pipeline with OCR, Text Split and an embedding model, notice what the first run misses, then fix it.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
Chunks hold raw phone numbers, and a legacy product code needs a lookup that no built-in skill does.
😊 THE SOLUTION
Add PII Detection and a Web API skill to the skillset, then map their outputs to the index.
- Personal data in searchable text✓ PII Detection skill and a masked field
- Custom logic that is not built in✓ Web API skill that calls an Azure Function
- Enriched fields missing from the index✓ Output field mappings or index projections
Start with a question
Your support chats are full of phone numbers and card digits, and a legacy product code needs a lookup. How do you clean and enrich the text before it's searchable?
Think of a mailroom. Before a letter reaches a desk, someone slits it open, a second person blacks out the account numbers, a third stamps the department from a lookup table, and then it goes into the pigeonholes.
A skillset is that mailroom line. Each worker is a skill. Some are standard (read the photo, black out personal data). Some are yours (stamp the department from our own table). The pigeonhole is the index, but a stamp that never gets written down on the letter never reaches it.
Explain it like I’m 10
The technical explanation
A skillset sits between document cracking and the index. For each document the indexer builds an enrichment tree, a tree of nodes that starts with /document/content (text) and /document/normalized_images/* (images). Every skill reads some nodes and adds new nodes.
Anatomy of a skill
| Part | What it means |
|---|---|
@odata.type | Which skill it is |
context | How often it runs: once per /document, or once for each item such as /document/normalized_images/* |
inputs | Which nodes it reads (source) |
outputs | The nodes it writes (targetName) |
Execution order follows the data: a skill that reads another skill’s output waits for it.
Built-in skills by job
| Job | Skills |
|---|---|
| Read images | OCR, Image Analysis |
| Shape text | Text Split (chunks), Text Merge (put OCR text back with the body) |
| Understand text | Key Phrase Extraction, Entity Recognition, Sentiment, Language Detection, Text Translation, Custom Entity Lookup |
| Protect data | PII Detection (finds personal data, returns a masked copy) |
| Vectors | Azure OpenAI Embedding (and Azure Vision multimodal embeddings, in preview) |
| Layout and chunking | Content Understanding skill (tables, sections, figures, semantic chunks) |
| Generative | GenAI Prompt (a Foundry chat model in the pipeline) |
Some skills run on Microsoft-hosted models and need an attached Foundry resource for billing. Others, such as the embedding and Content Understanding skills, call a resource and deployment you own.
Custom skills: the Web API skill
When no built-in skill does what you need, point a Web API skill at your own HTTPS endpoint. The service sends a batch of records, and your code returns one result per recordId:
{ "@odata.type": "#Microsoft.Skills.Custom.WebApiSkill",
"uri": "https://func-skills.azurewebsites.net/api/lookup",
"httpMethod": "POST", "batchSize": 10, "timeout": "PT30S",
"context": "/document",
"inputs": [ { "name": "text", "source": "/document/content" } ],
"outputs": [ { "name": "productCode", "targetName": "productCode" } ] }
{ "values": [ { "recordId": "r1", "data": { "productCode": "WM-2210" }, "errors": null, "warnings": null } ] }
Return every recordId you received, report problems in errors or warnings per record, and secure the endpoint (a function key, or Microsoft Entra ID authentication on the skill). Azure Functions is the common home for it.
Getting enrichments into the index
A skill output is only a node in a temporary tree. To keep it, you map it:
- Output field mappings on the indexer copy one node to one index field, such as
/document/maskedTexttomasked_text. - Index projections on the skillset create one search document per item (each chunk) and set the parent key. Use these with Text Split.
If personal data must not be searchable, split and embed the masked text, and don’t map the original content to a searchable field.
"outputFieldMappings": [
{ "sourceFieldName": "/document/maskedText", "targetFieldName": "masked_text" }
]
Cost and reruns
Skills that call models cost money for every document, every run. Turn on an enrichment cache so a rerun reuses outputs whose inputs didn’t change. When you change a skillset, reset the indexer, because it won’t revisit files it already processed.
-
1 Read
OCR reads the text from the page images.
-
2 Merge
Text Merge puts the OCR text back with the body text.
-
3 Protect
PII Detection returns a masked copy.
-
4 Look up
A Web API skill adds the product code from your own system.
-
5 Map
Output mappings and projections write the fields into the index.
Architect level Knowledge store and debug sessions
A skillset can also write enrichments outside the index with a knowledge store: tables, JSON objects or image files in Azure Storage. It’s useful for analytics, or to inspect what a skill produced without paying to query the index.
When a skill’s output looks wrong, use a debug session in the portal. It runs one document through the skillset and shows the enrichment tree, node by node, so you can see where a value went missing and test a changed skill before you rerun the whole indexer.
Sensitive data adds one more habit: apply PII detection before the embedding skill, so the vector is made from the masked text too.
Real-world business scenario
Fabrikam Retail (fictional)
- The problem
- Support chat exports contained card digits and phone numbers, and every article mentioned legacy product codes that the agent had to translate by hand.
- What they used
- A skillset with OCR for screenshots, PII Detection, Text Split and an embedding skill, plus a Web API skill that calls an Azure Function to translate legacy codes. The indexer maps masked_text and product_code into the index.
- Why that choice
- Masking before chunking keeps personal data out of both the text and the vectors, and the custom skill adds a field no built-in skill could.
- The result
- The assistant can filter by product code and cites chat excerpts with no personal data. The privacy review passed with no changes to the pipeline.
When to use it and when not to
✓ Use it when…
- You must read text in images, remove personal data or add fields before documents are searchable.
- You need domain logic during ingestion, such as code lookups, and can host it as an HTTPS endpoint.
- Documents have tables and figures that fixed-length chunking would cut apart.
✕ Think twice when…
- The content is clean text with no special needs. Text Split and an embedding skill are enough.
- You need typed fields with confidence from each document. Use Content Understanding directly.
- The logic needs seconds per record. Do it offline and upload the result instead.
↔ Alternatives to consider
- Preprocess with Content Understanding and index the Markdown.
- Push model with your own enrichment code before upload.
- Knowledge store when the enrichments are for analytics, not search.
Test yourself with exercises
5 original practice questions in the AI-103 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What is a skillset?
Model answer
A list of skills that run on each document during indexing. Each skill reads something from the document, such as text or an image, and adds a new piece of information, such as the text found by OCR or a masked copy with personal data removed.
Intermediate Your PII Detection skill runs but the index has no masked text. What's wrong?
Model answer
Skill outputs live in the enrichment tree. They only reach the index when an output field mapping, or an index projection for chunks, points at an index field. I'd add the mapping, make sure the index has a matching field, then reset and rerun the indexer.
Interviewer follows up
Which text should you index if raw phone numbers mustn't be searchable?
You
The masked output, not the original content field. Chunk and embed the masked text so the raw values never reach the index.
Experienced developer When would you write a custom Web API skill instead of using a built-in one?
Model answer
When I need logic no built-in skill has: looking up an internal product code, calling a private classifier, or using a third-party embedding model. The skill is an HTTPS endpoint, usually a Function, that takes a batch of records and returns the same record IDs with data, errors and warnings.
Scenario A custom skill times out on large batches. What do you change?
Model answer
Lower the batch size so each call does less work, raise the timeout within the allowed range, and make the function faster or scale it out. I'd also return warnings for records that fail instead of failing the whole batch, and check the indexer's execution history.
Architecture & design How do you decide between the Content Understanding skill and plain Text Split with OCR?
Model answer
If the documents have tables, sections and figures that matter, the Content Understanding skill chunks along that layout and describes figures, which keeps rows and headings together. For simple prose, OCR plus Text Split is cheaper and enough. I'd compare retrieval quality on real questions before paying for the richer option.
Quick revision
Key points
- A skillset is an ordered chain of skills. Order comes from the inputs and outputs, not from the list order alone.
- Built-in skills cover text, images and layout. Custom skills call your HTTPS endpoint (Web API skill).
- Skill outputs live in the enrichment tree until you map them to the index.
- Output field mappings handle one-to-one fields. Index projections handle one-to-many, such as chunks.
- Rerun after a skillset change needs an indexer reset, and an enrichment cache saves repeat skill cost.
- Content Understanding skill gives layout-aware chunks and figure descriptions.
Important terminology
- Skill
- One enrichment step in a skillset. It has a context, inputs and outputs.
- Enrichment tree
- The in-memory structure for one document where each skill adds its outputs as nodes, such as /document/content or /document/normalized_images/*.
- Context
- The level at which a skill runs once per item, for example once per document or once per image.
- Output field mapping
- An indexer setting that copies a node in the enrichment tree to a field in the index.
- Web API skill
- A custom skill that sends batches of records to an HTTP endpoint you own, often an Azure Function, and reads the results back.
- Content Understanding skill
- A built-in skill that connects to your Content Understanding resource for layout-aware analysis and semantic chunking.
- Enrichment cache
- Stored skill outputs that let a rerun skip skills whose inputs haven't changed.
Common mistakes
- Computing an enrichment and never mapping it to an index field.
- Indexing the original text when the goal was a masked copy.
- Forgetting that a custom skill must return every recordId it received.
Exam tips
- "Personal data must not be searchable" = PII Detection and index the masked text.
- "Logic that isn't built in" = a Web API custom skill, often an Azure Function.
- "Tables and sections must stay together in chunks" = the Content Understanding skill.
Five quick revision questions
-
1.What do you call the structure that holds skill outputs for one document?Show
The enrichment tree.
-
2.Which skill calls your own HTTP endpoint?Show
The Web API (custom) skill.
-
3.Which setting copies an enrichment to an index field?Show
An output field mapping.
-
4.Which skill reads text from images?Show
The OCR skill.
-
5.What gives one search document per chunk?Show
Index projections.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Connect Retrieval Pipelines to Agents and Workflows
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.