Repository navigation
Description
Goal
Every source (file servers, web pages, databases, cloud drives, wikis, trackers, chat, audio) reaches the KB as one canonical structured document. Vector chunking and graph extraction consume that one model, and every chunk carries where it came from and which revision of the source it is. Files on file servers change, so the source history must survive re-ingest. (Owner, 2026-10-18.)
Canonical model, as ruled on #18826 (option a): ExtractedDocument extended with sections. Document → Section (heading path, level, page/time span) → Block (paragraph | list | table(header, rows) | code | quote). Markdown is a rendering of it, never the stored source of truth.
Where it stands today (code sweep of main, 2026-10-18)
- Producers: every producer hands the KB a flat string. Structure survives only by accident: PDF page markers, Office sheet/slide markers, markdown from web fetch.
- Lost structure:
- Notion, Confluence, Jira and HTML upload flatten to plain text.
- DOCX loses headings (fix(document): extract_docx keeps only paragraph text, so heading level is lost and tables are appended away from the heading that introduced them #17985).
/uploaddrops PDF/DOCX tables.- Audio drops segment timestamps.
- Connectors store each whole document as one vector, unchunked (child below).
- Three chunkers, all structure-blind:
autobot_shared.doc_chunking.chunk_plain_text(main ingest), the docs-indexer H2/H3 splitter, and the ECLSemanticChunker(kb: two independent semantic chunkers — the ingest pipeline uses neither the embedding-based one nor its metadata #14485). - Graph: extraction is per chunk and uses no headings, tables or pages. Chunk identity is derived eight ways (tech-debt(kb): chunk identity is derived eight ways, so graph nodes cannot reliably join to vector chunks #18142). Graph attribution is a constant (feat(knowledge): graph attribution is occupied by a constant — every entity's source is "ecl_pipeline" instead of the document it came from #17588).
- Provenance: change detection is by
last_modifiedonly. Nothing records the source revision on a chunk, and a changed source's old chunks and graph edges are not superseded with history.
Tasks
- fix(web_fetch): store crawled pages as document + structure in AutoBot's canonical format — no foreign CSS/scripts/JSON-LD/chrome #18826 — HTML producer + the model extension (sections) + profile seam (sub-issue of feat(web_fetch): task-driven extraction profiles — document / page_copy / media #18839; linked here as related)
- fix(document): extract_docx keeps only paragraph text, so heading level is lost and tables are appended away from the heading that introduced them #17985 — DOCX headings and in-place tables (sub-issue of Hierarchical retrieval and table ingest: two capabilities built and discarded, three quality gaps #14967; linked here as related)
- bug(kb): connectors store every document as ONE vector — connector ingest bypasses chunking #18852 — connectors bypass chunking (one vector per document)
- feat(kb): connector and audio producers emit the canonical structured document — Notion, Confluence, Jira, gdrive, onedrive, upload, audio #18855 — connector and audio producers emit the canonical model
- refactor(kb): one section-aware chunker for every ingest path — three structure-blind chunkers, short sections silently dropped #18856 — one section-aware chunker for every ingest path
- feat(kb): build the graph from document structure — section/chunk edges, table triples, per-section extraction; Graph-RAG entity link never written #18857 — graph built from document structure
- feat(kb): source revision provenance and history on every chunk — content-hash change detection, superseded revisions kept, as-of retrieval #18854 — source revision provenance and history on every chunk
- bug(kb): Nextcloud connector stores PDF/DOCX/ODT bytes as UTF-8 garbage text #18853 — nextcloud ingests PDF/DOCX/ODT bytes as garbage text
Related, not children: #17210 (document-to-document lineage DAG), #18079 (fact versioning not fed), #17538 (retention and liveness), #14485, #18142, #17588, #17209 (clause-aware chunking), #13246 (chunk size never measured).
Chat uploads (owner, 2026-10-18)
Chat file uploads go into a separate chats bucket, not the main KB (owner: "probably"). Tracked as #18889 under the intake umbrella #17527, with its granularity and lifetime questions open there.
Implementation order
- fix(web_fetch): store crawled pages as document + structure in AutoBot's canonical format — no foreign CSS/scripts/JSON-LD/chrome #18826 (model extension), bug(kb): connectors store every document as ONE vector — connector ingest bypasses chunking #18852, bug(kb): Nextcloud connector stores PDF/DOCX/ODT bytes as UTF-8 garbage text #18853, feat(kb): source revision provenance and history on every chunk — content-hash change detection, superseded revisions kept, as-of retrieval #18854 (independent)
- fix(document): extract_docx keeps only paragraph text, so heading level is lost and tables are appended away from the heading that introduced them #17985, feat(kb): connector and audio producers emit the canonical structured document — Notion, Confluence, Jira, gdrive, onedrive, upload, audio #18855, refactor(kb): one section-aware chunker for every ingest path — three structure-blind chunkers, short sections silently dropped #18856
- feat(kb): build the graph from document structure — section/chunk edges, table triples, per-section extraction; Graph-RAG entity link never written #18857
Activity
github-actions commentedon Nov 3, 2026
needs-structure: this issue is missing:M<n> - ...: none is setphase:M<n>.<k>label whose<n>matches the goal milestone: found noneThe label clears on the next issue event once all three are present (#19522).