SYSTEM C · FINE-TUNE + RETRIEVAL · RAG

Gemma 2 2B · Yu-Gi-Oh RAG

The same fine-tune, now with a hybrid retriever (MiniLM + BM25, top-5 over 42,412 chunks) feeding it the actual passages before it answers. This is where the facts arrive — correctness jumps and it becomes the decisive winner of the experiment.

Section 1 · Ask this system live, and see where it lands against the other two.
Ask it live · System C
connecting…

Ask it and read its answer after a hybrid retriever pulls the top-5 passages from 42,412 chunks and feeds them in, so the answer is grounded in real card text. Every answer lists the passages it used.

POST /ask · k=5 · this page shows answer C
Answer C
Retrieved passages
The three-system ladder · biased 60

Where this system lands against the other two on the 60 held-out biased questions, scored blind by a reference-grounded judge out of 10. Green is this system; tan are the other two.

02468A · base3.98B · fine-tune5.25C · +retrieval8.05
2.02×System C's mean vs the base (8.05 / 3.98). Retrieval more than doubles the base — the decisive jump.

Measured mean judge /10 on the 60 held-out (biased set), scored blind by a reference-grounded judge (gemini-3.1-flash-lite). This system in green; the other two in tan.

The lesson in both: fine-tuning teaches the shape of a good answer; retrieval supplies the facts. System A guesses fluently but is right only 1.83/5 of the time. Fine-tuning (System B) fixes the register — groundedness climbs 0.18 → 0.87 — yet correctness barely moves (1.83 → 2.35), because the facts were never in the 20.8M trained weights. Only when the retriever puts real passages in the prompt (System C) does correctness jump to 3.85/5 and the mean reach 8.05/10.
Section 2 · What's inside it, and what built it.
Architecture · Gemma 2 2B

All three systems are the same Gemma 2 2B — 26 layers, grouped-query attention (8 heads sharing 4 KV), a sliding 4,096-token window, and a GeGLU feed-forward. Run 4-bit at inference.

ClassGemma2ForCausalLM
Layers26
Hidden size2,304
Attention8 heads / 4 KV · dim 256 · GQA
Feed-forwardGeGLU · inner 9,216
Attention windowsliding 4,096 · logit soft-cap
NormRMSNorm
Context8,192 tokens
Vocabulary256,128
Embeddingstied input/output
Inference4-bit NF4

The Gemma 2 2B configuration shared by all three systems.

Training & corpus · what built it

How this system was built: a teacher wrote QA pairs, a blind judge filtered them, a QLoRA adapter was trained on what survived, and a FAISS index keeps every passage searchable at answer time.

Init fromgemma-2-2b-it · 4-bit NF4
MethodQLoRA · rank-16 / α-32
Targetsall linear modules
Trainable params20.8M LoRA (~0.8%)
ScheduleLR 2e-4 cosine · seq 512 · bf16
Data2,683 QA pairs · early-stopped ~1 epoch
Val perplexity3.87 (ref 4.26)
HardwareModal L4
Cost$3.26 · Modal $0.26 + Gemini $3.00
RetrieverMiniLM-L6 + BM25 · RRF
IndexFAISS flat · 42,412 chunks
Top-k5 · recall@5 0.93

Same QLoRA fine-tune as System B, plus a hybrid retriever over a FAISS index of 42,412 chunks (recall@5 0.93).

The lesson in both: all three systems are the same 2.6B model — what changes is only what you feed it. The architecture is identical Gemma 2 2B; the QLoRA fine-tune rewrites just 0.8% of the weights and never sees a card fact at test time. The corpus and pipeline built the fine-tune's 2,683 QA pairs, but the decisive facts arrive at answer time through retrieval, not through training.