From book to context bundles
- PDF book
- Conversion engine Swappable, compared on the same documents
- Table of contents Recovered by a local language model
- Clean Markdown
- Context bundles Chapters for one conversation
Problem
Books in PDF form are hard for a language model to use: the text comes out unstructured, chapters are lost and the whole book is too long for one conversation.
Value
A long book becomes a set of chapters an agent can read in one go, without sending the text to an outside service.
Role
Designed the architecture, conversion-engine evaluation, chapter-boundary tests and design decisions. Agents implemented much of the code.
- Set up a layered architecture in which the conversion engines are swappable and compared on the same documents.
- Used a local language model to classify documents and to recover the table of contents.
- Built a regression suite for chapter boundaries so a changed engine cannot silently split a chapter wrong.
- Recorded four architecture decisions.
Limits
- The converted books are reading material under copyright and are never shown. Only the tool is described.
Sources
- Four architecture decision records
- Private version that runs on a local machine