OSS · Dataset · Japanese RAG benchmark

Fernlight-RAG-Bench-ja

Same company, same facts, with and without the mess.

74 internal documents of a fictional Japanese company, Fernlight Inc., shipped as Word, Excel, PDF and intranet HTML. A clean version and a dirty version with the defects real internal documents have: outdated versions next to current ones, in-house aliases, renamed departments, facts that live only in tables, contradicting FAQs. The same 401 questions, written in employees’ casual Japanese, are scored on both, so you can see which retrieval method breaks on which defect.

74–224
Documents
401
Test questions
7
Versions
  • CC BY 4.0
  • MIT License
  • Japanese

View on GitHub Open on Hugging Face

Glowing network of Fernlight Inc.: departments, documents, articles and internal systems as points, references and ownership as lines. Both the old department name and the new one appear.
A slice of Fernlight Inc.’s relation table: 176 nodes (departments, documents, articles, systems) and 311 links drawn here, out of 253 nodes and 327 edges in full. The old IT department name and its 2024 successor both show up, which is one of the defects.
Terminal running bench/score.py on the clean corpus and then on the dirty corpus. Correct answers drop from 307 to 296 for BM25 and from 281 to 258 for vector search; answers based on outdated versions rise from 9 to 18 for vector search.
Scoring the same answers on the clean and dirty corpus (Claude Haiku, run 1). BM25 307 → 296, vector 281 → 258, answers taken from an outdated version 9 → 18.

What is inside

Everything is published on GitHub and Hugging Face under the same version tag (v0.2.0).

Documents 74 per version: regulations, manuals, minutes, notices, FAQs, design notes. Word, Excel, PDF, HTML
Sizes S (74 documents, ~90k characters), M (134, ~195k) and L (224, ~381k). The added documents change no answer, so the same questions are scored on all three
Versions clean, dirty, and five versions with a single defect type restored (alias, ver, table, rename, dup)
Questions 401 test + 24 dev, including 34 that ask to list every item (scored by key recall and wrong extra items). Asker profile and reference date given; answers depend on them
Answer keys Words a correct answer must contain, evidence as document ID + quote (chunking-independent). BEIR-style qrels per version (dirty, clean)
Graph facts (333), nodes (253), edges (327). For scoring and question writing only
Defect ledger Where each defect was planted, for which question, and how the clean version fixes it

Defects, sized by a survey of real documents

The defect types and their frequency follow 34 publicly available Japanese regulations and 29 published reports on in-house RAG deployments.

DefectQuestionsExample
Near-duplicate documents 51 Draft figures in board minutes, a sample travel policy attached to a client proposal
Outdated versions 45 The 2018 travel policy as a PDF, a 2019 FAQ answer nobody updated
Only in a table 28 Approvers listed only in the Excel authority matrix
Aliases 23 Expense system = Seisan-kun = EX
Contradictions 13 Claim deadline: 10 days in the manual, 14 days in the policy
Renamed departments 11 A 2021 rule still names the IT department by its pre-2024 name

Results (Claude Haiku, December 2026)

Pre-registered before measuring. The 367 questions of v0.1.0 on size S, counted as correct only when both runs were correct. Re-scored after the v0.2.0 fixes; only the hybrid dirty score changed.

0 25 50 75 100 74.7 67.3 Vector 83.1 78.2 BM25 88.6 87.5 Hybrid 97 94.6 Full doc
MethodCleanDirtyChange
Vector search (ruri-v3-310m, top 5) 74.7% 67.3% −7.4 (p=.001)
BM25 (top 5) 83.1% 78.2% −4.9 (p=.005)
BM25 + vector + rerank 88.6% 87.5% −1.1 (n.s.)
Full context (~84k tokens) 97.0% 94.6% −2.5 (p=.06)
  • Retrieval recall did not drop on the dirty corpus. The loss came from answering: the model also pulled outdated and near-duplicate passages and trusted the wrong one.
  • One defect type at a time moved scores little; only outdated versions under BM25 was clear (−4.4). The damage shows when defects pile up.
  • Two runs of the same setup differ by about 4 correct answers. Do not read 1–2 point gaps.
  • More documents hurt retrieval (sizes S → M → L, dirty version, average of two runs): hybrid 90.7% → 86.1% → 82.4%, vector 70.2% → 62.4% → 57.9%. The full document stays strongest at M (94.0%), but L (~352k tokens) no longer fits Haiku’s input.

