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 @@
# One question, the bi-encoder's top 8, rescored
question: A buyer told their bank they never got the item. What now?
gold passage: G-04
retrieved id cosine cross-encoder logit
1 G-06 0.446 -7.40
2 G-04 0.440 -8.06
3 E-4117 0.418 -11.08
4 E-4101 0.418 -11.30
5 G-03 0.405 -10.33
6 E-4140 0.403 -9.91
7 G-08 0.399 -9.62
8 G-24 0.391 -9.61
bi-encoder rank of G-04: 2; cross-encoder winner: G-06