Retrieval-augmented generation over a 137-book corpus

Retrieval-augmented generation over a book corpus works when chunks preserve argument structure, every chunk carries provenance metadata back to a title and page, and the model is constrained to answer only from retrieved passages or decline.

By Robert Shumake (Ajarn Shaman Shu)

Chunking long-form argument

Fixed-size chunking destroys books. A 400-token window cuts a chapter's premise away from its conclusion, and retrieval then returns a confident fragment that misrepresents the author. Chunk on structural boundaries — section, argument, ritual sequence — and carry a summary of the parent context into each chunk.

  • Split on headings and argument units, not token counts
  • Prepend parent-context summaries so fragments stay interpretable
  • Store title, edition, chapter, and page with every chunk
  • Keep an unmodified original alongside every derived embedding

Citation discipline

An answer without a title and page is not usable for a body of work where precision matters. The system should refuse rather than paraphrase when retrieval scores are weak — an honest 'not covered in these texts' is more valuable to a reader than a fluent blend of three unrelated traditions.

Cross-persona retrieval

This corpus spans two author personas and radically different registers: restored journalism on one side, initiatory practice on the other. Retrieval has to respect that boundary. Blending a newspaper column into an answer about ritual sequence is a correctness failure, not a serendipitous connection.

Continue reading

Stay connected

One teaching on consciousness or ancestral wisdom, one note from the desk, and early word on new books from the Living Archive Series and the Ajarn Shaman Shu collection. No spam, and one click to leave.