Repository navigation
Description
Split from #4971.
Problem: The issue proposes a second BM25 arm on a Qdrant full-text index with the code tokenizer when Qdrant 1.20 is live. Why deferred: The live server is Qdrant 1.19.1, and 1.20 is not released. The main change can ship without this comparison. Acceptance criteria: a live Qdrant 1.20 server exists; the ingest builds a full-text index with the code tokenizer; the eval of #3902 compares the full-text arm with the sparse bm25 arm; and the better arm is kept and recorded in the issue.
Proposed design
Problem statement
Compare the Qdrant 1.20.0 full-text BM25 arm with the current client-side BM25 arm. The code can merge now, but the live eval waits on the cluster upgrade from 1.19.1. The code search fuses a dense arm with a client-side BM25 rerank of the dense candidates. Qdrant 1.20.0 adds a full-text index with a code tokenizer and BM25 scoring, and the #3902 gold set measures both arms.
Acceptance criteria
Requirement: Full-text index with the code tokenizer
The ingest MUST create a text payload index on the content field with the code tokenizer and bm25 scoring when the Qdrant server is 1.20.0 or later.
Scenario: Index build against a 1.20.0 server
- WHEN The ingest ensures the collection against a fake Qdrant client that reports version 1.20.0.
- THEN The test asserts that the create-payload-index request names the
contentfield, thecodetokenizer andbm25scoring, and that the existing payload indexes stay as they are.
Requirement: Version gate
The ingest MUST NOT request a text index with the code tokenizer or bm25 scoring when the Qdrant server is below 1.20.0.
Scenario: Index build against a 1.19.1 server
- WHEN The ingest ensures the collection against a fake Qdrant client that reports version 1.19.1.
- THEN The test asserts that the ingest sends no text index request and creates the existing payload indexes as it does today.
Requirement: Two-arm comparison
The #3902 gold-set scorer MUST score the full-text arm and the current BM25 arm on the same gold set and MUST return one score row for each arm.
Scenario: Eval with both arms selected
- WHEN The scorer runs with the full-text arm and the current BM25 arm against a fake Qdrant client.
- THEN The test asserts two
GoldSetScorerows, one for each arm, each with its hit rate at k=5, and no network call.
Requirement: Current arm stays the default
The scorer MUST keep the current BM25 arm as the default and MUST select the full-text arm only by its explicit name until the comparison records a winner.
Scenario: Eval with no arm name
- WHEN The scorer runs with no arm name.
- THEN The test asserts that the current BM25 arm scores and that no full-text text query runs.
Requirement: Pending a person after the merge
The issue MUST record the kept arm with the hit rate at k=5 of both arms.
Scenario: Eval on the live 1.20.0 server
- WHEN A person runs the eval against the live Qdrant 1.20.0 server after the merge.
- THEN The issue comment names the kept arm and gives the hit rate at k=5 of the full-text arm and of the current BM25 arm.
Existing Tool Considered
No alternatives check has run: the type perf is a skip class, so alternatives is null. Qdrant covers the need. qdrant-client==1.20.0 is pinned (pyproject.toml:28), and Qdrant 1.20.0 adds the code tokenizer and BM25 scoring on a full-text index (https://qdrant.tech/documentation/manage-data/indexing/#code). The change writes no tokenizer and no ranking code. The only gap is the cluster server, which runs 1.19.1. Cost to build the same instead: about 150k tokens and 4 days to write, keep and fix a BM25 index and a code tokenizer until it matches Qdrant.
Key questions
- Is the existing BM25 arm a Qdrant sparse vector with the
bm25model?: No. The current BM25 arm is the client-sidebm25_scoresrerank of the dense candidates.hybrid_search_resultsfuses that ranking with the dense ranking by reciprocal rank fusion. The repository holds no sparse vector and noQdrant/bm25model. [sources: src/devops_cli/ai/rag/retriever.py:210, src/devops_cli/ai/rag/retriever.py:224, src/devops_cli/ai/lexical.py:73] - Does the comparison need a Qdrant 1.20 server?: Yes. The
codetokenizer and BM25 scoring on a full-text index are available as of v1.20.0. The cluster chart is recorded at 1.19.1, so the live run waits on the server upgrade. The 1.20 release is out. [sources: https://qdrant.tech/blog/qdrant-1.20.x/, openspec/changes/archive/2026-10-24-1634-volumes-off-control-plane/proposal.md:47] - Which Qdrant client version is pinned, and does it support the
codetokenizer and BM25 scoring?:qdrant-client==1.20.0is pinned, so the client supports thecodetokenizer and thebm25scoring parameter. Only the server needs the upgrade to 1.20.0. [sources: pyproject.toml:28] - Which field and tokenizer does the full-text arm use?: The arm indexes the
contentpayload field, the text that the current arm scores, with thecodetokenizer andbm25scoring. The current\w+tokenizer keepsmax_sizeas one token, and thecodetokenizer splits it intomaxandsize. Both arms rank the same chunk text in the eval, so the result shows the effect of the index and the tokenizer. (best practice) [sources: src/devops_cli/ai/rag/indexer.py:512, src/devops_cli/ai/rag/retriever.py:220, src/devops_cli/ai/lexical.py:25]- Chosen: The
contentfield with thecodetokenizer. The field holds the same chunk text that the current arm scores, and thecodetokenizer splits the identifiers that the current tokenizer keeps whole. - Rejected: A new text field. A second field adds a second variable and a second payload write, so the eval cannot isolate the tokenizer.
- Rejected: The
contentfield with thewordtokenizer. Thewordtokenizer does not split identifiers, so the arm tests no new code-search behavior.
- Chosen: The
- Which arm does the comparison keep?: Keep the arm with the higher hit rate at k=5 on the test(ai): a gold set measures retrieval of knowledge base facts #3902 gold set. If the arms tie, keep the current BM25 arm, because it needs no 1.20.0 server. (best practice) [sources: src/devops_cli/ai/benchmark/gold_set_scorer.py:67, src/devops_cli/ai/benchmark/gold_set_scorer.py:130]
- Chosen: Keep the measured winner. The issue asks for a comparison, and the test(ai): a gold set measures retrieval of knowledge base facts #3902 gold set gives one metric for both arms.
- Rejected: Fix the full-text arm in advance. A fixed arm makes the comparison pointless, and no evidence shows that the full-text arm is better.
- Rejected: Keep both arms. Two arms double the index and query cost, and the issue asks for one arm.
Fit
Fits in one pull request.
Suspected block
The cluster Qdrant upgrade to 1.20.0: the live server runs 1.19.1, and the code tokenizer and BM25 scoring need 1.20.0.
Activity
devops-cli-service commentedon Nov 29, 2026
Both use the #3902 retrieval eval, but #5496 builds the eval set while this candidate runs a specific BM25 arm comparison on it.devops-cli-service commentedon Nov 29, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence