feat: enhance citation handling with confidence and match kind#230
feat: enhance citation handling with confidence and match kind#230rkarmaka wants to merge 4 commits into
Conversation
- Updated the citation emission process to include confidence scores and match kinds when a SourceRegistry is attached, allowing the UI to display verification badges. - Modified the API interfaces and internal state management to accommodate the new citation attributes. - Added tests to ensure proper handling of confidence and match kind in citation updates. - Implemented a confidence threshold in the DeepResearcherAgent to filter citations based on their strength before inclusion in reports. This change improves the user experience by providing clearer insights into citation validity and enhances the overall citation verification process. Signed-off-by: Ranit Karmakar <rkarmaka@mtu.edu>
b556739 to
aac7b3c
Compare
Greptile SummaryThis PR wires citation confidence scores and match strategies (
Confidence Score: 3/5Not safe to merge — citation verification crashes at runtime for any report that has a references section. The refactoring in verify_citations removed the valid_citations and removed_citations local variable initializations, but the dedup block that iterates src/aiq_agent/common/citation_verification.py — lines 1008-1044 (dedup block) reference variables removed by this PR. Important Files Changed
|
- Updated the `citation_passthrough_threshold` documentation to specify its role in marking citations as verified in the UI, rather than filtering them from the report. - Adjusted the `verify_citations` function to ensure that only unresolved citations are stripped from the report, allowing all resolved citations to remain and carry their confidence scores. - Enhanced comments throughout the code to improve clarity on citation verification processes and UI interactions. These changes improve the understanding of citation handling and ensure that the UI accurately reflects citation confidence without losing important context in reports.
…tConfig - Updated the documentation for the confidence cutoff parameter to clarify its role in marking citations as verified in the UI. - Improved the explanation of how the threshold affects citation verification without filtering them from the report body. - Ensured that the default value and its implications for citation handling are clearly articulated. These changes aim to provide better guidance on citation confidence settings and their impact on the user interface.
|
Thank you @rkarmaka, we will review this soon |
This change improves the user experience by providing clearer insights into citation validity and enhances the overall citation verification process.