Your profile

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

Lesson 35 of 39
❮Prev Next❯

Ingest and Index Content for RAG

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

    To ingest content for RAG, an Azure AI Search (Foundry IQ) indexer reads files from a data source such as Blob Storage, runs a skillset (OCR, Text Split, an embedding model) and writes one search document per chunk into an index. Scanned pages only become searchable when the OCR skill receives images (imageAction: generateNormalizedImages). Use a managed identity for access, a schedule to keep the index current, and reset the indexer when you change the pipeline. Audio and video are analysed first (for example with Content Understanding), then their text is indexed.

    Simulate it » No Azure account needed

    Exam objective: 5.1.1 Ingest and index content, such as documents, images, audio and video. 5.1.4 Configure RAG ingestion flow, including documents and OCR. (Skills measured as of April 16, 2026)

    Simulations

    Feel it before you read it. No account needed, nothing leaves this page.

    Azure portal: Index policy documents with the Import data (new) wizard Create a search service, a data source, an index, a skillset and an indexer.
    </> Embed

    Embed this simulation

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

    Loading the portal…

    Open your <strong>Azure AI Search</strong> service. (Microsoft now calls the service <strong>Foundry IQ</strong> in agent scenarios; the Azure resource is still a *Search service*.)

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Open your Azure AI Search service. (Microsoft now calls the service Foundry IQ in agent scenarios; the Azure resource is still a Search service.)
    2. Type srch-agt-kb01 in the search bar and pick srch-agt-kb01 under Services.
    3. On the Overview page select Import data (new).
    4. Point at the blob container with your files. Use the search service's managed identity so there are no keys to leak. It needs Storage Blob Data Reader on the account.
    5. Turn on Vectorize your text. The wizard adds Text Split (chunking) and an embedding skill, and adds a vectorizer to the index so queries are embedded for you.
    6. Switch on OCR so the scanned claim form and text inside diagrams become searchable. Image description and image vectors are optional extras that cost more.
    7. Enable the semantic ranker configuration now, and choose a schedule. A schedule keeps the index current as files change.
    8. The review shows the four objects the wizard builds: a data source, a skillset, an index and an indexer. Select Create.
    9. On Indexers you see each run: documents succeeded, documents failed and errors. Four files went in. Open a run to read warnings, such as a scanned page the pipeline couldn't read.
    10. Four files became seven documents: one per chunk. Each chunk is its own search document, so a citation can point at the exact passage.

    🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.

    😟 THE PROBLEM

    Half the company PDFs are scans, so the search finds nothing in them, and re-indexing everything takes all night.

    😊 THE SOLUTION

    Run an indexer with a skillset: OCR for images, Text Split for chunks, an embedding model for vectors.

    • Scanned pages with no searchable text✓ OCR skill with imageAction set to generateNormalizedImages
    • A 200-page PDF is one giant result✓ Text Split chunks, one search document per chunk
    • Full re-index on every change✓ Blob change detection and a schedule
    🛠️ Solved with: Azure AI Search indexers and skillsets

    Start with a question

    Half of Contoso's policies are scanned PDFs. How do you make them searchable for an AI agent without retyping anything?

    Think of a library that receives boxes of paper. Someone has to open each box, read what’s inside, split a long report into chapters, write a card for every chapter and put the cards in the catalogue. If a page is a photograph of text, somebody has to read the photo first.

    In Azure AI Search that person is the indexer. The reading glasses are the OCR skill. The chapter splitting is Text Split. The catalogue is the index, and every chapter gets its own card, a chunk.

    Explain it like I’m 10

    The technical explanation

    RAG (retrieval-augmented generation) only works as well as the index behind it. Azure AI Search (Microsoft calls it Foundry IQ when agents use it) builds that index with a pipeline of four objects.

    The four objects

    ObjectWhat it holds
    Data sourceWhere the files are (a Blob Storage container, for example) and the identity used to read them.
    IndexThe fields: a key, a title, the chunk text, a text_vector field, and optional semantic settings.
    SkillsetThe enrichment steps: OCR, Text Split, an embedding skill, and any others you add.
    IndexerRuns the pipeline: crack the file, run the skills, map the output, write documents.

    You can create them in the portal with the Import data (new) wizard, with the Python SDK (azure-search-documents), or with the REST API.

    From file to chunks

    1. Document cracking. The indexer opens PDFs, Office files and images and pulls out text, metadata and (if you ask) images.
    2. OCR. If imageAction is generateNormalizedImages, the extracted images go to the OCR skill. A scanned page is only an image, so without this step it has no text at all.
    3. Text Split. The text is cut into chunks (for example 2,000 characters with a 500 character overlap) so each passage stays focused.
    4. Embedding. The Azure OpenAI embedding skill calls your embedding deployment, such as text-embedding-3-small, and returns a vector for each chunk.
    5. Index projections. One search document per chunk, with a parent_id that points back to the file.
    indexers.create_or_update_indexer(SearchIndexer(
        name="ixr-policies", data_source_name="ds-policies",
        target_index_name="policies-idx", skillset_name="ss-policies",
        parameters=IndexingParameters(configuration={
            "dataToExtract": "contentAndMetadata",
            "imageAction": "generateNormalizedImages"})))   # without this, OCR sees nothing

    This is integrated vectorization: chunking and embedding happen inside the pipeline, and a vectorizer on the index embeds the user’s question at query time with the same model. If you embed documents with one model and queries with another, the vectors don’t line up and results turn to noise.

    Access without keys

    Give the search service a system-assigned managed identity, then assign it Storage Blob Data Reader on the storage account. The data source then uses the identity instead of a connection string. If you forget the role, the indexer fails with a 403.

    Keeping the index current

    For blobs, change detection is built in: a scheduled run reads only new and changed files. Two cases need care:

    • Deleted files. Turn on a deletion policy (such as soft delete) so removed blobs leave the index.
    • Pipeline changes. If you change the skillset, chunk size or imageAction, unchanged files are still skipped. Reset the indexer so every document is processed again. Enrichment caching stops you paying twice for skills whose input didn’t change.

    What about images, audio and video?

    ContentHow it gets in
    PDFs and Office filesDocument cracking, then Text Split and embeddings
    Scanned pages and imagesOCR skill with imageAction; optionally image description with a model or multimodal embeddings
    Audio and videoAnalyse first with Content Understanding (transcripts, segments, summaries) or Azure Speech, then index the text
    1. 1 Crack

      The indexer opens the file and extracts text and images.

    2. 2 Read

      The OCR skill reads text from the images.

    3. 3 Split

      Text Split cuts the content into chunks.

    4. 4 Embed

      The embedding skill creates a vector for each chunk.

    5. 5 Project

      Each chunk becomes a search document linked to its file.

    From a blob to a searchable chunk
    Architect level Push or pull?

    An indexer is the pull model: the service reads from a supported source on a schedule. The push model means your own code calls the index API to upload JSON documents, which is the only option for sources an indexer doesn’t support, and it gives you full control of timing.

    Push has no skillset. If you need chunking or embeddings, you do them yourself before you upload, or you land the files in Blob Storage and use an indexer. Many teams do exactly that: a small job analyses audio or video, writes the Markdown transcript to Blob Storage, and the normal indexer picks it up.

    Also check the limits of your tier: the number of indexes, indexers and skillsets, and the maximum time one indexer run can take, before you plan a very large first load.

    Real-world business scenario

    Insurance

    Contoso Insurance (fictional)

    The problem
    Claims handlers searched 30,000 policy PDFs and scanned forms by file name. A third of the files were scans, so full-text search never saw their content.
    What they used
    A blob container with every file, an Azure AI Search indexer that uses the service's managed identity, and a skillset with OCR, Text Split and the text-embedding-3-small skill. Index projections write one document per chunk, and the indexer runs nightly.
    Why that choice
    OCR makes scans searchable, chunks keep results precise and citeable, and change detection means only the files edited that day are read again.
    The result
    Handlers find the right clause in seconds, and the claims agent can cite the exact passage and file it used.

    When to use it and when not to

    ✓ Use it when…

    • You need an agent or app to answer from a large body of documents with citations.
    • Your files include scans or images with text, and you want that text searchable.
    • Content changes regularly and you want the index to follow it on a schedule.

    ✕ Think twice when…

    • You only need to look up a few records by key. A database query is simpler.
    • A file is uploaded by a user for this conversation only. File search on the agent fits better than a pipeline.
    • You need typed fields from each document, such as invoice totals. Use Content Understanding for that.

    ↔ Alternatives to consider

    • Push model with the SDK when the source has no indexer.
    • Content Understanding to turn files into Markdown and fields before indexing.
    • File search in the agent for one-off uploads.
    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

    You index PDFs from Azure Blob Storage with an Azure AI Search indexer and a skillset that includes the OCR skill. Scanned PDFs still return no text. What should you configure?

    Question 2

    Question 2 of 5

    A RAG index must return individual passages from 200-page PDFs, each linked to its source file. Which combination should you use in the skillset?

    Question 3

    Question 3 of 5

    An indexer must read a blob container without storing a connection string or key. Which two actions are required?

    Question 4

    Question 4 of 5

    You change the chunk size in the Text Split skill. After the next scheduled run the index still contains the old chunks. What should you do?

    Question 5

    Question 5 of 5 · Select 2

    You must make recorded support calls searchable in Azure AI Search. Which two approaches meet the requirement?

    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 does an indexer do in Azure AI Search?

    Model answer

    It pulls content from a data source, optionally enriches it with a skillset, and writes the result into a search index. You schedule it or run it on demand, and for blobs it only re-reads files that changed.

    Intermediate Why are chunks stored as separate search documents in a RAG index?

    Model answer

    A model can only read a limited amount of context, and a whole 200-page PDF is a poor search result. Chunks are small enough to rank, embed and cite precisely, and the parent key links each one back to the file.

    Interviewer follows up

    How do you produce one search document per chunk?

    You

    Add a Text Split skill, then use an index projection in the skillset so each chunk is written as its own document with a parent_id.

    Experienced developer Scanned PDFs in your container return no results. What do you check?

    Model answer

    Whether the skillset has an OCR skill and whether the indexer's imageAction is generateNormalizedImages. Without images the OCR skill has nothing to read. I'd also check the indexer's execution history for warnings, then reset and rerun after the fix.

    Scenario You changed the chunk size in the Text Split skill, but the index still shows the old chunks. Why?

    Model answer

    The indexer remembers which blobs it has processed, so unchanged files are skipped. I'd reset the indexer so it reprocesses every document, or turn on enrichment caching to avoid paying again for skills whose inputs didn't change.

    Architecture & design How would you design ingestion for 40,000 PDFs, scans and call recordings?

    Model answer

    Put PDFs and scans in Blob Storage and index them with a skillset that has OCR, Text Split and embeddings, using the search service's managed identity and a schedule. For recordings I'd analyse them with Content Understanding or Azure Speech first and index the transcripts, because indexers don't transcribe audio themselves.

    Quick revision

    Key points

    • An indexer needs a data source and an index. A skillset is optional but is where OCR, chunking and embeddings happen.
    • Chunk the text, then give each chunk its own search document with an index projection.
    • OCR needs imageAction = generateNormalizedImages, otherwise scans yield no text.
    • Use the search service's managed identity and Storage Blob Data Reader instead of connection strings.
    • Blob change detection is automatic. Reset the indexer after changing the skillset or settings.
    • Audio and video are analysed first (Content Understanding or Speech) and their text is indexed.

    Important terminology

    Indexer
    A crawler in the search service that reads a data source, runs an optional skillset and writes documents into an index.
    Data source
    The connection to where the files live, such as an Azure Blob Storage container, with the identity used to read it.
    Skillset
    An ordered set of skills (OCR, Text Split, embeddings, PII detection and others) that enrich each document during indexing.
    Chunk
    A passage of a document, typically a few thousand characters with some overlap, that becomes its own search document.
    Index projection
    A skillset setting that writes one search document per chunk (child) and links each back to its source file (parent) with a key.
    imageAction
    An indexer setting that tells document cracking to extract images. generateNormalizedImages makes images available to the OCR skill.
    Integrated vectorization
    Chunking and embedding handled inside the indexer pipeline, with a vectorizer on the index that embeds queries at query time.

    Common mistakes

    • Forgetting imageAction, so scanned files are silently empty.
    • Changing a skillset and expecting old documents to update without a reset.
    • Embedding documents with one model and querying with another.

    Exam tips

    • "Scanned documents are not searchable" = OCR skill plus generateNormalizedImages.
    • "One search result per passage" = Text Split plus index projections.
    • "No keys in the pipeline" = managed identity on the search service with a data role.

    Five quick revision questions

    1. 1.Which object ties a data source, a skillset and an index together?Show

      The indexer.

    2. 2.Which indexer setting hands images to the OCR skill?Show

      imageAction set to generateNormalizedImages.

    3. 3.What do you do after changing a skillset so old files are reprocessed?Show

      Reset the indexer, then run it.

    4. 4.Which skill turns long text into passages?Show

      The Text Split skill.

    5. 5.How do you make each chunk its own search document?Show

      Use an index projection in the skillset.

    Official references

    Finished this lesson? Tick it off. Your progress is saved in this browser.

    Next up: Semantic, Hybrid and Vector Search

    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.