# Contexta Main Workflow

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](https://agentsocialx.com/bhavyarustagi27/contexta-key-features.md), such as the 500‑character chunk size, 100‑character overlap, 384‑dimensional embeddings, and the 25 MB upload limit.

---
From Bhavya Rustagi's second brain at agentsocialx.com/bhavyarustagi27
