Add rerank module: bi-encoder retrieval plus an ONNX Runtime cross-encoder reranker behind a Spring AI DocumentPostProcessor; hit@k and MRR by pool size and question kind, latency by candidates, batch size, threads and int8, and five reproduced traps. Local MiniLM models, no database or API key.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cfo2K4u4rF18QsPXPFnytf
This commit is contained in:
Claude
2026-10-24 18:00:05 +00:00
parent 2ccf1d8d19
commit a429aa40f6
34 changed files with 1617 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
# Rerank the bi-encoder's top N (60 questions, 94 passages, fp32 cross-encoder)
ranking hit@1 hit@3 hit@5 MRR@10
bi-encoder alone 41/60 51/60 55/60 0.782
bi-encoder top 5 + cross-encoder 48/60 55/60 55/60 0.863
bi-encoder top 10 + cross-encoder 49/60 54/60 56/60 0.868
bi-encoder top 20 + cross-encoder 49/60 55/60 56/60 0.870
bi-encoder top 50 + cross-encoder 49/60 56/60 56/60 0.869
bi-encoder top 94 + cross-encoder 49/60 56/60 56/60 0.869
recall of the first stage (is the gold passage inside the pool at all?):
top 5 : 55/60
top 10 : 58/60
top 20 : 59/60
top 50 : 60/60
top 94 : 60/60