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

Allow reranking nodes retrieved from vector DB #228

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

TamiTakamiya
Copy link
Contributor

Description

We (Ansible Lightspeed Chatbot) are adding supplemental documents that will include what are not explicitly found in the product documentation. When those documents appear in DB search results, we want place them at higher ranks over other documents. For that purpose, we would like to allow reranking of Vector DB search results before truncating them within the token limit.

The "reranker" is defined in the "custom" directory so that each product can define its own reranker. The efault implementation does nothing and returns the given search results as they are.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

@TamiTakamiya TamiTakamiya marked this pull request as ready for review December 28, 2024 17:56
Copy link
Collaborator

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

it looks ok. Later we might use a plugin system, the same way as history cache or auth modules.

@TamiTakamiya TamiTakamiya force-pushed the TamiTakamiya/reranker branch from 1ce998b to 119d235 Compare January 2, 2025 13:02
@TamiTakamiya
Copy link
Contributor Author

@tisnik Thanks for your review. I have rebased, resolved a conflict and fixed a lint error. Would you merge this into the main branch if it looks ok? Thanks!

@tisnik tisnik merged commit 3faebfa into road-core:main Jan 2, 2025
8 checks passed
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.

2 participants