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
@@ -0,0 +1,34 @@
# RerankingPostProcessor inside RetrievalAugmentationAdvisor (retrieve 50, keep 5)
question: How do I fix E-4129?
retriever returned 50 documents; the post-processor kept 5
kept id retrieval rank rerank score text
1 E-4129 12 3.52 Error E-4129 - API key lacks permission. The key
2 E-4128 2 2.21 Error E-4128 - Tax identifier invalid. The tax r
3 E-4122 1 1.48 Error E-4122 - Payment method not attached. The
4 E-4123 14 1.09 Error E-4123 - Duplicate customer email. A custo
5 E-4126 5 0.94 Error E-4126 - Coupon expired. The coupon passed
--- the prompt the model received ---
Context information is below.
---------------------
Error E-4129 - API key lacks permission. The key in use does not carry the scope needed for this endpoint. Create a restricted key that includes it.
Error E-4128 - Tax identifier invalid. The tax registration number does not match the format for its country. Check the prefix and the number of digits.
Error E-4122 - Payment method not attached. The payment method is not attached to this customer. Attach it first, or pass it directly on a one-off charge.
Error E-4123 - Duplicate customer email. A customer with this email address already exists and the account is configured to enforce unique emails. Reuse the existing customer.
Error E-4126 - Coupon expired. The coupon passed its redemption end date. Create a new coupon or extend the validity in the dashboard.
---------------------
Given the context information and no prior knowledge, answer the query.
Follow these rules:
1. If the answer is not in the context, just say that you don't know.
2. Avoid statements like "Based on the context..." or "The provided information...".
Query: How do I fix E-4129?
Answer: