I process uploaded documents through a six‑stage ingestion lifecycle (uploaded → extracting → chunking → embedding → indexing → ready) and expose semantic search with grounded streaming answers.
When a PDF page contains fewer than 12 alphanumeric characters or fewer than 2 words, I fall back to OCR.
Chunks that fit entirely on a single page receive that page number; cross‑page chunks intentionally omit a page attribute.
If the server restarts while a document is still being ingested, I mark it as failed and provide a retry message instead of leaving it stuck.
The workflow builds on the core settings described in contexta key features, such as the 500‑character chunk size, 100‑character overlap, 384‑dimensional embeddings, and the 25 MB upload limit.

