Skip to content

Conversation

@mattgotteiner
Copy link
Collaborator

@mattgotteiner mattgotteiner commented Nov 18, 2025

Purpose

This PR upgrades the USE_AGENTIC_RETRIEVAL feature to use the new KnowledgeBase functionality from AI Search, which includes agentic reasoning levels (minimum/low/medium) and new sources of SharePoint and Bing. The agentic retrieval docs describe the upgraded feature.

See AI Search docs here:
https://learn.microsoft.com/en-us/azure/search/whats-new

Here's the Copilot summary of changes:

Backend support for agentic retrieval and knowledge bases:

  • Replaces the legacy KnowledgeAgentRetrievalClient with the new KnowledgeBaseRetrievalClient from azure.search.documents.knowledgebases.aio in app/backend/app.py. Adds logic to instantiate and register multiple knowledge base clients (default, with web, with SharePoint, and with both) based on environment variables, enabling flexible source combinations for agentic retrieval. [1] [2]
  • Updates the backend app configuration to use new config keys for knowledge base clients, and sets up the setup_search_info function to accept knowledge base–related parameters. [1] [2] [3]
  • Adds support for new environment variables (USE_AGENTIC_KNOWLEDGEBASE, USE_WEB_SOURCE, USE_SHAREPOINT_SOURCE, AGENTIC_KNOWLEDGEBASE_REASONING_EFFORT) and exposes them to the frontend via the /config endpoint, also adding a new config value for the default retrieval reasoning effort. [1] [2] [3] [4] [5]

Documentation and configuration updates:

  • Updates pipeline and workflow files (.azdo/pipelines/azure-dev.yml, .github/workflows/azure-dev.yml) to include the new environment variables for agentic knowledge base retrieval and source selection. [1] [2] [3] [4]

Other improvements:

  • Updates the sample company in the README.md from "Contoso Electronics" to "Zava" for demonstration purposes.
  • Pins the @lingual/i18n-check npm package to version 0.8.12 in the GitHub workflow due to a current issue with their latest release.

Does this introduce a breaking change?

When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.

Environment variables changes required to keep using agentic retrieval

[X] Yes
[] No

Does this require changes to learn.microsoft.com docs?

This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.

[ ] Yes
[X] No

Type of change

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Code quality checklist

See CONTRIBUTING.md for more details.

  • The current tests all pass (python -m pytest).
  • I added tests that prove my fix is effective or that my feature works
  • I ran python -m pytest --cov to verify 100% coverage of added lines
  • I ran python -m mypy to check for type errors
  • I either used the pre-commit hooks or ran ruff and black manually on my code.

@github-actions
Copy link

Check Broken URLs

We have automatically detected the following broken URLs in your files. Review and fix the paths to resolve this issue.

Check the file paths and associated broken URLs inside them.
For more details, check our Contributing Guide.

File Full Path Issues
data/Zava_Company_Overview.md
#LinkLine Number
1http://www.zava.com/careers46
2http://www.zava.com48

@github-actions
Copy link

Check Broken URLs

We have automatically detected the following broken URLs in your files. Review and fix the paths to resolve this issue.

Check the file paths and associated broken URLs inside them.
For more details, check our Contributing Guide.

File Full Path Issues
data/Zava_Company_Overview.md
#LinkLine Number
1http://www.zava.com/careers46
2http://www.zava.com48

@mattgotteiner mattgotteiner marked this pull request as ready for review November 18, 2025 18:50
@pamelafox pamelafox merged commit 09dd0ef into main Nov 18, 2025
29 checks passed
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.

3 participants