Skip to content

Fix Foundry IQ cookbooks: upgrade to azure-search-documents 12.1.0b1 (#44, #5)#50

Merged
farzad528 merged 1 commit into
mainfrom
farzad528/fix-foundry-iq-cookbooks
May 30, 2026
Merged

Fix Foundry IQ cookbooks: upgrade to azure-search-documents 12.1.0b1 (#44, #5)#50
farzad528 merged 1 commit into
mainfrom
farzad528/fix-foundry-iq-cookbooks

Conversation

@farzad528
Copy link
Copy Markdown
Collaborator

@farzad528 farzad528 commented May 29, 2026

Summary

Maintenance pass on the Foundry IQ cookbook series that upgrades the SDK and fixes the two open technical issues. All three notebooks were run end-to-end against live Azure on the new SDK version before opening this PR.

What changed

1. SDK upgrade to azure-search-documents==12.1.0b1

Bumped from the old 11.7.0b2 beta to 12.1.0b1, the latest PyPI release that still supports the preview agentic-retrieval surface the cookbooks are built on.

Note: GA 12.0.0 is intentionally not used. Its KnowledgeBaseRetrievalRequest is intents-only (no messages / retrieval_reasoning_effort), which would break every episode. 12.1.0b1 is the correct upgrade target.

Updated in all 3 notebooks + 3 cookbook READMEs.

2. Fix KnowledgeRetrievalOutputMode import (all 3 episodes)

This enum moved from azure.search.documents.indexes.models to azure.search.documents.knowledgebases.models in 12.1.0b1. Relocated the import in all notebooks and in cookbook.instructions.md.

3. Fix minimal reasoning-effort retrieval - Closes #44

The minimal reasoning effort rejects messages input with:

Messages input not supported when 'minimal' reasoning effort is requested. Use intents input instead.

Episode 3 now uses intents=[KnowledgeRetrievalSemanticIntent(search=...)] for minimal effort (Step 2 and the Step 5 comparison loop), while low / medium / high keep using messages.

4. Harden agent + MCP troubleshooting docs - addresses #5

Episode 1 gains a Troubleshooting the agent + MCP connection callout covering the masked 401 / 405 tool-enumeration errors: required RBAC roles, keeping FOUNDRY_PROJECT_ENDPOINT / FOUNDRY_PROJECT_RESOURCE_ID on the same project, the AOAI base-endpoint format, and using a direct retrieve call to isolate search vs. agent auth.

Validation

Episode Result
1 - Unlocking Knowledge (incl. agent/MCP) Pass - agent returned a cited answer; resources created + cleaned up
2 - Building the Data Pipeline Pass - indexed + web sources, retrieval complete
3 - Querying Multi-Source KBs Pass - all reasoning efforts incl. minimal-intents (#44) fix

Closes #44
Refs #5

Upgrade the Foundry IQ cookbook series from the 11.7.0b2 beta to 12.1.0b1, the latest PyPI release that still supports the preview agentic-retrieval surface (the GA 12.0.0 retrieval request is intents-only and would break the series).

Changes:
- Bump azure-search-documents to 12.1.0b1 in all three notebooks and READMEs.
- Relocate the KnowledgeRetrievalOutputMode import to azure.search.documents.knowledgebases.models (it moved out of indexes.models in 12.1.0b1); update cookbook.instructions.md accordingly.
- Episode 3: fix the minimal reasoning-effort retrieval, which the service rejects with 'Messages input not supported when minimal reasoning effort is requested. Use intents input instead.' Minimal effort now uses intents=[KnowledgeRetrievalSemanticIntent(search=...)] in Step 2 and the Step 5 comparison loop. Fixes #44.
- Episode 1: add a troubleshooting callout for the Foundry Agent + Search KB MCP integration (masked 401/405), covering RBAC roles, project alignment, AOAI base-endpoint format, and direct-retrieve isolation. Addresses #5.

All three notebooks were run end-to-end against live Azure on 12.1.0b1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Foundry IQ cookbook series for azure-search-documents==12.1.0b1, aligning notebook code and cookbook guidance with the SDK’s updated agentic retrieval APIs and fixing the minimal reasoning-effort example from #44.

Changes:

  • Upgrades cookbook install instructions and notebook %pip install cells to azure-search-documents==12.1.0b1.
  • Moves KnowledgeRetrievalOutputMode imports to azure.search.documents.knowledgebases.models.
  • Updates Episode 3 minimal reasoning retrieval to use intents and adds Episode 1 MCP troubleshooting guidance.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Foundry-IQ/1-Foundry-IQ-Unlocking-Knowledge-for-Agents/cookbook/README.md Updates Episode 1 dependency install command.
Foundry-IQ/1-Foundry-IQ-Unlocking-Knowledge-for-Agents/cookbook/foundry-iq-cookbook.ipynb Updates SDK pin/imports and adds agent/MCP troubleshooting documentation.
Foundry-IQ/2-Foundry-IQ-Building-the-Data-Pipeline-with-Knowledge-Sources/cookbook/README.md Updates Episode 2 dependency install command.
Foundry-IQ/2-Foundry-IQ-Building-the-Data-Pipeline-with-Knowledge-Sources/cookbook/foundry-iq-cookbook.ipynb Updates SDK pin and moved enum import.
Foundry-IQ/3-Foundry-IQ-Querying-the-Multi-Source-AI-Knowledge-Bases/cookbook/README.md Updates Episode 3 dependency install command.
Foundry-IQ/3-Foundry-IQ-Querying-the-Multi-Source-AI-Knowledge-Bases/cookbook/foundry-iq-cookbook.ipynb Updates SDK pin/imports and switches minimal reasoning requests to semantic intents.
.github/instructions/cookbook.instructions.md Updates cookbook package guidance and knowledge base import example.

@farzad528 farzad528 merged commit a5c02a8 into main May 30, 2026
2 checks passed
@farzad528 farzad528 deleted the farzad528/fix-foundry-iq-cookbooks branch May 30, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question: Is the non-working minimal retrieval example intentional in Episode 3 cookbook?

2 participants