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

DocChatAgent: Add fusion ranking when re-ranker is not used #487

Open
pchalasani opened this issue Jun 1, 2024 · 0 comments
Open

DocChatAgent: Add fusion ranking when re-ranker is not used #487

pchalasani opened this issue Jun 1, 2024 · 0 comments

Comments

@pchalasani
Copy link
Contributor

get_relevant_chunks gets sets of relevant passages via various retrieval methods (semantic/dense, sparse-embedding based, lexical/keyword, fuzzy); most of these produce scores (except fuzzy, I think), but they all are at least ordered by match quality.

If the config has a cross-encoder model set, then the union of these passages is then re-ranked and then finally the top $k$ passages are picked.

However if there's no cross-encoder, then the top $k$ are picked from this union of passages, which has no particular order, and we can get a bad set of passages. In this case we should make use of the scores (and implicit rank) that are produced by the retrievals, and blend them using a suitable fusion-ranking strategy, where the first step is to normalize the scores/ranks within each retrieval-set, to put them into the same "score space", so that picking top k is meaningful. The normalization could be:

  • reciprocal rank based -- score each passage by 1/(rank + c),
  • min-max-normalized
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

No branches or pull requests

1 participant