What it adds to existing benchmarks

Internal-document RAG benchmarks already exist. Fernlight fills one gap in the mix: Japanese, defects added to and removed from the same facts, and the originals shipped as Word, Excel and PDF. The datasets below differ in scale and purpose — none is worse for it.

DatasetLanguage · sizeHow defects are handledHow Fernlight differs
EnterpriseRAG-Bench English · ~500k docs · 500 Q Misplacement, near-duplicates, contradictions added afterward Japanese, and small enough to fit a context window — so the full-document ceiling (97%) is measurable
Allganize RAG-Evaluation-Dataset-JA Japanese · 65 real PDFs · 300 Q Answer location classified, scored by a vote of LLMs No clean/dirty pair of the same facts; Fernlight measures the effect of each defect against its clean twin
RAGStress / OHRBench English (papers) Graded corruption over one knowledge base No Japanese, no Office originals; seven versions isolate one defect type each
Japanese resources (RAGEval family, etc.) — Focus on what to measure and auto-generating QA Ships the build record: the planting of defects, the failures, and the single-version scoring bias (pre-registered)

Who it is for

  • Teams building RAG over internal documents in Japanese — Try method selection — vector, BM25, hybrid, full document — before you dirty your own data
  • Anyone unsure whether to add retrieval or just paste the whole document — The 97% ceiling for full document at ~90k characters is a yardstick for that call
  • People comparing robustness to defects — Seven versions (alias, ver, table, rename, dup) show which defect type each method breaks on
  • People learning how to build a benchmark — The build record is included, so you can follow it into the course on making RAG evaluation datasets

Run your first experiment

Five commands take you from install to a clean-vs-dirty comparison. Swap in your own retriever at step 5.

  1. Install the dependencies
    pip install python-docx openpyxl beautifulsoup4 rank_bm25 fugashi unidic-lite sentence-transformers
  2. Extract the text (dirty version; use clean for the baseline)
    python3 bench/extract.py dirty
  3. Run retrieval (BM25 / vector / hybrid)
    python3 bench/run.py dirty myrun --qa qa/test.jsonl --methods bm25,vector,hybrid
  4. Score the run against the answer keys
    python3 bench/score.py results/myrun/dirty --qa qa/test.jsonl
  5. To plug in your own retriever, write predictions to results/<name>/<version>/<method>.jsonl
    # results/<name>/<version>/<method>.jsonl
    # {"qa_id": "Q1001", "answer": "...", "retrieved": [{"doc_id": "D13", "text": "..."}]}

Load it

Original files are under files/<version>/. Scoring code and raw results are on GitHub.

from datasets import load_dataset

repo = "kenimo49/Fernlight-RAG-Bench-ja"
queries = load_dataset(repo, "queries", split="test")    # 401 questions
corpus = load_dataset(repo, "corpus", split="dirty")     # clean / dirty / alias / ver / table / rename / dup; add _m / _l for sizes M, L
qrels = load_dataset(repo, "qrels", split="dirty")       # BEIR-style query-id, corpus-id, score; also clean, test (v0.1.0 rules)

How to cite

Ken Imoto. Fernlight-RAG-Bench-ja: A Japanese enterprise-document RAG benchmark. 2026. Version 0.2.0. CC BY 4.0.
https://huggingface.co/datasets/kenimo49/Fernlight-RAG-Bench-ja

Current limits

  • The whole corpus fits a 200k-token context only up to size M (~195k characters). The single-defect versions are built at M and L but not measured yet.
  • Questions were generated by one model family (Kimi) and checked by rules and LLM review; in v0.2.0 a second family (GPT) also judged a sample (83% agreement with Kimi). Not yet read by humans.
  • Few questions per defect type (11 for renamed departments).
  • No scanned PDFs or image-only tables yet; planned as a separate track.

Data: CC BY 4.0. Code: MIT. Fernlight Inc. and everyone in it are fictional.

Related developer tools

All products →

← Back to products