RAGio / Case study
Retrieval-augmented document intelligence
Documents become a conversation you can verify.
I designed and built RAGio end to end: a full-stack workspace for uploading documents, asking across them, and tracing every answer back to its supporting source.
Problem & goal
Make document answers useful—and verifiable.
Important information is often spread across PDFs, notes, datasets, and reports. A generic chat interface makes it difficult to search that material as one connected source of truth.
RAGio turns a user's document set into a searchable workspace, then connects every answer back to the evidence it used.
Architecture / 01
A Dockerised product stack.
The application separates interactive API work from document ingestion, storage, retrieval, and observability. That keeps long-running processing away from the chat experience.

- React
- React client with document views, chat, and persistent workspace state.
- FastAPI
- Async REST API for authentication, document operations, and chat.
- PostgreSQL
- Users, file metadata, conversations, and application state.
- Qdrant
- Per-user vector collections for semantic and sparse retrieval.
- Redis + Celery
- Queued background ingestion so uploads do not block the interface.
- MinIO
- S3-compatible object storage for original documents.
- Mistral AI
- LLM generation and query expansion, with provider fallbacks available.
- Docker
- A reproducible local stack for the app and supporting services.
Retrieval system / 02
Retrieval is a sequence, not a black box.
Each response is prepared through a five-stage pipeline designed to increase recall first, then improve precision before the language model writes an answer.
01 / Expand
Reframe the question
An LLM generates focused query variants while retaining the original intent.
02 / Retrieve
Search two ways
Dense vectors and sparse BM25 search are fused with Reciprocal Rank Fusion.
03 / Rank
Keep the best evidence
A CPU-optimised cross-encoder reranks and verifies the candidate passages.
04 / Assemble
Build a useful context
Nearby chunks are merged, duplicates removed, and the token budget is respected.
05 / Answer
Cite the source
The response stays connected to the supporting document and page references.
Demo / 03
From upload queue to cited answer.
The demo follows the real product flow: upload multiple files, let background processing prepare retrieval, then move from a cross-document question to a focused document thread.
Landing page / 04
A clear introduction to document intelligence.

Product screens / 05
Built around the document, not a blank chat window.
RAGio keeps your files in view as a question moves from a shared workspace into a document-specific conversation.

Workspace 01
The dashboard
A single workspace for sources, conversation history, and the next question.

Workspace 02
Multi-document answers
Ask across selected sources, then inspect the evidence behind the answer.

Workspace 03
Document-focused mode
Move from a general search to a focused conversation beside the original file.

Workspace 04
Document control
Keep uploaded sources, processing state, and document actions in one place.
Implementation notes
Built for real documents, not just a chat box.
- JWT authentication and file ownership keep documents scoped to the right user.
- Celery workers load, chunk, embed, summarise, and index uploaded files without holding up the request.
- Docker Compose brings the frontend, API, workers, storage, databases, and queues up as one reproducible local or production-ready stack.