-
Notifications
You must be signed in to change notification settings - Fork 4.9k
feat: Add extra search index fields to Knowledge Agent response #2696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add extra search index fields to Knowledge Agent response #2696
Conversation
- Fix command to generate HTML report for coverage using `diff-cover` 🛠️
- Introduce ENABLE_AGENTIC_REF_HYDRATION environment variable to control reference hydration behaviour 🌱 - Update Approach classes to accept hydrate_references parameter for managing reference hydration logic 🔧 - Modify document retrieval logic to hydrate references when enabled, improving data completeness 📄
- ✨ Add support for enabling extra field hydration in agentic retrieval - 🔧 Update infrastructure to include new parameter for hydration - 📝 Modify documentation to reflect changes in usage instructions
- 🎉 Introduce ENABLE_AGENTIC_REF_HYDRATION environment variable for configuration - 🧪 Implement mock search results for hydration testing in agentic retrieval - 🔍 Create tests for agentic retrieval with and without hydration enabled - 📜 Ensure hydrated results include additional fields from search results
@microsoft-github-policy-service agree |
Thank you @taylorn-ai for the great contribution! I would like @mattgotteiner from the AI Search team to review this, given his expertise with agentic retrieval. |
I ran black on the files I changed, do you want me to re-run on everything? Or do you want to do that? |
My bad, seems I didn't run |
Apologies, I thought I had updated the test snapshots. Also @pamelafox, FYI, the |
@taylorn-ai Interesting, sometimes that happens when the formatter changes its rules. I do run them locally but I might need to explicitly re-install the pre-commit hooks to see if formatter rules changes/ |
Two of the tests failed due to a network issue, is that common? Seems odd. At least it's not my fault 😀 |
Purpose
As discussed in #2569, adds an optional “agentic reference hydration” feature to agentic retrieval so the app can fetch the full documents for the agent’s references (all index fields, not just the semantic fields). This enables richer source metadata (e.g., sourcefile, category, scores) and more accurate citations, while keeping the legacy behaviour as default.
Key points:
ENABLE_AGENTIC_REF_HYDRATION
(default false).search.in
filter over uniquedoc_key
s.Document
objects fromsource_data
embedded in references.Document
(viasearch_agent_query
) for better observability.results_merge_strategy == "interleaved"
: sorts byreference.id
(ascending) to interleave across activities.doc_key
stop
doc_key
sDoes 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.
Why:
ENABLE_AGENTIC_REF_HYDRATION
which defaults tofalse
.hydrate_references: bool = False
and all call sites updated accordingly.false
; existing environments deploy without change.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.
Type of change
Code quality checklist
See CONTRIBUTING.md for more details.
python -m pytest
).python -m pytest --cov
to verify 100% coverage of added linespython -m mypy
to check for type errorsruff
andblack
manually on my code.