Roadmap: Multimodal Ingestion — Diagrams, Images, Scanned Documents

Gap statement: visual content is invisible to a text-only retrieval stack

Wikantik's ingestion is text/markdown-centric: Tika extracts text from office formats, and images/diagrams pass through as opaque attachments that no index ever sees. The sharpest formulation from the research: lexical and dense text retrieval simply cannot retrieve diagrams and figures — the content class where architecture decisions, network topologies, and process flows actually live. For a knowledge base aimed at engineering teams, that is a systematic blind spot, and it compounds once connectors (RoadmapConnectorFramework) start pulling in slide decks and scanned PDFs.

Market grounding

Current Wikantik state

Proposed direction (phased, cheapest useful step first)

  1. Phase 1 — vision captioning at ingest: run page images and embedded document figures through a local vision model (Ollama); store the caption as an indexed chunk anchored to the image's position (heading_path of the surrounding section) and as alt-text on the rendered page (an accessibility win in the same stroke). Retrieval stays text-only; the content becomes text.
  2. Phase 2 — OCR for scanned PDFs: wire Tesseract into the Tika pipeline behind a per-document heuristic (no text layer → OCR); scanned-document ingestion is table stakes for legal/ops corpora.
  3. Phase 3 (later) — multimodal retrieval: multimodal embeddings and image-as-query. Only justified if Phases 1–2 show demand; it forks the dense-index schema and should not be attempted before the eval harness can measure it.

Phase 1 scope and acceptance criteria

First session scope: extend eval/bundle-corpus with 10–15 queries whose gold answer is a diagram/figure, then a batch captioner (extractor-CLI pattern) over the attachments of one test page set. No save-pipeline hook yet.

Phase 1 is done when:

  1. The diagram-query eval set exists with gold sections agreed before any captioning code runs (the eval comes first — without it Phase 1 cannot be honestly accepted or rejected).
  2. Captions are indexed as chunks anchored to the correct heading_path, and rendered pages show them as alt-text.
  3. Diagram-set recall@12 ≥ 0.5 (baseline is ~zero — visual content is currently unretrievable), and overall corpus recall@12 shows no regression below the 0.74 baseline (caption chunks must not crowd out text sections).
  4. The captioner is idempotent: re-running over already-captioned attachments produces no duplicate chunks.

Verify before designing on these

Non-goals

Investigation starting points

See Also