Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR improves evidence management in the PQA (Paper Question Answering) system by filtering out irrelevant evidence contexts early and updating the evidence display format for better clarity.
- Filters contexts with score ≤ 0 at collection time instead of repeatedly filtering during processing
- Updates evidence display to use bullet points instead of numbered lists and clarifies scope with "for the current question"
- Removes test code that artificially manipulated context scores with random values
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/paperqa/docs.py | Adds filtering to exclude contexts with score ≤ 0 during evidence collection |
| src/paperqa/agents/tools.py | Updates evidence display format and removes score filtering (now handled upstream) |
| tests/test_paperqa.py | Removes random import and updates tests to work with new evidence filtering behavior |
| tests/test_agents.py | Updates test assertions to expect bullet point format instead of numbered lists |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
jamesbraza
commented
Sep 27, 2025
| top_contexts = "\n".join( | ||
| top_contexts = "\n\n".join( | ||
| [ | ||
| f"{n + 1}. {sc.context}\n" |
Collaborator
Author
There was a problem hiding this comment.
Note there was trailing whitespace here previously, now there's not
whitead
approved these changes
Sep 27, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR clears up some fuzziness in our evidence accounting:
PQASessionBest evidence(s)message for clarity