What happens when a document is uploaded.
- 01
Upload goes straight to object storage
The client uploads directly to a Cloudflare R2 bucket via a presigned URL — the file never transits the API server itself.
- 02
A job is queued
The API enqueues a processing job on Cloudflare Queues, and an ingestion worker picks it up.
- 03
The document is split into overlapping chunks
Text is divided into a sliding window of roughly 2,048 characters per chunk, with a 400-character overlap so a sentence split across two chunks doesn't lose context.
- 04
Each chunk is embedded
Cloudflare Workers AI generates a 768-dimension vector embedding per chunk, capturing its meaning, not just its words.
- 05
Everything lands in Postgres
Chunks, their embeddings (via pgvector), and a generated full-text-search column all land in the organization's scoped rows, ready to be queried the moment indexing finishes.
- 06
A query searches by keyword, meaning, or both
Keyword search hits the full-text index; semantic search compares your question's embedding against chunk embeddings; hybrid search blends both rankings with reciprocal rank fusion.
- 07
(Planned) An answer is generated with citations
The retrieval-augmented generation layer will take the top-ranked chunks, generate an answer, and attach a citation back to the source file and passage — this step is still being built.
A hosted pipeline, not a desktop app.
A document you upload goes to object storage, gets picked up by an ingestion worker that splits it into overlapping chunks and embeds them, and lands in Postgres ready to be searched — by keyword, by meaning, or both.
Want the full technical reference?
Data model, RLS policy structure, and a capability-by-capability build-status breakdown — for your security and procurement review.