📁 RAG Analysis

Project case study

RAG Analysis

Find information in long PDFs and show the page supporting each answer.

FastAPIQdrantDockerCrossEncoder

The approach

Combines PDF validation, chunking, embedding retrieval and CrossEncoder reranking. Answers include source cards with document and page references.

Results and scope

What the project demonstrates

An evaluation workflow tracks Hit@K, MRR and latency. When source evidence is insufficient, the application returns an explicit response without calling the language model.

How it works

  1. Validate, clean, chunk and index PDFs in Qdrant
  2. Retrieve relevant chunks and rerank with CrossEncoder
  3. Show the answer with document and page references

Run locally

Windows PowerShell: run from the repository root. See the README for required settings and dependencies.

Copy-Item .env.example .env
docker compose up --build -d
docker compose ps

Check

docker compose --profile test run --rm backend_test pytest

Scope and limitations

Questions without sufficient source evidence return an insufficient-information response. Hit@K and MRR depend on the evaluation set; this page makes no general accuracy claim.

Technical documentation ↗