[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109338":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":24,"topics":25,"createdAt":10,"pushedAt":33,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":15,"starSnapshotCount":15,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},109338,"issue-rag","zaxiu88888\u002Fissue-rag","zaxiu88888","RAG over GitHub issues, with a hand-reviewed eval set and an audit of the judge itself. Reports the interval, not just the best number.","",null,"Python",497,6,79,0,4,34,413,15,77.54,"MIT License",false,"main",true,[26,27,28,29,30,31,32],"evaluation","github-issues","llm","llm-as-judge","python","rag","retrieval-augmented-generation","2026-11-04 06:19:04","2026-11-23 19:51:29","# issue-rag — a support assistant that measures itself\n\n**English** | [简体中文全文](README.zh-CN.md)\n\n**[▶ 在线结果页（GitHub Pages）](https:\u002F\u002Fzaxiu88888.github.io\u002Fissue-rag\u002F)** — 浏览全部 95 条评测：问题、维护者参考答案、两个系统的答案、判定，可搜索可筛选。\n\n---\n\n## 中文读者从这里看起\n\n面向真实开源仓库 issue tracker 的检索增强问答系统（RAG），核心不是「能问答」，而是**把评测做扎实，并且审计自己的评分器**。\n\n在 `vitejs\u002Fvite` 上，用 **95 条人工复核**的问题测得（生成与判分 `deepseek-chat`，语料 5,473 篇）：\n\n| | 闭卷（无检索） | 检索（最好配置） |\n|---|---|---|\n| 判定为 `correct` | 8.4% | **64.2%** |\n| 加权准确率 | 0.221 | **0.700** |\n| 被判为编造 | 1.1% | 20.0% |\n\n三条能一句话说出口的结论：\n\n1. **检索确实有用，增益 2.3×–3.2×**（换更严的判分器得到 2.3×，人工盲评给到 5.2×，所以机器测的是**下界**）。不是 4 倍。\n2. **四种检索配置之间无法区分**——换判分器排序就翻转，最大差距 0.03，落在判分器自身噪声（0.005–0.026）附近。能站住的只有「闭卷永远最差」和「增益区间」。\n3. **判分器被审计了四个轴**：换判分模型、同模型跑两遍、换 rubric 版本、以及 30 条人工盲评（一致率 **70.0%**，二次加权 κ=**0.816**）。人工还发现判分器**低估**了增益：对泛泛建议过宽 +0.100，对真实答案过严 −0.133。\n\n另外两个反直觉的结果：**检索会抬高编造率**（1.1% → 20%，从「诚实地不知道」变成「自信地错」）；以及**检索质量最好的配置答案不是最好的**（rerank 检索到回答评论的比例最高 0.621，但端到端 0.679 落后于 bm25 的 0.700）。\n\n还有一个必须承认的边界：**检索只支持英文**（语料、BM25 分词、embedding 模型全是英文），用中文提问会检索到噪声并得到拒答——这是本评测集的设计漏洞，已写进 Limitations。\n\n→ [**完整中文版**](README.zh-CN.md)　·　English full text continues below.\n\n---\n\nA retrieval-augmented question answering system over a real project's issue\ntracker, built around one question:\n\n> **How much of what an LLM confidently says about a fast-moving library is\n> actually wrong — and does retrieving recent issues fix it?**\n\nMost RAG demos answer the first half by assertion and skip the second. This repo\nships the measurement: a hand-reviewed eval set mined from maintainer answers,\nfive system configurations, and a results table where every row is an ablation.\n\n---\n\n## The hypothesis\n\nSupport traffic on fast-moving libraries is dominated by questions whose answers\nlive in the **last six to twelve months of issues** — which versions fixed a bug,\nwhich API replaced a deprecated call, why the example in the blog post no longer\ncompiles.\n\nA model trained before those issues were written cannot know any of it. So it\ndoes what language models do: it produces a plausible version number, a\nplausible API name, and a confident tone.\n\nThat failure mode is measurable, and it is the thing this project measures.\nMeasured on **95 hand-reviewed items** against `vitejs\u002Fvite`:\n\n| | closed-book | with retrieval (best config) |\n|---|---|---|\n| scored `correct` | 8.4% | **64.2%** |\n| weighted accuracy | 0.221 | **0.700** |\n| flagged `fabricated` | 1.1% | 20.0% |\n\nRetrieval clearly helps — **but the size of the gain depends on who grades it**, so\nthis repo reports an interval rather than one number:\n\n- under the in-project judge (`deepseek-chat`): **0.221 → 0.700** (3.2×)\n- under an independent stricter grader (`deepseek-reasoner`): **0.305 → 0.711** (2.3×)\n- under a blind **human** review of 30 answers: **0.167 → 0.867** (5.2×)\n\nThe human review is the interesting one: it agrees with the judge on **70.0%** of\nverdicts (quadratic κ=0.816) but disagrees in a consistent direction — the judge\ngives vague advice more credit than a person does (+0.100) and good retrieval\nanswers less (−0.133). So the machine-measured gains here are **conservative**,\nwhich is the opposite of the usual worry about LLM judges.\n\nExpanding the eval set is itself an experiment, and it is reported as one. Going\nfrom 29 to 95 items moved closed-book by **+0.031** — while every retrieval system\nmoved by +0.17 to +0.20 — so the headline effect got *stronger* with more data\nrather than regressing toward zero. See [29 items vs 95](#29-items-vs-95-items-what-expanding-the-sample-changed).\n\nTwo things are deliberately *not* claimed. The four retrieval configurations are\nmutually indistinguishable (0.632–0.700, a spread smaller than the grader's own\nnoise, and the ordering flips when the grader changes). And retrieval *raises* the\nfabrication rate, which is the least obvious result here. All of it is discussed\nunder [Results](#results).\n\n---\n\n## Why this repo is not another \"chat with your PDF\"\n\nThree decisions do the differentiating work, and all three are checkable in the\ncode:\n\n1. **The eval set is mined from ground truth, not invented.**\n   Each question is a real issue title; each reference answer is the maintainer\n   reply that closed it. No annotation budget, no LLM-generated questions (which\n   would just measure the generating model's taste).\n\n2. **Retrieval is scored with the source issue excluded.**\n   If the query can match its own issue thread, recall looks excellent and\n   proves nothing. Every retrieval metric is reported twice — once as the\n   product number, once leave-one-issue-out as the generalisation number.\n\n3. **A confident wrong answer is scored `incorrect`, never `partial`.**\n   The judge rubric ranks fabricated version numbers and API names as the worst\n   outcome, because that is precisely the failure this system exists to prevent.\n\n---\n\n## Choosing a target repository (do this first, it can sink the project)\n\nThe pipeline is repo-agnostic — `configs\u002Fpresets.yaml` is the only thing that\nknows which project is being studied. But the choice is not cosmetic. Measured on\nthe 50 most recent comments of each candidate:\n\n| repository | maintainer replies | bot traffic | usable? |\n|---|---|---|---|\n| `vitejs\u002Fvite` | 40% | 20% | **yes** (default preset) |\n| `ollama\u002Follama` | 32% | 0% | yes |\n| `vercel\u002Fai` | 8% | 84% | no |\n| `langchain-ai\u002Flangchainjs` | 2% | 72% | no |\n\nOn `vercel\u002Fai`, two bot accounts produced 86% of a 2000-comment sample and 600\nissues yielded **10** eval candidates. Two more sampling traps — a window-axis\nmismatch that silently emptied the join, and pull-request comments masquerading\nas issue comments — are written up with numbers in\n[`docs\u002FDATA_QUALITY.md`](docs\u002FDATA_QUALITY.md). Read that file before pointing\nthis at your own repository.\n\n---\n\n## Architecture\n\n```\nGitHub REST API\n   ├── \u002Fsearch\u002Fissues .................. issue titles + bodies   (100\u002Fpage)\n   └── \u002Frepos\u002F{o}\u002F{r}\u002Fissues\u002Fcomments .. maintainer answers      (100\u002Fpage)\n                    │\n                    ▼\n        corpus.py    issue body chunks + comment chunks,\n                     each prefixed with its issue title\n                    │\n                    ▼\n        evalset.py   question = issue title\n                     reference = maintainer's accepted reply\n                     → human keep\u002Fdrop → eval set (committed)\n                    │\n                    ▼\n     ┌──────────────┴──────────────┐\n     ▼                             ▼\n retrieval.py                  generate.py\n BM25 · dense · RRF hybrid     local Qwen2.5 \u002F any\n · cross-encoder rerank        OpenAI-compatible endpoint\n     └──────────────┬──────────────┘\n                    ▼\n              judge.py    rubric grading against the reference,\n                          with a separate grounding audit\n                    ▼\n             evaluate.py   results.md + results.json\n```\n\nTwo harvesting details worth knowing, both forced by GitHub's 60-request\u002Fhour\nanonymous quota:\n\n* issues come from the **search** endpoint, which has its own quota and returns\n  bodies;\n* comments are fetched **per issue** in `--mode per-issue`. The repo-wide comment\n  list is 100× cheaper per comment, but it also returns comments on pull\n  requests — on Vite that was ~90% of the stream, and 150 harvested comments\n  yielded 16 usable documents. Cheap at producing nothing is still nothing.\n\nThere is also a `--mode repo-wide` for repositories where PR traffic is low;\n`docs\u002FDATA_QUALITY.md` has the measurement that tells you which applies.\n\n---\n\n## Quickstart\n\n```bash\npython -m venv .venv && source .venv\u002Fbin\u002Factivate   # Windows: .venv\\Scripts\\activate\npip install -e \".[models,dev]\"\n\n# 1. harvest (works anonymously; set GITHUB_TOKEN for 5000 req\u002Fhour instead of 60)\npython -m issue_rag.fetch issues   --preset vite --months 12 --allow-wait\npython -m issue_rag.fetch comments --preset vite --mode per-issue --max-comment-issues 120\n\n# 2. build the retrieval corpus\npython -m issue_rag.corpus --preset vite\n\n# 3. mine question\u002Fanswer candidates, then review them by hand\npython -m issue_rag.evalset --preset vite\n#    open data\u002Fprocessed\u002F\u003Crepo>\u002Fevalset_review.csv, put 1 or 0 in keep_1_or_0\npython -m issue_rag.evalset --preset vite --finalize\n\n# 4. download models (ModelScope, because huggingface.co may be unreachable)\npython -m issue_rag.models\n\n#    ...or skip the download entirely and use an API for generation\u002Fjudging:\n#    echo \"DEEPSEEK_API_KEY=sk-...\" >> .env\n\n# 5. run the matrix\npython -m issue_rag.evaluate --preset vite --systems closed_book,bm25,dense,hybrid,hybrid_rerank\n#    with an API instead of local weights:\n#    python -m issue_rag.evaluate --preset vite --provider deepseek\n```\n\n`--provider` accepts `local`, `deepseek`, `openai`, `siliconflow`, or `ollama`,\nand any other OpenAI-compatible server works via `--endpoint \u003Curl>`. Credentials\nare read from `.env` (see `.env.example`).\n\nThe rerun of any stage is free: HTTP responses and embeddings are cached on disk.\n\n---\n\n## Results\n\n_Produced by `python -m issue_rag.evaluate`. Regenerate with the command above;\nnumbers are not hand-edited._\n\n\u003C!-- RESULTS:BEGIN -->\nSetup: **95 hand-reviewed items**, generator and judge `deepseek-chat`, 5 retrieved\nexcerpts, `vitejs\u002Fvite` corpus of **5,473 documents** built from **771 issues and\n2,593 comments**. Rubric ③ (see\n[The rubric itself was an experiment](#the-rubric-itself-was-an-experiment)).\nFull machine-readable output in `data\u002Fresults\u002F`.\n\n### Answer quality\n\n| system | accuracy | correct | partial | incorrect | fabricated | cited | p50 | p95 |\n|---|---|---|---|---|---|---|---|---|\n| `closed_book` (no retrieval) | 0.221 | 8.4% | 27.4% | 64.2% | 1.1% | 0% | 4.32 s | 5.00 s |\n| `bm25` | **0.700** | **64.2%** | 11.6% | 24.2% | 20.0% | 100% | 3.70 s | 4.29 s |\n| `dense` (bge-base-en-v1.5) | 0.632 | 55.8% | 14.7% | 29.5% | 28.4% | 100% | 3.65 s | 4.29 s |\n| `hybrid` (RRF) | 0.695 | 63.2% | 12.6% | 24.2% | 21.1% | 100% | 3.53 s | 4.19 s |\n| `hybrid + rerank` (bge-reranker-base) | 0.679 | 62.1% | 11.6% | 26.3% | 23.2% | 100% | 3.77 s | 4.33 s |\n\n_accuracy = correct(1.0) + partial(0.5); fabricated = the judge flagged a wrong\nversion, API, or file path. Every row is n=95 with 0 failed calls._\n\n**Retrieval lifts accuracy from 0.221 to about 0.70, and the four retrieval\nconfigurations are indistinguishable from each other** (0.632–0.700, a spread\nsmaller than the grader's own noise). That second half matters as much as the\nfirst: this README once claimed the reranked system was best, and under the\nshipped rubric that claim does not survive — see\n[What survives](#what-survives-and-what-does-not).\n\n### 29 items vs 95 items: what expanding the sample changed\n\nThe previous revision of this README reported 29 hand-reviewed items. The set was\nthen rebuilt from a wider window (18 months of issues, 3,078 → 5,473 documents)\nand re-reviewed item by item: 200 candidates, 95 kept, 105 dropped. Same rubric,\nsame generators, same command. What changed:\n\n| system | 29 items | 95 items | Δ |\n|---|---|---|---|\n| `closed_book` | 0.190 | 0.221 | **+0.031** |\n| `bm25` | 0.517 | 0.700 | +0.183 |\n| `dense` | 0.466 | 0.632 | +0.166 |\n| `hybrid` | 0.500 | 0.695 | +0.195 |\n| `hybrid + rerank` | 0.500 | 0.679 | +0.179 |\n| **gain (best retrieval ÷ closed-book)** | **2.72×** | **3.17×** | +0.45× |\n\nTwo readings, and both are honest:\n\n1. **The headline is stable, and it got stronger, not weaker.** Closed-book moved\n   by three points on a sample 3.3× larger; retrieval moved by ~0.18. A finding\n   that survived a 3× increase in sample size and came out *larger* is not a\n   small-sample artefact of the kind reviewers rightly suspect.\n2. **The absolute numbers are not comparable across revisions.** The wider window\n   added many more recent, well-answered threads, and retrieval benefits from that\n   far more than the closed-book model does. Do not compare a row on this page to a\n   row in an older screenshot.\n\nThe confidence interval also narrowed by construction: at n=29 a single item moves\na system by 3.4 points; at n=95 it moves it by 1.1.\n\n### How much of this is the judge?\n\nThree separate questions, answered by three separate comparisons. All runs reuse\nthe *same stored answers* (`evaluate --regrade`), so only the grader varies.\n\n**a) Does the rubric matter?** Same model, same 95 stored answers, rubric ① vs ③.\nRubric ① asks for one verdict; ③ asks four factual questions and maps them in\ncode. Both are runnable (`--judge-rubric holistic|checks`), and ① exists only for\nthis comparison:\n\n| system | rubric ① | rubric ③ | delta (③ − ①) |\n|---|---|---|---|\n| `closed_book` | 0.174 | 0.221 | **+0.047** |\n| `bm25` | 0.737 | 0.700 | −0.037 |\n| `dense` | 0.695 | 0.632 | −0.063 |\n| `hybrid` | 0.716 | 0.695 | −0.021 |\n| `hybrid + rerank` | **0.768** | 0.679 | **−0.089** |\n| **gain (best retrieval ÷ closed_book)** | **4.42×** | **3.17×** | |\n\n**This is where the number \"4×\" in the old version of this README came from.**\nUnder the holistic rubric, retrieval looks 4.42× better; under the shipped rubric\nit is 3.17×. The rubric was manufacturing the headline: it lifts every retrieval\nsystem and pushes closed-book *down*, so the gap nearly doubles. The single biggest\nmover is the reranker (+0.089), which is why it \"led\" under ① and does not under\n③, and why the comparison now reproduced that on 95 items instead of 29.\n\nOn the previous 29-item set the same comparison gave ⓐ 0.586 vs ③ 0.500 for the\nreranker and a gain of 4.48× vs 3.10× — the direction and the size are stable, so\nthis is not a small-sample artifact.\n\n**b) Does the judge identity matter?** Same rubric ③, same 95 stored answers,\n`deepseek-chat` vs `deepseek-reasoner`:\n\n| system | `deepseek-chat` | `deepseek-reasoner` | delta |\n|---|---|---|---|\n| `closed_book` | 0.221 | 0.305 | **+0.084** |\n| `bm25` | 0.700 | 0.658 | −0.042 |\n| `dense` | 0.632 | 0.595 | −0.037 |\n| `hybrid` | 0.695 | 0.668 | −0.026 |\n| `hybrid + rerank` | 0.679 | **0.711** | **+0.032** |\n| **gain (best retrieval ÷ closed-book)** | **3.17×** | **2.33×** | |\n\nThe stricter grader is *lenient* on closed-book answers and *strict* on retrieval\nanswers, which compresses the gain. It also reorders the table: `bm25` is best\nunder `deepseek-chat`, `hybrid + rerank` is best under `deepseek-reasoner`, and the\nlargest mover between them is 0.042 — inside the noise band measured next.\n\n**c) Does the judge agree with itself?** Two runs of `deepseek-reasoner` over the\nsame 95 answers (this is the noise floor: a difference between two systems smaller\nthan this is not a result):\n\n| system | run a | run b | delta | exact agreement |\n|---|---|---|---|---|\n| `closed_book` | 0.305 | 0.289 | −0.016 | 78.9% |\n| `bm25` | 0.658 | 0.668 | +0.011 | 86.3% |\n| `dense` | 0.595 | 0.621 | +0.026 | 84.2% |\n| `hybrid` | 0.668 | 0.684 | +0.016 | 86.3% |\n| `hybrid + rerank` | 0.711 | 0.705 | −0.005 | 86.3% |\n\nRun-to-run drift is **0.005–0.026** on the aggregate, and the ordering is *identical*\nin both runs. Cross-judge agreement is lower (53.7%–83.2% exact) — two different\nmodels disagree more than one model disagrees with itself, which is why the interval\nabove is reported as an interval.\n\n**d) Does a *human* agree?** The only measurement here that is not a model grading\na model. 30 answers (15 per system) were graded blind through a local review page:\nthe reviewer saw the question, the reference and the candidate, but never the\njudge's verdict and never which system produced the answer.\n\n| metric | value |\n|---|---|\n| reviewed pairs | 30 |\n| exact agreement | **70.0%** |\n| usable-vs-not agreement | **73.3%** |\n| quadratic-weighted kappa | **0.816** (\"almost perfect\") |\n\n| system | n | exact | usable | mean human | mean judge |\n|---|---|---|---|---|---|\n| `closed_book` | 15 | 67% | 73% | **0.167** | 0.267 |\n| `hybrid + rerank` | 15 | 73% | 73% | **0.867** | 0.733 |\n\nThe last two columns are the finding. **The judge is lenient on vague advice and\nstrict on good answers**: it scores closed-book answers 0.100 *higher* than the\nhuman does and the reranked system 0.133 *lower*. So on this sample the human sees\na **+0.700** gap (5.2×) where the judge sees +0.466 (2.75×) — the machine-measured\ngain is a *conservative* estimate, not an inflated one. That is the opposite\ndirection from the usual worry about LLM judges.\n\nCaveats, because one sample is one sample: a single reviewer, 15 per system, one\nsitting. Treat it as validating the instrument's *direction*, not as a precise\nestimate. Worth noting that both this axis and the sample-size experiment point the\nsame way — the measured retrieval gain is a floor.\n\n### What survives, and what does not\n\n| claim | verdict |\n|---|---|\n| Retrieval beats closed-book | **holds** — every rubric, every judge, every run, every sample size, and the human review |\n| The gain is \"4×\" | **does not hold** — it is **2.3×–3.2×** by the model judges; the human sample suggests ~5× |\n| The reranked system is the best retrieval config | **does not hold** — it leads under `deepseek-reasoner`, trails `bm25` under `deepseek-chat`, and the gap is 0.03 |\n| Any ordering among `bm25` \u002F `hybrid` \u002F `dense` \u002F `rerank` | **unresolved** — all within 0.07, i.e. at or inside the noise floor |\n| The judge understates the gain | **supported** — it over-credits vague advice by 0.100 and under-credits retrieval by 0.133 |\n| The eval set was too small to trust | **does not hold** — tripling it moved closed-book by 0.031 |\n\nThe ordering row is well supported rather than merely suspected: the four retrieval\nconfigurations sit within 0.07 of each other, the grader's run-to-run noise is\n0.005–0.026 on the aggregate, the ordering flips when the grader changes, and the\nissue-level retrieval metrics are degenerate (see below). Four independent lines of\nevidence say the same thing: do not claim an ordering.\n\n### On the items the closed-book model got wrong\n\n| system | accuracy | correct | partial | incorrect | fabricated |\n|---|---|---|---|---|---|\n| `closed_book` | 0.149 | 0.0% | 29.9% | 70.1% | 1.1% |\n| `bm25` | 0.678 | 62.1% | 11.5% | 26.4% | 21.8% |\n| `dense` | 0.621 | 54.0% | 16.1% | 29.9% | 28.7% |\n| `hybrid` | 0.672 | 60.9% | 12.6% | 26.4% | 21.8% |\n| `hybrid + rerank` | 0.672 | 60.9% | 12.6% | 26.4% | 24.1% |\n\nA subgroup of the same run (n=87), not a filtered eval set — the table above still\ncounts every item, so the comparison is not rigged by construction. This is where\nretrieval actually does its work: on items the model can already answer from memory\nit adds nothing, and 8 of 95 items are in that category.\n\n### Retrieval quality — measured on the answering comment, not the issue\n\nRelevance here is the **comment that answers the question**, not the issue thread it\ncame from:\n\n| retriever | gold chunk@5 | gold chunk MRR | gold chunk top-1 | share of window from the same issue |\n|---|---|---|---|---|\n| `bm25` | 0.611 | 0.280 | 0.116 | 0.983 |\n| `dense` | 0.516 | 0.206 | 0.063 | 0.998 |\n| `hybrid` | 0.579 | 0.247 | 0.084 | 0.996 |\n| `hybrid + rerank` | **0.621** | **0.289** | **0.147** | 0.990 |\n\nThis table does discriminate — it separates `dense` (0.516) from the reranker\n(0.621), which the answer-quality table cannot do. It also produces the most\ninteresting negative result in the repo: **the retriever with the best retrieval\nquality is not the one with the best answers** (`hybrid + rerank` leads here at\n0.621 but trails `bm25` on accuracy, 0.679 vs 0.700). Better retrieval of the\nreference comment does not fully propagate to the final answer, which is the\nhonest reason the four configurations cannot be ranked.\n\nThe last column explains the older, issue-level table: **98–99.8% of the retrieved\nwindow is chunks of the gold issue itself.** The retriever finds the right thread\n(trivially — the query is the thread's title) and then fills all five slots with\nthat thread. Any issue-level \"was the right issue retrieved\" metric is therefore\n~1.0 by construction for every retriever, which is why it was replaced.\n\n### Paraphrased queries: does the title advantage hold?\n\nYes, and the ranking among retrievers changes. `python -m issue_rag.paraphrase`\nrewrites all 95 titles as questions a developer would actually type — keeping the\nversion numbers, API names and identifier strings but abandoning the title's\nwording — then re-runs every retriever over both query sets. Relevance is again the\nanswering comment.\n\n| retriever | gold chunk@5 (title) | gold chunk@5 (paraphrase) | Δ | MRR (title) | MRR (paraphrase) | Δ |\n|---|---|---|---|---|---|---|\n| `bm25` | 0.611 | **0.526** | **−0.084** | 0.280 | 0.264 | −0.016 |\n| `dense` | 0.516 | 0.558 | +0.042 | 0.206 | 0.242 | +0.036 |\n| `hybrid` | 0.579 | 0.558 | −0.021 | 0.247 | 0.271 | +0.024 |\n| `hybrid + rerank` | 0.621 | **0.716** | **+0.095** | 0.289 | 0.359 | +0.070 |\n\nTwo things happen at once, and both matter:\n\n1. **The lexical advantage was real.** BM25 is the only retriever that gets worse\n   when the query stops echoing the title (−0.084). Its row in the main table above\n   is therefore optimistic, and that caveat used to be a guess in\n   [Limitations](#limitations) — now it is a measurement.\n2. **The tie between the four retrievers was partly an artefact of title queries.**\n   Under user-voiced queries the spread widens from 0.10 to 0.19 and the reranker\n   separates: 0.716 versus 0.526 for BM25. \"Cannot rank the retrievers\" holds for\n   titles, weakens for paraphrase — which is what you would expect if lexical\n   matching was flattening the field.\n\nWhat the paraphrases deliberately keep is the vocabulary: an honest rewrite of a\ntechnical question cannot drop `optimizeDeps.exclude` or `Vite 8.0.13`, because\nthat is the question. Median title-token retention is 0.62, and all 11 titles\ncarrying a version number keep it. A harsher condition — abstracting the\nidentifiers away — would test \"a user who does not know the API name\", which is a\ndifferent (and interesting) question, and is not run here.\n\nThe end-to-end answers were re-run on the paraphrased queries too, and **the\nranking flips**. This is the single biggest change to a headline claim in the\nhistory of this project:\n\n| system | accuracy (title) | accuracy (paraphrase) | Δ |\n|---|---|---|---|\n| `closed_book` | 0.221 | 0.289 | +0.068 |\n| `bm25` | **0.700** | 0.674 | −0.026 |\n| `dense` | 0.632 | 0.658 | +0.026 |\n| `hybrid` | 0.695 | 0.668 | −0.027 |\n| `hybrid + rerank` | 0.679 | **0.795** | **+0.116** |\n\nRead the two halves separately:\n\n1. **\"Cannot rank the retrievers\" is true for title queries and false for user\n   queries.** Under paraphrase the reranker wins by 0.12 over BM25 (0.795 vs\n   0.674), and the spread among the four widens from 0.07 to 0.14. The earlier\n   \"indistinguishable\" finding was partly an artefact of the easiest possible\n   query construction.\n2. **The closed-book row rises too.** A paraphrased question spells out the\n   problem more explicitly, so the model answers more of it from memory\n   (0.221 → 0.289) — and its fabrication rate rises with it (1.1% → 6.3%).\n   The closed-book ↔ retrieval gain therefore *compresses* (3.17× → 2.75×) even\n   though the ordering among retrievers got *clearer*. Both directions belong in\n   the story.\n\nThe title-query numbers remain the canonical table (they are the harder\nclosed-book baseline and the easier lexical case; both matter), but the claim to\ncarry out of this section is: **the ranking of retrievers is not a property of the\nretrievers alone — it depends on how close the query is to the corpus wording.**\n\n\u003C!-- RESULTS:END -->\n\n### The rubric itself was an experiment\n\nThe judge above asked for a verdict directly. Two runs of the same model disagreed\non 7–29% of items, and the disagreements clustered on the partial\u002Fincorrect\nboundary — precisely the decision a holistic prompt leaves undefined. So the\ngrader was rewritten to answer four factual sub-questions, with the verdict mapped\nin code (`judge.verdict_from_checks`).\n\nThe first attempt made things worse in an instructive way. Each arm below is two\nruns of `deepseek-reasoner` over the same stored answers:\n\n| rubric | closed_book | hybrid+rerank | run-to-run Δ (rerank) | exact agreement (rerank) |\n|---|---|---|---|---|\n| ① holistic (original) | 0.336 | 0.517 | 0.069 | 82.8% |\n| ② four checks, `wrong_specific` = \"any detail absent from the reference\" | 0.034 | 0.259 | 0.069 | 93.1% |\n| ③ four checks, `wrong_specific` = \"a version\u002Fissue number the reference contradicts\" | 0.287 | **0.562** | **0.018** | 82.1% |\n\n**Arm ② is the cautionary one.** It raised exact agreement to 93% and destroyed\nboth scores, because \"absent from the reference\" is not \"invented\" — a retrieval\nanswer legitimately quotes details from other excerpts, and the broad check flagged\n97% of closed-book answers and 93% of retrieval answers as fabricating. Reproducible\nand wrong is worse than noisy and roughly right.\n\n**Arm ③** narrows the check to version and issue numbers only, which drops the\nflag rate to 0% \u002F 19%. The scores return and the run-to-run difference on the\nsystem that matters falls 3.8× (0.069 → 0.018).\n\nOne honest limit: arm ③ does **not** improve per-item agreement (82.1% vs 82.8%).\nWhat it improves is the *net* shift between runs — the errors cancel instead of\nbiasing the aggregate. Since every number reported here is an aggregate, that is\nthe variance that mattered.\n\n> **Which rubric produced the tables above?** All of them: the whole run was\n> re-baselined from rubric ① into ③ over the original stored answers\n> (`evaluate --regrade --regrade-from v1holistic`), so the numbers on this page and\n> the code in the repo agree. The ① arm is archived as `v1holistic` and is what the\n> \"rubric ① vs ③\" comparison above reads.\n\n### Five things worth noticing in those numbers\n\n**1. The reranker's advantage did not survive a rubric change.** Under rubric ① it\nwas the best system by 0.10; under ③ it ties with plain hybrid and trails BM25. The\nrubric moved it by −0.086 while every other system moved by +0.02 to +0.05. A\nresult that flips when the measuring instrument is corrected was a result about the\ninstrument. This is the single most useful thing in the repo to have caught.\n\n**2. The four retrieval configurations are indistinguishable.** 0.632, 0.679, 0.695,\n0.700 — a 0.07 spread against a grader whose own run-to-run noise is 0.005–0.026\non the aggregate, with the ordering flipping when the judge changes. Four\nindependent lines point the same way: the spread is small, the ordering is not\nstable across judges, the issue-level retrieval metrics are degenerate, and the\nretriever with the best comment-level retrieval is not the one with the best\nanswers. Do not claim an ordering.\n\n**3. Retrieval buys 2.3×–3.2×, and that is the durable finding.** closed-book moves\nfrom 0.221 to about 0.70 under the shipped rubric, and the gain survives two judges\n(3.17× vs 2.33×), a rubric change, a 3.3× larger sample, and it is *larger* under\nhuman review (~5×). Not \"4×\", and not 1.9× either — the interval moved up when the\nsample grew, which is the opposite of the usual small-sample optimism.\n\n**4. Retrieval makes the model confidently wrong rather than vague.** With\nretrieval, fabrication sits at 20–28% and citation markers appear in 100% of\nanswers; without it, the model mostly admits ignorance and fabricates only 1.1% of\nthe time. Grounding and citation fidelity are separate problems and the second one\nis unsolved here.\n\n**5. Better retrieval does not automatically mean better answers.** The reranker\nretrieves the answering comment most often (0.621 vs 0.611 for BM25) and still\nscores lower end-to-end (0.679 vs 0.700). Whatever the generator does with the\nwindow matters more than the last increment of retrieval quality — which is why\nthis repo reports the retrieval table *and* the answer table, and never derives one\nfrom the other.\n\n\n---\n\n## Design decisions and their trade-offs\n\n**Retrieval unit = one document per comment, prefixed with the issue title.**\nA maintainer reply is usually self-contained (\"on v5 call\n`convertToModelMessages` first\"), so it retrieves and cites well alone. The title\nprefix keeps chunk-level references interpretable.\n\n**Query = issue title, not issue body.** Using the body lets the retriever match\nthe issue's own text and inflates every metric. The title is also closer to what\na real user types.\n\n**RRF instead of score normalisation.** BM25 scores and cosine similarity are not\ncomparable; percentile or min-max normalisation is sensitive to the candidate\npool size. Reciprocal rank fusion only uses positions, which makes the hybrid\nrobust and the ablation interpretable.\n\n**A local 3B model as the default generator.** Small enough to run on a 16 GB\nlaptop GPU, so anyone can reproduce the table without an API key. The trade-off\nis real: absolute scores are lower than a frontier model's. `--endpoint` swaps in\nany OpenAI-compatible server, and the closed-book vs RAG *gap* is the finding —\nthat gap survives a stronger generator.\n\n---\n\n## Limitations\n\nStated plainly, because a results table without limitations is marketing.\n\n* **LLM-as-judge, now with a human check.** Swapping the judge moves a system by up\n  to 0.084, the *same* judge run twice moves it by up to 0.026, and changing the\n  rubric moved one system by 0.086. A blind human review of 30 pairs agrees with the\n  judge on 70.0% of verdicts (quadratic kappa 0.816) and, more usefully, disagrees\n  in a consistent direction: the judge over-credits vague advice by 0.100 and\n  under-credits retrieval by 0.133. The remaining limit is *coverage* — one\n  reviewer, 15 items per system, one sitting — not the absence of a check.\n* **The issue-level retrieval metrics were a tautology, and are retired.** The\n  original table reported recall@5 = 1.000 \u002F MRR = 1.000 \u002F leave-one-out = 0.000 for\n  every retriever, on 29 items and on 95 items alike. Both halves are artefacts of\n  how the task is built, not measurements:\n  *the query is the issue title and every chunk is prefixed with that title, so the\n  gold issue is retrieved at rank 1 by construction — measured 98–99.8% of each\n  window is chunks of the gold issue itself;* and *the reference document belongs to\n  the gold issue, so hiding that issue removes the only relevant document by\n  definition, making leave-one-out identically zero.* The replacement in\n  [Retrieval quality](#retrieval-quality--measured-on-the-answering-comment-not-the-issue)\n  scores the answering **comment** instead, which does discriminate (0.516–0.621).\n  The retired numbers are kept in `data\u002Fresults\u002F` as the archived arms, not as\n  evidence.\n* **Mined eval set, not a curated benchmark.** Maintainer replies are occasionally\n  incomplete or answer a narrower question than the title suggests. The keep\u002Fdrop\n  review pass exists to cut those, and the sheet is committed so the selection is\n  auditable: 200 candidates reviewed, 95 kept (47.5%).\n* **One repository, one domain.** Conclusions about BM25-versus-dense weighting\n  are domain-specific; a different preset will reorder the table.\n* **Title-as-query favours lexical matching — now measured, and it does.** The eval\n  queries are issue titles, which sit close to the maintainer's own wording. A\n  paraphrase experiment (`python -m issue_rag.paraphrase`) rewrites all 95 queries\n  as user-voiced questions that keep the technical identifiers, and re-runs the\n  retrievers over both query sets. Result: **BM25 drops 8.4 points (0.611 → 0.526)\n  while the reranker gains 9.5 (0.621 → 0.716)** and dense gains as well. So the\n  \"the four retrievers are indistinguishable\" finding holds *for title queries* and\n  weakens for real user questions — see\n  [Paraphrased queries](#paraphrased-queries-does-the-title-advantage-hold). The\n  main table's BM25 row should be read as optimistic.\n* **English-only retrieval.** The corpus is English issue text, the BM25 tokenizer\n  applies English stopwords\u002Fstemming, and the embedding model is\n  `bge-base-en-v1.5` — an English-only checkpoint. A question asked in another\n  language is encoded into noise: retrieval returns unrelated threads and the\n  generator correctly refuses instead of inventing an answer. That refusal is the\n  right behaviour but a bad user experience, and it is a *design gap in this eval\n  set*: all 95 items are English issue titles, so the pipeline was never measured\n  on a non-English query. The demo page says \"ask in English\" for that reason.\n  Fixing it properly means either a multilingual embedder (and re-baselining every\n  number) or a translation step in front of retrieval (which would make the demo\n  diverge from the measured pipeline — it is deliberately not shipped).\n* **No multi-hop.** Every question is answered from a single issue thread. Questions\n  that need two issues combined are out of scope.\n* **Absolute scores are generator-bound.** The shipped runs use `deepseek-chat`\n  through `--provider deepseek`; the default generator is a local 3B model, which\n  scores lower in absolute terms. The closed-book vs RAG *gap* is the finding and it\n  survives the stronger generator — the absolute numbers do not transfer.\n\n---\n\n## Repository layout\n\n```\nconfigs\u002Fpresets.yaml      target repositories (swap the domain here)\nsrc\u002Fissue_rag\u002F\n  config.py               paths + preset loading\n  github.py               caching, quota-aware REST client\n  fetch.py                issue + comment harvest\n  corpus.py               cleaning, chunking, document construction\n  evalset.py              candidate mining + human review loop\n  retrieval.py            BM25 \u002F dense \u002F RRF hybrid \u002F rerank\n  generate.py             local HF model + OpenAI-compatible backend\n  judge.py                rubric grading + grounding audit\n  evaluate.py             the experiment matrix and report writer\n  models.py               weight download (ModelScope or HF)\n  serve.py                dependency-free demo UI (needs a server and a key)\n  site.py                 static results site: one self-contained HTML file\ntests\u002Ftest_pipeline.py    hermetic tests: chunking, tokenizer, RRF, filters, parsing\ndocs\u002Findex.html           the static site (generated, live at zaxiu88888.github.io\u002Fissue-rag)\ndocs\u002FBLOG.md              the long-form write-up: three things that went wrong\ndocs\u002FDATA_QUALITY.md      the sampling traps, measured\ndocs\u002FRUNBOOK.md           the two-week execution plan, stage by stage\n```\n\n---\n\n## License\n\nMIT.\n","这是一个面向 GitHub Issues 的检索增强问答（RAG）系统，专注于对 RAG 在开源项目技术支持场景下的效果进行严谨评测与归因分析。核心功能包括：基于真实项目（vitejs\u002Fvite）构建的 95 条人工复核评测集、多配置 RAG 系统对比、以及对自动评分器（LLM-as-judge）本身的四维审计（模型替换、重复运行、规则微调、人工盲评）。项目不追求单一最优指标，而是报告性能增益区间，并揭示检索对准确率提升与幻觉增加的双重影响。适用于开源项目维护者、AI 工程师评估 RAG 实际价值，或研究 LLM 评测可靠性的技术团队。",2,"2026-11-24 04:36:33","CREATED_QUERY"]