-
Notifications
You must be signed in to change notification settings - Fork 242
fix: fix for citation numbers displayed in the response do not match the referenced links #752
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Fixes mismatches between citation numbers shown in agent answers and the corresponding referenced links by tightening citation-marker handling and adjusting agent configuration.
Changes:
- Reworked citation-marker remapping in
ChatWithDataPlugin.get_call_insights()to renumber markers sequentially and filter citations to only those used. - Updated
ConversationAgentFactoryinstructions to discourage citation normalization and to omit citations when responding from conversation history without tools. - Set a non-zero
temperaturefor the search agent to increase response variability.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/api/plugins/chat_with_data_plugin.py |
Adds citation-marker remapping + citation list filtering/reordering logic for search answers. |
src/api/agents/search_agent_factory.py |
Sets temperature=0.7 when creating the Azure AI Search agent. |
src/api/agents/conversation_agent_factory.py |
Refines agent instructions around citation handling and when to omit citations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…d maintain citation order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…allDetails directly
Purpose
This pull request primarily updates how citation markers are handled and formatted in agent responses, ensuring stricter adherence to source data and improving the mapping and filtering of citations. It also introduces a temperature parameter for search agents to control response variability.
Citation handling and formatting improvements:
agent_instructionsinconversation_agent_factory.pyto clarify that citation markers and the citations list must not be modified, normalized, or simplified, and that only the plugin is responsible for their formatting and content. Added instructions for omitting citations when using conversation history without tools/plugins.chat_with_data_plugin.py, replaced the previous citation marker conversion logic with a new mapping system that assigns sequential indices to citation markers as they appear, ensuring that only used citations are included and reordered accordingly in the final response. [1] [2]Agent configuration:
temperature=0.7parameter when creating agents insearch_agent_factory.pyto control the randomness of generated responses.Does this introduce a breaking change?
Golden Path Validation
Deployment Validation