Open-source document intelligence · 2025–Now
DocuLens AI
Reliable document AI begins with provenance, measurable retrieval, and asynchronous work—not a clever prompt.
12. Term and termination
Renews annually unless either party gives 60 days’ written notice.
01 · Agreement.pdf
Page 18 · 96%
02 · Renewal schedule
Page 4 · 89%
10K+
documents designed for
<800ms
retrieval latency
<3s
end-to-end response
01
Problem
Business documents contain decisions, obligations, and evidence, but most systems flatten them into text and return answers that are difficult to audit. Teams need a way to ingest files at scale, retrieve the right context, and trace every answer back to a source.
02
Why it matters
A plausible answer without provenance is operationally weak. In document-heavy work, the system must make failure visible: what was retrieved, which page supported the answer, and how confident the pipeline is.
03
Architecture
- 01React console
- 02FastAPI gateway
- 03Durable event
- 04Celery worker
- 05Docling + chunks
- 06pgvector retrieval
- 07Grounded answer
04
Product surface



05
Technical challenges
Preserving evidence
Every vector carries document, chunk, page, title, and token metadata so citations survive ingestion, retrieval, and answer generation.
Separating latency classes
FastAPI acknowledges work quickly; Celery handles extraction and model calls with bounded execution, late acknowledgement, and worker-loss recovery.
Making retrieval testable
Offline Recall@K and MRR utilities turn chunking and ranking changes into experiments instead of aesthetic prompt tweaks.
06
Tradeoffs
Modular monolith over early microservices
One deployable backend keeps operations and contribution simple until scaling evidence justifies extraction.
Dense-first retrieval
A coherent baseline came before hybrid ranking; reciprocal-rank fusion is reserved for a labelled benchmark.
Read-only public showcase
Recruiters can inspect completed workflows without public uploads, visitor data, or model spend.
07
Experiments
- 01Measured retrieval independently from generation with labelled relevant-chunk fixtures.
- 02Bounded chunks by tokens while preserving layout and page provenance.
- 03Added provider-neutral structured outputs to compare model behavior behind the same contract.
08
Results
Sub-800ms retrieval and under-three-second end-to-end responses in the project benchmark.
One operator surface for ingestion, classification, summaries, search, QA history, and lifecycle actions.
MIT-licensed implementation with CI, typed contracts, deployment runbooks, and an openly accessible product tour.
09
Lessons learned
- Evaluation belongs beside retrieval code, not in a separate demo notebook.
- Citation UX is part of model reliability because it changes how people verify and act on answers.
- A public demo can communicate a system honestly without exposing mutable infrastructure.
10
Future work
- Publish a redistributable labelled retrieval benchmark.
- Evaluate dense and keyword fusion with reciprocal-rank fusion.
- Add OpenTelemetry traces and provider latency and cost dashboards.