Skip to content

Stage 6, Foundry IQ ​

Preview notice

This stage uses the Azure AI Search preview API 2026-08-01-preview for grounded answer synthesis. Knowledge sources and knowledge bases (extractive retrieval) are generally available on 2026-04-01; the natural-language synthesized-and-cited answer output is preview only. The portal experience for agentic retrieval is preview as well. Everything in Stages 0 to 5 is GA.

At a glance ​

Start stateEnd stateFallback baseline
A search-ready indexA knowledge base answering grounded, cited questionsStage 6 knowledge source + knowledge base

Learning goals ​

  • Create a knowledge source over your Search content.
  • Create a knowledge base that runs agentic retrieval and returns grounded, cited answers.
  • Ask multi-record questions and trace each answer back to source records.

Why it matters ​

This is the payoff. Instead of a list of hits, you ask a question in plain language and get a grounded answer with citations back to the corporate records: "what keeps causing printer complaints, and who resolves them?"

What you will build ​

A knowledge source tNN-pNN-corporate-knowledge-source over your Search content and a knowledge base tNN-pNN-corporate-kb that answers questions with citations. The base search-ready index from Stages 2 to 4 is enough; the Stage 5 enrichment fields make grounding richer but are not required, so you can reach Foundry IQ even if you deferred enrichment.

Knowledge-share outline ​

  1. Knowledge source: a reusable pointer to searchable content (here, your Search index) plus the fields to ground on.
  2. Knowledge base: the top-level object that orchestrates agentic retrieval over one or more knowledge sources.
  3. The retrieval pipeline: query planning, retrieval, semantic reranking, and (in the preview finale) grounded answer synthesis with citations.

Concepts ​

  • Knowledge source. A top-level, reusable object that points at content. A search index knowledge source wraps your existing index and names the fields to search and return.
  • Knowledge base. A top-level object that connects one or more knowledge sources and defines the default retrieval behavior. At query time you call its retrieve action.
  • Agentic retrieval. Rather than a single query, the knowledge base plans how to answer:
    • Query planning breaks a multi-part question into focused subqueries.
    • Retrieval runs those subqueries against the knowledge source content.
    • Semantic reranking reorders candidate passages by meaning, using the semantic configuration on your index.
    • Grounded answers with citations assemble the result and, in the preview finale, synthesize a natural-language answer that cites the exact records it used.
  • Managed identity. The knowledge base reaches the shared model through the Search service managed identity (Cognitive Services User on the Foundry resource). No key, no endpoint secret.

Lab steps ​

Work in the Azure portal (or its agentic-retrieval REST calls) on your own Search service.

1. Create the knowledge source ​

On your Search service:

  1. Select Agentic retrieval > Knowledge sources in the left-hand navigation.
  2. Select + Add knowledge source > Add knowledge source.
  3. Select Search index for the kind.
  4. Name it tNN-pNN-corporate-knowledge-source.
  5. Select tNN-pNN-corporate-index as the search index.
  6. Switch to the Advanced configuration tab. Under semantic configuration, pick your existing corporate-semantic configuration from the dropdown, don't let the panel create a new one (it defaults to auto-generating one named something like search-<timestamp>-semantic-configuration, which has no prioritized content fields set and causes every retrieve call to come back empty; see Troubleshooting if this happens to you). Under Source data fields (the fields returned in citations), select recordId, recordType, branch, department, date, subject, and content. Under Search fields, select subject and content (the fields agentic retrieval searches).
  7. Select Create. The portal creates the knowledge source and immediately drops you into the Add knowledge base panel, so continue straight into the next step instead of navigating back to Knowledge sources.

This is the definition the wizard writes:

json
{
  "name": "tNN-pNN-corporate-knowledge-source",
  "kind": "searchIndex",
  "searchIndexParameters": {
    "searchIndexName": "tNN-pNN-corporate-index",
    "semanticConfigurationName": "corporate-semantic",
    "searchFields": [ { "name": "subject" }, { "name": "content" } ],
    "sourceDataFields": [
      { "name": "recordId" }, { "name": "recordType" }, { "name": "branch" },
      { "name": "department" }, { "name": "date" }, { "name": "subject" }, { "name": "content" }
    ]
  }
}

Reference copy: definitions/knowledge-source.template.json, on the generally available 2026-04-01 API version.

2. Create the knowledge base (generally available, extractive) ​

