Overview
Extract
The extractor for the file’s extension turns bytes into text units. One unit per page for a
PDF, so page numbers survive into citations.
Chunk
Units split along the document’s real structure, each chunk carrying a breadcrumb like
Guide > Setup > Postgres.Embed and store
Embedded in batches before the transaction opens, so the database write stays short and
all-or-nothing.
Documents are mirrors of files, so the belief machinery does not apply: no dedup, no conflicts,
no versions. Re-adding an unchanged file is a no-op; a changed file atomically replaces its
chunks.
Built-in extractors
Recordings have their own page: see Recordings. Web pages that build
themselves in the browser are refused with advice rather than stored empty.
What the PDF extractor can and cannot do
What the PDF extractor can and cannot do
Text is rebuilt from glyph geometry rather than stream order, so equation-heavy PDFs come out in
reading order and 2-up print layouts are de-duplicated.Symbols a PDF’s fonts never map to Unicode (∞, ∈, ≠) cannot be recovered from the text layer.
That needs OCR, which is deliberately out of scope.
Two chunking strategies
Both follow one rule: a chunk never starts mid-section, and always knows where it came from.
Every chunk gets its breadcrumb prepended to the text, so both the vector and keyword arms see
the section context along with the paragraph. Text with no structure degrades to plain size-based
splitting.
Why characters and not tokens
Why characters and not tokens
Both are sized in characters on purpose. A tokenizer dependency buys nothing when the embedding
model has that much context headroom.
Adding a format
One object, no fork.Directories are scanned recursively.
node_modules and dotfiles are skipped, and only files
with a registered extractor are picked up. Version 1 is unsalted, so existing stores do not mass
re-ingest on upgrade.