Corpus: ask your documents a question
A multi-tenant RAG platform. Organizations upload PDFs (even scanned ones) and Word, HTML or Markdown files; workers index them in the background; every question gets a streamed answer that cites its sources down to the page.
It plugs into any website with a single script tag, and answers "not in the documents" rather than making things up.
Free hosting: the first load can take a minute.
From uploaded document to cited answer
Under the hood
- Multi-tenancy enforced by the database: PostgreSQL Row-Level Security, composite foreign keys; a query that forgets its filter cannot leave its tenant.
- Durable ingestion: task queue on PostgreSQL, FOR UPDATE SKIP LOCKED, leases and heartbeats, protection against zombie workers.
- Hybrid search: vector and full-text in parallel, RRF fusion, cross-encoder re-ranking.
- Operable: Prometheus metrics, OpenTelemetry traces, Grafana dashboard, load shedding with 503s beyond capacity.
Measured, not assumed
| Strategy | Recall@1 | MRR | p50 |
|---|---|---|---|
| Full-text only | 0.738 | 0.869 | 7 ms |
| Vector only | 0.550 | 0.717 | 17 ms |
| Hybrid (RRF) | 0.838 | 0.929 | 19 ms |
| Hybrid + cross-encoder | 0.900 | 0.958 | 870 ms |
The first overload test exposed a connection pool deadlock that made the API collapse instead of degrading gracefully. It is fixed and covered by a regression test.