fix: respect LLMRanker top_k on fallback - #13051
Open
charan-rathore wants to merge 2 commits into
Open
charan-rathore wants to merge 2 commits into
charan-rathore wants to merge 2 commits into
Conversation
charan-rathore
requested review from
bogdankostic
and removed request for
a team
October 1, 2026 04:47
Contributor
|
@charan-rathore is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
LLMRankerlimits successful results totop_k, but returned every input document after generation or parsing failures and invalid queries. Apply the same limit to those fallback results in bothrunandrun_async.Document order and deduplication stay unchanged. The runtime
top_koverride still takes precedence. Documentation and a release note explain that fallback output now follows the same limit as successful ranking.How did you test it?
top_k=1, synchronously and asynchronously, without an LLM call.Notes for the reviewer
The seven existing fallback tests with
top_k=1expected both input documents. Those expectations now follow the documented limit. New cases cover generation and parsing failures, empty and non-string queries, duplicate inputs, constructor defaults, runtime overrides, and limits larger than the input list.This is an intentional result-limit change for callers relying on all documents during fallback. Setting
top_kto the input document count keeps all fallback documents.Instinct assisted. This patch was generated with assistance; human review and understanding are still required before submission.
reno lintcould not finish in the shallow clone because history objectf4e004c34cbc724b3ffb026debdf7a0541e4a21fis missing. Release-note YAML and backtick hooks passed. Full repository tests and type checks were not run.Checklist