﻿# kb-rag: incremental literature ingestion with a passage trail

kb-rag reports fast unchanged-file ingestion and warm retrieval. Its page and DOI trail helps verify sources, while answer quality still needs separate evaluation.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/kb-rag-incremental-literature-provenance-timing/
Language: en

kb-rag makes a local literature collection searchable while preserving a route back to the passage behind each result. Its useful distinction is the combination of incremental ingestion and inspectable evidence locations. Those capabilities address library maintenance and source navigation; they do not establish that generated answers are correct.

## What the local evidence contains

The [canonical repository](https://github.com/Breeze136/dsh-kb-rag) describes local PDF and Zotero ingestion into SQLite, hybrid retrieval and optional reranking. Results carry a physical page, section and DOI. Scanned documents require separate OCR. A DOI identifies a work, while the physical page locates the extracted passage; neither automatically proves that the passage supports the answer.

This matters when a reader remembers a figure rather than a paper title. A useful result needs enough surrounding text to interpret the figure and enough provenance to reopen it. The generated response should preserve qualifications such as experimental conditions, rather than presenting every nearby citation as support for its entire paragraph.

## Separate unchanged files from obsolete parsing

SHA-256 allows the project to skip unchanged content and recognize identical copies. The reported ingestion run processed 242 files totaling 1.8 GB in 85.9 s; an unchanged rerun took 2.17 s. This compares fresh work with checking already indexed material, rather than demonstrating equally large improvements for newly added documents.

The [changelog](https://github.com/Breeze136/dsh-kb-rag/blob/main/CHANGELOG.md) provides a separate maintenance lesson: a parser revision can make existing chunks stale even when source bytes have not changed. Its described migration requires rebuilding chunks rather than merely refreshing metadata. Hash equality answers whether the file changed; parser compatibility answers whether its current interpretation remains suitable. These are different questions, as the discussion of [document revisions and stale citations](/journal/rag-document-updates-stale-chunk-citations/) explains.

## Read the timing as retrieval evidence

The project's Windows CPU measurements use 248 documents and 20,760 chunks: warm quick queries take 0.33–0.38 s, while deep queries take 1.4–1.9 s. A cold first call can reach 8.9 s. These are author measurements for particular corpora and execution states, rather than a guarantee for another library.

A library user experiences several boundaries: loading models, retrieving evidence, composing an answer and opening its source. Reporting the retrieval stage alone cannot describe the complete interaction. Repeated identical questions can also exercise caching rather than demonstrate that unfamiliar questions are equally fast. A meaningful comparison would retain the question set and identify which state each measurement represents.

## Verify support after resolving the source

The maintenance notes also describe a relevance floor that can return no hit. Such abstention is useful, but its presence does not supply a measured false-positive rate. The reviewed material does not establish numerical retrieval, answer or citation quality for the target library.

For evaluation, select questions whose supporting passages are known, include questions absent from the collection and inspect what the answer actually asserts. Check whether page references survive a changed PDF and whether removed material remains searchable. [Citation support and completeness](/journal/rag-citation-precision-completeness/) should be assessed separately: a resolvable page can support only part of a sentence, and an accurate answer can still leave important claims uncited. kb-rag's inspectable passage trail makes these checks possible; operational speed does not replace them.
