fix(retrieval): resolve multiple bugs in retrieval.py (Fixes #74)#97
Conversation
QuantumByte-01
left a comment
There was a problem hiding this comment.
Two issues to fix before this can be merged:
1. Revert BQ_LOCATION default — keep "EU"
The change from "EU" to "US" is incorrect for this deployment. Please revert that line.
2. Remove the reranking/query expansion code from ks_search_tool.py
This PR adds rerank_results_using_metadata(), expand_query(), and QUERY_SYNONYMS to ks_search_tool.py. That feature belongs in PR #94, not here. A bug-fix PR should not bundle a new scoring feature.
Additionally, the ks_search_tool.py additions in this PR still use print() instead of logging, which directly conflicts with PR #98's logging changes (both PRs modify the same file from the same base commit).
The retrieval.py changes (dead code removal, BQ timeout, -float(dist) comment, other_links fix) are all correct once the BQ_LOCATION revert is applied — please keep those.
|
All requested changes have been applied!
The original retrieval bug fixes remain untouched. Could you please take another look? |
Summary
This PR fixes the multiple issues identified in Issue #74 regarding
retrieval.py.Changes Made:
qtextbranch.timeout=10tobq.query(...).result().-float(dist)(Vertex AI L2 distance).BQ_LOCATIONdefault value to"US".Proof of Tests Passing
Fixes #74