Steadlith

Incremental RAG indexer

A small documentation edit can shift fixed chunk boundaries and make a retrieval index re-embed text that never changed. Steadlith keeps chunk identities stable across edits and refreshes only the parts of the index that need new work.

Steadlith social card illustrating the reuse of unchanged chunks

Measured results

  • 31.8%

    less text sent for re-embedding

    Compared with fixed-size chunking on the bundled edit benchmark.

  • 5.76 s → 1.69 s

    median index refresh time

    Compared with full-document re-embedding on real documentation edits using a preloaded MiniLM model on CPU.

What I built

I used Rabin fingerprinting to find boundaries based on the text itself, then keyed the embedding cache by content. The index can reuse an embedding when an unchanged passage moves to a different offset.

I built a plan-and-apply workflow with atomic SQLite snapshots. Readers see a consistent version of the document index while updates add changed chunks and retire old ones.

Stack

  • Python
  • SQLite
  • OpenAI SDK
  • Transformers
  • TypeScript
  • pytest