Backend

Document Intelligence

A RAG pipeline built for messy real-world document sets.

Document Intelligence ingests documents in whatever form they arrive, PDF, DOCX, HTML, or scanned images, and makes them searchable by meaning rather than by keyword. It exists because most RAG demos assume clean plain text and most real corpora are not that.

Retrieval is hybrid, combining dense vector similarity with sparse lexical matching, so exact identifiers and paraphrased questions both work.

Ingestion

Multi-source ingestion handles PDF, DOCX, HTML, and images, normalising them into a single chunked representation before embedding.

Retrieval quality

  • Hybrid dense and sparse retrieval.
  • Chunking strategies tuned against the corpus rather than left at defaults.
  • Re-ranking applied to the candidate set.
  • Query augmentation to widen recall on short or ambiguous questions.

Deployment

Containerized end to end, so an environment can be reproduced exactly. PostgreSQL and MongoDB back the metadata and document stores, with a FastAPI service in front.

Stack

Service
FastAPIPython
Retrieval
Vector embeddingsHybrid searchRe-ranking
Storage
PostgreSQLMongoDB
Infra
Docker