Skip to content

fix: combine rephrased and original queries for reranking#12

Open
ividito wants to merge 1 commit into
mainfrom
fix/dual-query-search
Open

fix: combine rephrased and original queries for reranking#12
ividito wants to merge 1 commit into
mainfrom
fix/dual-query-search

Conversation

@ividito

@ividito ividito commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Some queries get rephrased to a more formal alternative (eg "russia" -> "russian federation") which is less appropriate for trigram similarity scoring. This can lead to correct results falling below the 0.33 threshold for consideration. Using the "russia" example, this allows more localized results like "little russia" or "russian mission, AK" to override the correct results.

This PR will run a search using both iterations of the query, removes duplicate results and combines them both in the reranking agent. This reduces efficiency somewhat, but improves result accuracy.

@ividito ividito requested a review from sunu April 2, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant