Skip to content

nb06 · Qdrant index & evaluation

Notebook: notebooks/nb06_qdrant_index_and_eval.ipynb · Status: done

The objective

nb05 selected Qwen3-Embedding-0.6B. This notebook builds a real Qdrant vector store from that model, verifies that persisted retrieval reproduces nb05's in-memory results, and compares Qdrant against two alternative stores on identical vectors. It connects the offline benchmark to the production retrieval pipeline: same corpus, same chunks, same embeddings, a real storage backend.

Configuration

Collection kalisio_qwen3_nb06_v1, Qdrant at localhost:6333, model Qwen/Qwen3-Embedding-0.6B, cosine distance, 1024-dim vectors.

Corpus

The same scope as nb05: 1,251 files, 9,893 chunks.

RepositoryChunksChunk typeChunks
kdk6,497js (javascript)3,908
crisis1,930md (markdown)1,846
kano648vue (script)1,733
kapp492json (i18n)842
skeleton326vue (template)681
json (schemas)222

Index build

All 9,893 chunks were encoded with Qwen3 and upserted into Qdrant (1024-dim, cosine). The collection holds 9,893 points; encoding and building took ~117 s, with the Qdrant upsert itself at ~1,069 chunks/sec. A manifest records the index version, model, distance and counts.

Gold-set retrieval against the persisted store

The nb05 200-question gold set was replayed against the real Qdrant collection, using the same Qwen3 query prefix and de-duplicating chunks into file-level rankings. hit@5:

LayerENFR
A_symbol0.8830.883
B_docs0.7250.688
C_code0.7330.511
negative0.0000.000

Overall hit@5 is 0.778 (EN) and 0.708 (FR).

Consistency with the nb05 in-memory benchmark

The persisted Qdrant results match nb05's in-memory Qwen3 evaluation. The only material difference is EN C_code (nb05 0.756 vs Qdrant 0.733), with small hit@1 shifts (A_symbol EN 0.500 → 0.533) — consistent with Qdrant's approximate-nearest-neighbour index. No prefix, normalization, distance or payload-mapping discrepancy was observed.

Layer (EN)nb05 in-memoryQdrant
A_symbol0.8830.883
B_docs0.7250.725
C_code0.7560.733

Vector-store comparison

The same vectors were loaded into Chroma and LanceDB and evaluated on the same gold set. Retrieval quality is identical across the three stores; they differ only in timing.

Storehit@5hit@10MRRQuery time (200 queries)
Qdrant0.7430.8510.5116.7 s
Chroma0.7430.8510.5118.0 s
LanceDB0.7460.8510.51155.1 s

Per-language hit@5 is the same across stores (EN 0.778, FR 0.708–0.714). Build time was 1.0 s for LanceDB and 8.1 s for Chroma (Qdrant reused its already-built collection). Qdrant has the lowest query time in this run and reproduces the nb05 benchmark, so it remains the reference store; the choice of store does not change retrieval quality.

Limitations

  • Negative-query safety is weak for every store — the negative layer scores 0% safety at hit@5 / hit@10: for out-of-scope queries the retriever still returns its nearest chunks. This is a property of the retrieval policy, not the vector store, and is addressed in the reranking / abstention layer rather than by changing databases.
  • The gold set is the nb05 200-question set, mined from and evaluated on the same corpus, so hit@k measures within-corpus retrieval rather than generalization.