You should already be in the Add knowledge base panel the previous step opened, with tNN-pNN-corporate-knowledge-source pre-selected as its knowledge source. If you navigated away, reopen it from Agentic retrieval > Knowledge bases > + Add knowledge base > Add knowledge base, then select your knowledge source manually.

  1. Name it tNN-pNN-corporate-kb.
  2. Confirm tNN-pNN-corporate-knowledge-source is selected under Knowledge sources.
  3. Set Reasoning effort to Minimal and leave Chat completion model unset. With no model attached, minimal reasoning effort disables LLM-based query planning, keeping this knowledge base on the generally available, extractive-only path: grounded, cited passages with no LLM involved.
  4. Select Save (or Create knowledge base).

This is the definition the wizard writes:

json
{
  "name": "tNN-pNN-corporate-kb",
  "knowledgeSources": [ { "name": "tNN-pNN-corporate-knowledge-source" } ],
  "retrievalReasoningEffort": { "kind": "minimal" }
}

retrievalReasoningEffort is the Reasoning effort control in the form. minimal with no model attached is what keeps this knowledge base on the generally available, extractive path; step 4 raises it to low when it attaches a model.

Reference copy: definitions/knowledge-base.template.json.

3. Ask a multi-record question in the playground ​

Your knowledge base answers through its retrieve action, and the portal gives you that action as a chat-style playground. You do not need a REST client.

  1. Open Agentic retrieval > Knowledge bases and select tNN-pNN-corporate-kb.
  2. Select Open in playground (on some portal builds it is the Playground tab on the knowledge base itself).
  3. Type your question in the message box and send it.
  4. Expand References (or Activity) under the response to see the retrieved passages and the record each one came from.

Start with the printer theme:

What keeps causing printer complaints across the branches, and who resolves them?

Agentic retrieval plans subqueries, retrieves matching records from across several branches, reranks them, and returns grounded passages. Each passage cites the record it came from (recordId and subject), so you can trace every claim.

At this point the response is extractive: the exact passages from your archive, ranked and cited, with no model rewriting them. That is the generally available behaviour, and it is worth looking at before you turn on synthesis, because it is the evidence the written answer in step 5 will be built from.

Now ask a question that combines a theme with people and places:

Which fire-safety problems were reported, and which employees and branches were involved?

The result draws on more than one fire-safety record, naming the employees and branches involved and citing each source record.

Nothing comes back?

Open Activity and look at searchIndexArguments.semanticConfigurationName. If it is not corporate-semantic, the knowledge source picked up the wizard's auto-generated configuration and every passage is being filtered out by the reranker threshold. See Troubleshooting below; it is the most common failure on this page.

4. Turn on answer synthesis (preview finale) ​

Preview finale

The steps above are generally available on 2026-04-01 and return grounded, cited passages. The synthesized natural-language answer below uses the preview API 2026-08-01-preview. Apply it only for this finale.

To turn the cited passages into a written answer, update your knowledge base to the preview synthesis variant and call retrieve with the preview API version. The portal's own model picker only browses Foundry projects in your own subscription, and the shared Foundry resource used by this workshop is not one of them, so apply the variant directly as JSON instead of through Add model deployment:

  1. Open your knowledge base tNN-pNN-corporate-kb (Agentic retrieval > Knowledge bases).

  2. Select Edit knowledge base (JSON).

  3. In the existing definition, set "outputMode": "answerSynthesis" and add the models array below. All three values are shared across the room. Check them against the Session values page and replace any placeholders before you paste. The next warning explains the most common way this step fails:

    PropertyWhat it isThis session
    resourceUriThe shared Foundry endpoint, the same for every attendee.See Session values
    deploymentIdWhat the deployment is called.gpt-workshop
    modelNameThe base model underneath it.gpt-4o-mini

    deploymentId and modelName are not the same string

    The API validates modelName against a fixed list of base model names and rejects anything else, including a deployment name. Putting the deployment name in both fields is the most common Stage 6 error, and it reports as Unsupported model type in Knowledge Base Model Configuration.

json
"outputMode": "answerSynthesis",
"models": [
  {
    "kind": "azureOpenAI",
    "azureOpenAIParameters": {
      "resourceUri": "https://aif-dmsearch-xxxxxx.services.ai.azure.com/",
      "deploymentId": "gpt-workshop",
      "modelName": "gpt-4o-mini"
    }
  }
]
  1. Set Reasoning effort to Low. Stage 6 step 2 set it to Minimal to keep the GA knowledge base extractive-only, but minimal reasoning effort disables LLM processing entirely, which is incompatible with answer synthesis now that a model is attached.
  2. Select Save. The model reference is reached through the Search service's own managed identity, so no key is added here either.

