Skip to content

Conversation

mskarlin
Copy link
Collaborator

this was hard coded previously

@mskarlin mskarlin requested review from jamesbraza and Copilot July 25, 2025 18:52
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Jul 25, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR exposes the answer evidence score cutoff as a configurable parameter instead of using a hardcoded value of 0. Previously, the evidence filtering was hardcoded to only include contexts with a score greater than 0.

  • Added evidence_relevance_score_cutoff field to AnswerSettings configuration
  • Updated evidence filtering logic to use the configurable cutoff instead of hardcoded value

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/paperqa/settings.py Adds new evidence_relevance_score_cutoff configuration field with default value of 0
src/paperqa/docs.py Updates filtering logic to use configurable cutoff instead of hardcoded value

@mskarlin mskarlin requested a review from whitead July 25, 2025 19:03
Copy link
Collaborator

@jamesbraza jamesbraza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice feature

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 25, 2025
@mskarlin mskarlin merged commit 2ca6b8f into main Jul 25, 2025
7 checks passed
@mskarlin mskarlin deleted the expose-answer-cutoff-setting branch July 25, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants