Skip to content
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: make query adapter minimally invasive #16

Merged
merged 3 commits into from
Aug 26, 2024
Merged

feat: make query adapter minimally invasive #16

merged 3 commits into from
Aug 26, 2024

Conversation

lsorber
Copy link
Member

@lsorber lsorber commented Aug 26, 2024

Before this PR, the optimal query adapter could overfit on the provided (q, p, n) triplets. The query adapter overcorrected in that it inverted incorrectly ranked (p, n) pairs, but also affected correctly ranked items.

After this PR, the query adapter is weighted so that it applies only the smallest correction necessary to invert incorrectly ranked (p, n) pairs, without attempting to maximally increase p and decrease n at the expense of other queries.

Additionally, this PR makes the query adapter configurable in the RAGLiteConfig.

@lsorber lsorber self-assigned this Aug 26, 2024
@lsorber lsorber merged commit eba82ce into main Aug 26, 2024
1 check passed
@lsorber lsorber deleted the ls-weighted-qa branch August 26, 2024 11:08
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