Gå til hovedinnhold

Feed content to your AI

Goal: turn any document (Word, PDF, JSON, Markdown, HTML) into a stream of clean, anchored content blocks an AI assistant or RAG pipeline can read without knowing anything about the source format. No translation is involved. Every block carries a reference (ref: its document and its key) and the revision of its text (rev), so an edit produced later can be written back to the same block with the surrounding markup intact, and refused if the block changed in between. Concepts: Content model, Checks.

In Kapi Desktop you check what your AI will read before you index it:

  1. See what your AI will see. Open a file in your project: the Blocks view lists the blocks kapi inspect reads, each with its text and structural role and the surrounding markup stripped away.
  2. Judge the parse before you index. Preview (plus Structure and Layout where the format carries them) shows whether headings, tables, and reading order came through. A parse problem is cheaper to fix here than after it shows up in retrieval.
  3. Then stream. The feed itself is kapi inspect --jsonl (CLI tab), or a connected assistant reading blocks directly (Agent tab).

In a project​

In a kapi project, kapi stats, kapi inspect, and kapi check with no file argument survey every source the recipe declares. A block's reference is its project-relative path and its key, which stays the same across runs while the block is there, so an assistant indexing your project can retrieve and rewrite the same blocks over time.

Further reading​