DEV Community

goodlords
goodlords

Posted on

AmendAQ vs a fixed traditional RAG pipeline and LightRAG on 80 handbook questions

AmendAQ is a support agent that answers from published FAQ rows you can revise one at a time, not from retrieved chunks. The model only ticks published item IDs from the title list. The program loads those full texts, the model composes from them, and a rule-based verifier — not another model call — rejects invented obligations and self-contradictory replies. Edit one published row, and the next question reads the new text. There is no re-embed step.

That path is slower than a short-context RAG pipeline. The question is when the extra cost buys something. I ran the same 80 questions against AmendAQ, one locked traditional RAG pipeline, and LightRAG 1.5.8, all with the same generator: Qwen3.6. The fixtures and the runner are in the repo. This is that run, not a public-leaderboard claim.

AmendAQ workflow: ID selection, rule verification, and instant FAQ publish

What was compared

The corpus is a fictional employee handbook (Chenghai Precision). Two texts from the same package are public in the repository: the source handbook (about 4,997 Chinese characters) and the published FAQ derived from it (211 entries in the main run). The questions and rubric answers are in the repo too, including 20 added cross-entry items.

There are two conditions:

  • Condition A. All three systems read the published FAQ. Same knowledge, different methods.
  • Condition B. Traditional RAG and LightRAG read the source handbook. AmendAQ still reads only the published FAQ. The source text does not include operator-written refusal sentences such as "the handbook has no such rule."

The traditional pipeline is fixed in the repo: 500-character chunks with overlap 80; jieba BM25 plus BAAI/bge-large-zh-v1.5, fused with RRF, then bge-reranker-large, keeping the top 5 passages. LightRAG is version 1.5.8 with its default mix query and the same embedding and reranker pair. GraphRAG was not included. Scoring is programmatic — obligations, numbers, refusals, and invented claims — not model self-judgment.

The 80 questions extend an earlier 60-question set. Twenty new items (x_cross_*) were added so that 30 questions in total require two or more FAQ entries (the original 10 c_* items plus the new 20). AmendAQ sends titles in batches of 200, so 211 entries are scanned in two batches.

Condition A: same published FAQ

Type n AmendAQ Traditional RAG LightRAG
Single-point lookup 9 9/9 9/9 9/9
Obligation true/false 30 29/30 28/30 25/30
Numeric 25 22/25 21/25 24/25
Refusal 8 6/8 8/8 8/8
No invention 8 8/8 8/8 6/8
Total 80 74/80 74/80 72/80

AmendAQ did not beat the traditional pipeline on overall accuracy. It tied at 74/80. LightRAG was two points behind, mainly on obligations (25/30) and invention (6/8). LightRAG led on numeric questions (24/25 vs 22/25 and 21/25). AmendAQ was weakest on refusal (6/8); both retrievers scored 8/8. The AmendAQ misses are listed in the repo write-up.

Cost is not a tie. Median wall-clock per question was 8.1s for traditional RAG (retrieval 4.8s + generation 3.0s), 22.4s for AmendAQ, and 33.9s for LightRAG. Traditional RAG indexed in 3.4s; LightRAG's index took 903.0s. AmendAQ has no separate index step. Input tokens over 80 questions were 152,062 (traditional), 1,237,956 (AmendAQ), and 1,338,608 (LightRAG). AmendAQ used 257 generation calls, because a question often includes title-batch selection plus compose; traditional RAG used 80, LightRAG 160.

Cross-entry questions

The useful gap is not the headline total. On the 30 questions that must use two or more published entries, AmendAQ scored 29/30 under both conditions. Traditional RAG and LightRAG scored 27/30 under both conditions.

On the original 10 multi-entry items, AmendAQ was 10/10 in both conditions; traditional RAG was 9/10 in A and 8/10 in B; LightRAG was 9/10 in both. On the 20 new items, AmendAQ was 19/20; traditional RAG was 18/20 in A and 19/20 in B; LightRAG was 18/20 in both. The subset is small, but it is the case the system was built for: drop one rule and the answer is wrong, and ticking IDs is a direct way to keep both rules in the prompt.

Those 20 items were also slower for AmendAQ (condition A medians: traditional 8.7s, AmendAQ 26.2s, LightRAG 36.8s).

Condition B, briefly

When the retrievers read the source handbook instead of the FAQ, the totals were AmendAQ 74/80, traditional RAG 73/80, LightRAG 74/80. Traditional RAG got faster (median 5.7s). LightRAG's index was 644.0s and the median question 26.7s. AmendAQ's numbers do not change, because its corpus does not change. Condition B is a reminder that the raw handbook and the published FAQ are not the same text.

An earlier 103-entry / 48-question condition A run had LightRAG at 48/48, with AmendAQ and traditional RAG at 46/48. That is why I would not sell AmendAQ as a general RAG replacement. On a small, already-structured FAQ, a graph retriever can also be exact, and a well-tuned chunk pipeline is hard to beat on latency.

When I would actually use it

I would consider AmendAQ when the unit of knowledge is already a published, editable Q&A — a policy handbook, a service guide, a school rulebook — on the order of tens to a couple of hundred entries, and when a missed second rule is worse than a slower answer. I would not use it as a million-document search engine, and I would not use it if the source is still a long undifferentiated document that first has to be found.

The comparison locks one traditional pipeline and LightRAG 1.5.8. Embedding and reranker revisions are recorded in the repo. Reproduce the 80-question run with:

uv sync --extra compare
uv run python scripts/run_compare.py --out-dir data/eval/compare200 --report docs/对比测试_澄海手册_200条.md --systems AmendAQ,traditional,lightrag --resume
Enter fullscreen mode Exit fullscreen mode

The --out-dir name matters: compare200 is what includes the 20 cross-entry questions. The full tables, per-question matrix, and fixtures are in the repository. A Chinese walkthrough of the same numbers is in the AmendAQ, a better RAG? series.

Top comments (0)