Reference copy: definitions/knowledge-base-synthesis.template.json, pinned to 2026-08-01-preview.

Go back to the playground and ask the printer question again. Now you get a written answer summarizing the recurring causes and who typically resolves them across the branches involved, followed by citations to the exact records used.

Read the citations and confirm each sentence traces to a real archive record. That traceability is the whole point: the model is not recalling anything about Dunder Mifflin, it is summarizing passages your own index returned.

Expected output ​

  • The knowledge source lists as kind searchIndex over your index.
  • The extractive knowledge base returns grounded passages with recordId and subject citations for both the printer and fire-safety questions.
  • The preview synthesis variant returns a written answer plus citations you can trace to source records.

Checkpoint ​

foundry-iq-ready: Your knowledge base answers a multi-record question about the archive with citations you can trace to source records (for example, the recurring cause of printer complaints and who resolves them, or the fire-safety problems with the employees and branches involved).

Fallback baseline ​

Both objects are small, so the portal fallback is two pastes under your own namespace:

  1. Agentic retrieval > Knowledge sources > + Add knowledge source, then paste the definition from baseline/6/knowledge-source.json, replacing {{namespace}} with your tNN-pNN.
  2. Agentic retrieval > Knowledge bases > + Add knowledge base, then paste the definition from baseline/6/knowledge-base.json.

For the synthesis finale, apply baseline/6/knowledge-base-synthesis.json instead of the plain knowledge base, filling in the Foundry endpoint (see the Session values page, for example https://aif-dmsearch-xxxxxx.services.ai.azure.com/), the deployment name (gpt-workshop), and the base model name (gpt-4o-mini), and switching the editor to 2026-08-01-preview.

Emergency only: the catch-up script

If the portal is fighting you and a facilitator is helping, the same objects can be restored from a shell. This is the backstop, not the expected path, and it needs the repo and an az login:

./infra/search-workshop/scripts/workshop.ps1 baseline apply 6
./infra/search-workshop/scripts/workshop.ps1 baseline apply 6 -Variant synthesis

The synthesis variant is opt-in precisely so that the second command does not get undone by the first. Both need -FoundryEndpoint, -ModelDeploymentName, and -ModelName (or the matching SEARCH_WORKSHOP_* environment variables); the script refuses to run rather than push blank values.

Troubleshooting ​

  • Retrieve returns nothing. Confirm the knowledge source names your index and the corporate-semantic configuration, and that the index actually has documents.
  • Retrieve returns count: 0 with a warning that documents were filtered by the reranker score threshold. Check the activity log's searchIndexArguments.semanticConfigurationName. If it reads something like search-<timestamp>-semantic-configuration instead of corporate-semantic, the knowledge source's Advanced configuration created a brand-new, empty semantic configuration on your index instead of reusing yours (it has no prioritizedContentFields, so nothing ever scores high enough to pass the threshold). Fix it by editing the knowledge source (or its JSON) so semanticConfigurationName is corporate-semantic, or delete and recreate it, picking your existing configuration from the dropdown instead of leaving it on its default.
  • Access or Cognitive Services errors on the synthesis variant. The Search service managed identity needs Cognitive Services User on the shared Foundry resource (the workshop grants this), and the service must be Basic tier or higher for managed-identity model access.
  • Model deployment mismatch. deploymentId must be gpt-workshop (the chat deployment name) and modelName must be gpt-4o-mini (the base model behind it), not the deployment name in both. apiError: Unsupported model type in Knowledge Base Model Configuration means modelName is wrong.
  • The playground is missing on your knowledge base. Agentic retrieval's portal experience is preview and the entry point moves between portal builds. Look for Open in playground on the knowledge base, or a Playground tab. If you cannot find it, ask your facilitator to demonstrate; the checkpoint is about seeing grounded, cited answers, not about a particular button.
  • Preview features rejected. Answer synthesis requires the 2026-08-01-preview API version; the generally available 2026-04-01 version returns extractive results only.

What we will not cover ​

  • Building a full Foundry Agent Service agent; this stage stays on the Search knowledge base and its retrieve action.
  • Web or blob knowledge sources; this stage grounds on your own Search index only.