Benchmark your RAG pipeline for production-read...

Benchmark your RAG pipeline for production-ready accuracy

Most RAG demos work great in the sandbox and fall apart in production, and teams often don't find out until users complain. You need a repeatable way to test accuracy and know whether a change actually improved the system before it ships.
Takeaways:
- Design a benchmark set that reflects your actual question types, not a generic QA dataset
- Evaluate a RAG pipeline end to end and score it, live
- Build a benchmark you can grow over time, so it keeps pace as your pipeline gets more complex
Code: https://github.com/JMHReif/graphrag-benchmark-demo

Jennifer Reif

November 05, 2026

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

17 slides
  1. Benchmark your RAG pipeline For production-ready accuracy Jennifer Reif [email protected]

    @JMHReif github.com/JMHReif jmhreif.com linkedin.com/in/jmhreif/
  2. About Jennifer Developer advocate, Neo4j • Builder, coder, tech learner

    • Tech speaker/blogger/podcaster/author Jennifer Reif [email protected] @JMHReif github.com/JMHReif jmhreif.com linkedin.com/in/jmhreif/
  3. Day 1 What went wrong? Scenario • RAG demo worked!

    Investigation • 3rd party study tested retrieval • Then support elds tickets • Across 510 complex questions about wrong answers or confusing information… • Using MoNaCo benchmark Standard RAG answered 11% of complex questions fully correctly fi Source: NICD whitepaper
  4. How do we test? Understand impacts of changes? • Changes

    occurring quickly • Hard to evaluate (model, prompt, retrieval, other?) • Need a concrete, repeatable way to measure…
  5. Graph data model Software release and bug reporting RE PO

    RT S Bug S ION T N ME Policy FIX M EN TI O NS Ticket FIL ED Custom er OF_ P BS CR IB ES _T O Release RO DU MEN TIO NS CT SU MENTIONS _BY AFFECTS Chunk ES Product PA R T_ OF Feature
  6. Where RAG breaks • Retrieval - missed or irrelevant context

    • Prompting - good context, misused • Model - ignores both, answers from its own memory • A single pass/fail rate doesn’t tell you which one. • Scoring correctness and faithfulness separately does!
  7. Five question types Example Simple factual Single-hop lookup Which release

    xed the SAML SSO login timeout bug? Multi-hop Reasoning across 2-3 connected facts Which customers were a ected by the SSO login timeout bug? Comparison / aggregation Counting, comparing across entities Compare SLA response time for Enterprise vs Starter tier. Temporal Ordering and change over releases What changed between Aurora 3.1 and 3.2? Unanswerable Correct refusal - catches hallucination directly What’s the refund policy on hardware purchases? ff Tests fi Type
  8. What this will tell us… Pattern What it means Reason

    why High faithfulness + low precision/recall Retrieval problem Model was faithful to info retrieved, but didn’t get enough. Low faithfulness + high precision/recall Prompting/Generation problem Good context retrieved, but ignored or embellished. Low faithfulness + answer looks correct ! Caution ! Model bypassed retrieval and answered from its own training data. Looks ok until facts drift. Unanswerable question, no refusal Hallucination Model hallucinated, “appropriate refusal” score catches this.
  9. Results compare Metric C F Vector RAG, GraphRAG, Jev Meaning

    Correctness Faithfulness vector C: 2 F: 2 C: 2 F: 2 C: 0 F: 0 C: 0 F: 0 C: 0 F: 0 C: 2 F: 2 C: 0 F: 0 C: 2 F: 2 C: 2 F: 2 C: 0 F: 0 C: 2 F: 2 Q12 muhop C: 1 F: 1 graph C: 2 F: 1 C: 2 F: 2 C: 2 F: 2 C: 2 F: 2 C: 0 F: 0 C: 2 F: 2 C: 2 F: 2 C: 2 F: 2 C: 2 F: 2 C: 0 F: 0 C: 2 F: 2 C: 2 F: 2 C: 20/24 F: 19/20 Jev C: 1.98 C: 1.99 C: 1.26 C: 1.99 C: 0.01 C: 1.99 C: 1.97 C: 1.95 C: 1.94 C: 1.08 C: 1.86 C: 1.99 F: 0.72 F: 1.12 F: 1.01 F: 0.91 F: 0.04 F: 0.84 F: 1.03 F: 0.6 F: 0.74 F: 1.97 F: 1.99 F: 0.68 C: 20.01/24 F: 11.65/24 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Run sim_fac sim_fac mu-hop mu-hop mu-hop co_agg co_agg temp Q9 Q10 Q11 temp unans unans Overall C: 13/24 F: 13/24
  10. Other approaches RAG benchmarking • Deterministic scoring - exact match/regex

    • When gold answer is a short fact • Retrieval-only metrics - precision, recall, MRR • Check context pulled from RAG (chunks, entities) • Pairwise comparison - judge picks better of two answers • E.g. old pipeline vs new (benchmark over time) • Existing frameworks - Ragas, DeepEval, Arize Phoenix • Production signals - thumbs up/down, escalation rate, etc
  11. Benchmarking recap We covered: • Pipeline scored end-to-end • Across

    two angles: retrieval (vector vs GraphRAG), judging (LLM vs Jev) • Questions live in a JSON le • Makes it easy to add questions as cases expand fi • Unanswerable category catches hallucinations
  12. Resources • Code: github.com/JMHReif/graphrag-benchmark-demo • NICD report: neo4j.com/whitepapers/nicd-reducing-hallucinations-graphrag/ • Blog

    post: neo4j.com/blog/developer/langchain4j-graphrag-vector-stores-retrievers/ • Docs: docs.langchain4j.dev/integrations/embedding-stores/neo4j/ Jennifer Reif [email protected] @JMHReif github.com/JMHReif jmhreif.com linkedin.com/in/jmhreif/

More Decks by Jennifer Reif

Other Decks in Technology