eval_v2claude-sonnet-5 (a different model family from both this model and the data pipeline's teacher), rubric 0–100.| Metric | Value |
|---|---|
| Judge score | 38.0/100 (95% CI 35.7–40.3) |
| Correct (vs reference) | 32.4% |
| Grounded | 34.8% |
| Refusal recall (answer absent → refused) | 2.0% (n=296) |
| Over-refusal (answer present → refused) | 0.0% (n=366) |
| Numeric match | 98.0% (n=148) |
| Token F1 vs reference | 31.6% (n=1030) |
| Items scored | 1326 |
| Task | Judge /100 | Token F1 | n |
|---|---|---|---|
| Closed-book QA (no context — recall from weights) | 17.6 | 12.0% | 381 |
| Instruction following (no context) | 21.0 | 36.4% | 283 |
| RAFT (answer IS in the retrieved context — extraction) | 99.0 | 48.3% | 366 |
| Refusal (answer is ABSENT — must decline) | 5.2 | — | 296 |
Read the refusal row against the RAFT row. A high RAFT score with a low refusal score means the model answers well when the answer is present and fabricates when it is not — the two are the same behaviour measured twice.
Gold answers are model-authored (gemini-3.1-pro) from a source passage. These measure agreement with the reference, not truth.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tok = AutoTokenizer.from_pretrained("Kotichitturu/gemma-2-2b-legal-raft-v2")
4model = AutoModelForCausalLM.from_pretrained(
5 "Kotichitturu/gemma-2-2b-legal-raft-v2", torch_dtype="bfloat16",
6 attn_implementation="eager", # Gemma 2 soft-capping is silently WRONG under sdpa
7).eval()
8
9SYSTEM = 'You are a legal and financial expert. Use ONLY the provided context documents to answer the question. If the answer is not in the context, reply exactly: "The context does not contain the answer."'
10
11msgs = [{"role": "user", "content": SYSTEM + "\n\n" + "<your question>"}]
12prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
13ids = tok(prompt, return_tensors="pt", add_special_tokens=False)
14out = model.generate(**ids, max_new_tokens=128, do_sample=False)
15print(tok.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))gpt-4o-mini, then a regex prefilter (self-containment, anchoring)
removes ~20% for free before any paid judging.gemini-3.1-flash-lite for faithfulness and correctness — a
different model family from the teacher, so it cannot reward its own idiom.