Project · Retrieval-augmented generation
myScholar
Live Try it
Source code ↗Ask my research
Try one
How it works
- 01 Classify the question
- 02 Retrieve
- 03 Check its premise
- 04 Generate
- 05 Verify citations
- 06 Check groundedness
- 07 Answer, or refuse
Routed before retrieved
Bibliographic questions compile to SQL over Crossref-verified metadata rather than going to a model at all. Questions the corpus does not cover are refused with a reason and a list of what it does hold.
Chunks that know their paper
Docling parses two-column IEEE PDFs into sections, and each chunk is embedded under a header naming its paper and section. That is what lets a question about torque ripple find a passage whose text only says it fell by 18%.
Two retrievers, fused
Dense pgvector and lexical tsvector search run in parallel and are fused by reciprocal rank. A corpus this dense in identifiers (FCS-MPCC, NSGA-II, T-Type VSI) rewards exact term matching as much as similarity.
Citations checked in code
Each citation is checked against the passage it came from by code, not by asking a model whether it hallucinated. A sentence that fails is dropped and the rest of the answer stands. Click a citation in an answer to see the paper and section behind it.
Results
Each mechanism was measured by adding it to the pipeline before it, with the index, embedder and generator held fixed. These are the six steps on the path to what ships.
| Configuration | Unsupported claims | Correct refusal | Over-refusal |
|---|---|---|---|
| Naive: dense retrieval, one call | 51.4% | 75% | 17.6% |
| + Hybrid retrieval, span expansion | 56.5% | 65% | 11.8% |
| + Citation-marker prompt | 17.3% | 95% | 11.8% |
| + Routing | 12.3% | 90% | 0% |
| + Citation verification | 11.8% | 90% | 0% |
| + Groundedness check | 8.3% | 90% | 0% |
Most of the improvement came from the prompt
Better retrieval made groundedness worse: given more relevant material, the model wrote more claims the passages did not support. Instructing it that every sentence must carry a citation marker took wrong claims from 2.84 per question to 0.38, which is 87% of the total improvement.
Measured, then removed
- Cross-encoder rerankerhit@1 fell from 0.81 to 0.65. End to end it was no better (8.3% against 8.5% unsupported) and two seconds slower per answer.
- Relevance gradingAdded wrong claims and cost ten points of correct refusal, with no gain on questions where several papers cover the subject.
- Regeneration after a failed checkAdded wrong claims and cost fourteen points of attribution. A failed sentence is now dropped and the rest of the answer stands.
- 0.86
- retrieval MRR
- 90%
- papers an answer needs, found
- 87%
- right paper cited
- 3.3 s
- per answer, hosted
Limitations
- A broadly phrased question about a topic covered by two papers can be answered from one of them.
- A false premise asserting a number the corpus contradicts is still sometimes accepted.
- Faithfulness is judged by a small model, so the unsupported-claim rate is a lower bound.
- Every measurement uses fewer than 50 questions, from a set that has informed design decisions.