Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 37 of 39
❮Prev Next❯

Enrich Content with Built-in and Custom Skills

Module 5: Information Extraction ⏱ 12 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    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 needed

    Exam 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.

    Azure portal: Build a skillset with OCR, PII Detection and a custom Web API skill Build a skillset with OCR, PII Detection and a custom Web API skill.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    Open the search service and go to <strong>Skillsets</strong>.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Open the search service and go to Skillsets.
    2. Type srch-agt-kb01 in the search bar and pick srch-agt-kb01 under Services.
    3. A skillset is a list of skills that run on each document, in dependency order. Select + Add skillset to edit its JSON.
    4. Each skill names its context, inputs and outputs. Here OCR reads images and PII Detection returns a masked copy of the text.
    5. 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.
    6. Skills write into an enrichment tree. Only what you map with output field mappings (or index projections for chunks) reaches the index.
    7. 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.

    😟 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
    🛠️ Solved with: Built-in and custom skills

    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

    PartWhat it means
    @odata.typeWhich skill it is
    contextHow often it runs: once per /document, or once for each item such as /document/normalized_images/*
    inputsWhich nodes it reads (source)
    outputsThe 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

    JobSkills
    Read imagesOCR, Image Analysis
    Shape textText Split (chunks), Text Merge (put OCR text back with the body)
    Understand textKey Phrase Extraction, Entity Recognition, Sentiment, Language Detection, Text Translation, Custom Entity Lookup
    Protect dataPII Detection (finds personal data, returns a masked copy)
    VectorsAzure OpenAI Embedding (and Azure Vision multimodal embeddings, in preview)
    Layout and chunkingContent Understanding skill (tables, sections, figures, semantic chunks)
    GenerativeGenAI 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/maskedText to masked_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. 1 Read

      OCR reads the text from the page images.

    2. 2 Merge

      Text Merge puts the OCR text back with the body text.

    3. 3 Protect

      PII Detection returns a masked copy.

    4. 4 Look up

      A Web API skill adds the product code from your own system.

    5. 5 Map

      Output mappings and projections write the fields into the index.

    A skillset line for one scanned document
    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

    Retail

    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.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    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.

    Question 1

    Question 1 of 5

    A skillset runs the PII Detection skill, but the index has no masked text field populated. What is the most likely cause?

    Question 2

    Question 2 of 5

    You must add a value from an internal product-code system to each document during indexing. No built-in skill provides it. What should you use?

    Question 3

    Question 3 of 5

    A custom skill endpoint receives records with recordId values r1, r2 and r3. Which response is valid?

    Question 4

    Question 4 of 5

    Technical reports contain tables that fixed-length chunking splits across passages. You want chunks that follow sections and tables. Which skill should you add?

    Question 5

    Question 5 of 5 · Select 2

    You edit a skillset that already processed all blobs. Which two actions help you apply the change cost-effectively?

    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. 1.What do you call the structure that holds skill outputs for one document?Show

      The enrichment tree.

    2. 2.Which skill calls your own HTTP endpoint?Show

      The Web API (custom) skill.

    3. 3.Which setting copies an enrichment to an index field?Show

      An output field mapping.

    4. 4.Which skill reads text from images?Show

      The OCR skill.

    5. 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

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.