Add rag-eval module: retrieval metrics, golden dataset and a JUnit regression gate

hit@k, recall@k, precision@k, MRR and nDCG@k in plain Java with their edge
cases pinned by tests, a 30-question graded golden dataset over a 40-passage
runbook, a paired bootstrap, and a gate (baseline + tolerance + no new misses)
shown failing on a tokenizer that drops digits. BM25, a hashed-trigram vector
(not a neural embedding) and RRF; no model, no network. Java 25, JUnit 6.1.3.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b7F47n8shUHpexxavn
This commit is contained in:
Ankur
2026-11-25 13:20:18 +05:30
co-authored by Claude Sonnet 5.5
parent 0bb301d361
commit 98ed878675
43 changed files with 1385 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
q01 exact VPN-619 p04:2
q02 exact E-4012 p09:2
q03 exact E-5003 p14:2
q04 exact What does HTTP 429 with Retry-After mean for the API? p18:2
q05 exact How fast must the status page be updated for a Sev1? p25:2
q06 exact How long do dead-letter queue messages live? p37:2
q07 exact What is the TTL of DNS records? p39:2
q08 exact How long is the password reset link valid? p01:2
q09 exact At what time UTC do nightly backups run? p07:2
q10 exact What share of traffic does a canary release get? p36:2
q11 exact How many days are archived logs kept? p27:2
q12 paraphrase I can't remember my login credentials, how do I get back in? p01:2
q13 paraphrase my authenticator phone broke p02:2
q14 paraphrase I typed the wrong password too many times p03:2,p01:1
q15 paraphrase the tunnel will not start on my Mac p05:2
q16 paraphrase can I put the database back to the state it had yesterday p08:2,p07:1
q17 paraphrase how do I ship a change to live systems p10:2,p12:1
q18 paraphrase undo a bad release p11:2,p36:1
q19 paraphrase the main database server died, what happens next p13:2
q20 paraphrase we need more API calls per minute than we are allowed p19:2,p18:1
q21 paraphrase swap credentials for a service without downtime p20:2,p40:1
q22 paraphrase someone pushed a password to git p40:2
q23 paraphrase my work machine was stolen p32:2
q24 paraphrase money back after cancelling a yearly subscription p22:2
q25 multi how long do deleted customer records stay around p30:2,p07:1
q26 multi what happens when a page goes unanswered during an outage p24:2,p25:1
q27 multi what must I do after a Sev1 p26:2,p25:1
q28 multi which data must not appear in logs and how long are logs kept p28:2,p27:2
q29 multi is changing certificate provider safe for the mobile apps p17:2,p16:1
q30 multi what slows reports and raises replica alerts p15:2,p13:1
1 q01 exact VPN-619 p04:2
2 q02 exact E-4012 p09:2
3 q03 exact E-5003 p14:2
4 q04 exact What does HTTP 429 with Retry-After mean for the API? p18:2
5 q05 exact How fast must the status page be updated for a Sev1? p25:2
6 q06 exact How long do dead-letter queue messages live? p37:2
7 q07 exact What is the TTL of DNS records? p39:2
8 q08 exact How long is the password reset link valid? p01:2
9 q09 exact At what time UTC do nightly backups run? p07:2
10 q10 exact What share of traffic does a canary release get? p36:2
11 q11 exact How many days are archived logs kept? p27:2
12 q12 paraphrase I can't remember my login credentials, how do I get back in? p01:2
13 q13 paraphrase my authenticator phone broke p02:2
14 q14 paraphrase I typed the wrong password too many times p03:2,p01:1
15 q15 paraphrase the tunnel will not start on my Mac p05:2
16 q16 paraphrase can I put the database back to the state it had yesterday p08:2,p07:1
17 q17 paraphrase how do I ship a change to live systems p10:2,p12:1
18 q18 paraphrase undo a bad release p11:2,p36:1
19 q19 paraphrase the main database server died, what happens next p13:2
20 q20 paraphrase we need more API calls per minute than we are allowed p19:2,p18:1
21 q21 paraphrase swap credentials for a service without downtime p20:2,p40:1
22 q22 paraphrase someone pushed a password to git p40:2
23 q23 paraphrase my work machine was stolen p32:2
24 q24 paraphrase money back after cancelling a yearly subscription p22:2
25 q25 multi how long do deleted customer records stay around p30:2,p07:1
26 q26 multi what happens when a page goes unanswered during an outage p24:2,p25:1
27 q27 multi what must I do after a Sev1 p26:2,p25:1
28 q28 multi which data must not appear in logs and how long are logs kept p28:2,p27:2
29 q29 multi is changing certificate provider safe for the mobile apps p17:2,p16:1
30 q30 multi what slows reports and raises replica alerts p15:2,p13:1