fix: truncate oversized reranking passages instead of failing the request - #2532
Draft
erichare wants to merge 1 commit into
Draft
fix: truncate oversized reranking passages instead of failing the request#2532erichare wants to merge 1 commit into
erichare wants to merge 1 commit into
Conversation
Contributor
Unit Test Coverage Report
|
Contributor
Integration Test Coverage Report (dse69-it)
|
Contributor
Integration Test Coverage Report (hcd-it)
|
erichare
marked this pull request as draft
August 7, 2026 22:38
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.
What this PR does:
Changes the NVIDIA reranking request's
truncateoption fromNONEtoEND.With
NONE, a single query+passage pair over the model's 8192-token limit fails the whole batch with HTTP 400 (Input length 16384 exceeds maximum allowed token size 8192), and because rerank batches are dispatched fail-fast, the entirefindAndRerankcommand fails — deterministically, for any query whose candidate set contains one oversized document. NohybridLimitssetting avoids it when the oversized document ranks highly.Observed against a production collection containing large OCR'd table chunks (13–15k chars, digit/punctuation-heavy): ~3% of eval queries fail 100% of the time with
RERANKING_PROVIDER_CLIENT_ERROR. WithEND, the NIM truncates the oversized pair and scores the remaining tokens — a strictly better outcome than failing the whole command.One-line constant change plus javadoc; no config surface added while findAndRerank is still stabilizing. If per-model configurability is wanted later,
truncatecan move intoreranking-providers-config.yamlas a follow-up.Validation:
NvidiaRerankingProviderTest+RerankingProviderTestpass (4 tests)fmt:format)Which issue(s) this PR fixes:
N/A — follow-up to the GPU-plane concurrency investigation (same series as #2530).
Checklist