Ideas · Builder Notes

Docling ingestion with per-section classification

Kognita alpha 0.4 ingests Markdown, HTML and DOCX into one knowledge item per section, classifies each section and cites the passage that matched.

A whole document often has one confidential section. Classifying it as a single block either over-restricts or leaks.

Documents are parsed with the pinned Docling extra. The chunker is Kognita's own: it walks the parsed tree and splits on section boundaries, and classification is per section subtree.

Retrieval cites the passage that matched, so an answer can be traced to its source text.

Structured ingestion became an optional extra, not a core dependency. Decoded entities and escapes broke the passage locator at first. A follow-up searched a decoded view mapped back to the raw source.

What I'd do differently

I'd test with escaped and encoded text from day one. That is exactly what broke the passage locator.

Worth stealing

Classify at the granularity you retrieve at.

Sources

Kognita is an open-source alpha. This note comes from Kognita PR #36 in the Kognita repository.

All ideasEmail Ahmed