-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: don't print relevance score by default #11
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.
👍 Looks good to me! Reviewed everything up to 1aa5797 in 54 seconds
More details
- Looked at
43
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. gptme_rag/cli.py:477
- Draft comment:
Includeprint_relevance
condition here so that relevance is printed only when requested. Consider adding a brief comment explaining that relevance is intentionally hidden by default for LLM processing. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. gptme_rag/cli.py:538
- Draft comment:
Guard the relevance printing in summary view with theprint_relevance
flag. This ensures consistency with the full view update. - Reason this comment was not posted:
Comment looked like it was already resolved.
3. gptme_rag/cli.py:358
- Draft comment:
Good addition of the '--print-relevance' flag. Consider updating the search command's docstring to mention that relevance scores are hidden by default unless this flag is set. - Reason this comment was not posted:
Confidence changes required:0%
None
4. gptme_rag/cli.py:483
- Draft comment:
The condition now checks both 'distances' and 'print_relevance' before printing the relevance score in full format. This meets the intended behavior. - Reason this comment was not posted:
Confidence changes required:0%
None
5. gptme_rag/cli.py:535
- Draft comment:
Similarly, in the summary view the check is updated to ensure relevance is printed only when explicitly requested. This change is consistent with the new flag. - Reason this comment was not posted:
Confidence changes required:0%
None
Workflow ID: wflow_DNii9swN1saNOhBc
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
1aa5797
to
eba8be5
Compare
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.
Looks good, just a nit about parameter naming
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11 +/- ##
==========================================
- Coverage 48.23% 48.16% -0.08%
==========================================
Files 10 10
Lines 1362 1364 +2
==========================================
Hits 657 657
- Misses 705 707 +2 ☔ View full report in Codecov by Sentry. |
For post-processing RAG output with an LLM we don't want to influence the LLM by including the relevance score.
See this PR for the post-processing: ErikBjare/gptme#435
Important
Adds
--print-relevance
flag tosearch
command ingptme_rag/cli.py
to control printing of relevance scores, defaulting to not printing them.--print-relevance
flag tosearch
command ingptme_rag/cli.py
to control printing of relevance scores.--print-relevance
is specified.search()
function to includeprint_relevance
parameter and conditionally print relevance scores inget_expanded_content()
and summary view.This description was created by
for 1aa5797. It will automatically update as commits are pushed.