Skip to content

Python: Correct Azure AI Search sample setup instructions - #9520

Open
LI (ktz03) wants to merge 1 commit into
microsoft:mainfrom
ktz03:docs/azure-search-sample-setup-20261019
Open

LI (ktz03) wants to merge 1 commit into
microsoft:mainfrom
ktz03:docs/azure-search-sample-setup-20261019

Conversation

@ktz03

Copy link
Copy Markdown
Contributor

Motivation & Context

The Azure AI Search sample guide combines mutually exclusive index_name and knowledge_base_name arguments in its agentic example, which raises SettingNotFoundError during construction. It also lists obsolete script names and constructor options.

Description & Review Guide

  • What are the major changes? Document existing-Knowledge-Base and index-backed setup separately, align parameter names/defaults and Azure CLI credential spelling with the shipped samples, and correct the sample commands and cross-reference.
  • What is the impact of these changes? Only the README and a sample explanatory string change. Five local public-constructor controls cover the exact README calls, both shipped agentic setup calls and the default result limit. The old combined call raises SettingNotFoundError; documented argument names now match the current constructor. Ruff checks and source compilation pass on Windows with cached Azure Search SDK 12.0.0. No full sample, cloud retrieval, model, authentication, preview SDK, package build or full-suite run was performed.
  • What do you want reviewers to focus on? The two supported setup paths and their required arguments match AzureAISearchContextProvider, and the documented commands name files that exist.

Related Issue

N/A - trivial change. These are obvious documentation corrections to match existing public constructors and shipped sample names. Existing Knowledge Base support was added in #2464; this change preserves that behavior and the initialization/sample work in #5021 and #2369.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: Documentation, example verification, and this PR description.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 04:47
@ktz03
LI (ktz03) deployed to github-app-auth October 19, 2026 04:47 — with GitHub Actions Active
@ktz03
LI (ktz03) deployed to github-app-auth October 19, 2026 04:47 — with GitHub Actions Active
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Oct 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The documentation-only corrections match the existing implementation and samples, with no unresolved findings.

No open issues 🎉

What changed in this PR

Corrects Azure AI Search sample documentation to match the existing provider API and shipped examples. No runtime behavior changes.

Changes:

  • Separates existing Knowledge Base and index-backed agentic setup.
  • Corrects parameter names, defaults, authentication guidance, and sample commands.
  • Fixes the semantic sample reference in the agentic sample’s explanatory text.
File Description
python/​samples/​02-agents/​context_providers/​azure_ai_search/​search_context_agentic.py Corrects a filename reference in explanatory text.
python/​samples/​02-agents/​context_providers/​azure_ai_search/​README.md Aligns setup instructions and examples with the current API.

Review effort: Balanced

This branch was successfully deployed

1 active deployment
github-app-auth — 3f403011 Deployed Oct 19, 2026 by ktz03 via team_check #7039
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants