SEK·All projects ↗

2026 / data · digital · fullstack

Financial Document RAG

Local retrieval for sensitive financial documents.

Multilingual RAG with PDF extraction, OCR fallback, local vector search and a rate-limited API.

  • Python
  • FastAPI
  • FAISS
  • Tesseract
  • DeepSeek

01 / PROBLEM STATEMENT

Why this work exists

Financial and regulatory documents can be scanned, multilingual, and inappropriate for wholesale external indexing. The prototype keeps extraction and retrieval local while sending only retrieved context to generation.

Data and source material

  • PDF documents with native extraction and Tesseract OCR fallback
  • Semantic chunks with overlap
  • Multilingual MiniLM embeddings stored in a FAISS index

02 / SOLUTION OVERVIEW

From input to usable output

Extract locally, chunk semantically, index embeddings in FAISS and send only retrieved context to generation.

  1. 01

    Extract PDF text or invoke French OCR

  2. 02

    Split content into overlapping semantic chunks

  3. 03

    Embed and index chunks locally

  4. 04

    Retrieve relevant context for a question

  5. 05

    Inject bounded context into deterministic DeepSeek generation through FastAPI

03 / TECHNICAL ARCHITECTURE

Implemented components

Documented component map
01

PDF/OCR → chunks → embeddings + FAISS → context → LLM via FastAPI

Diagram synthesized from the pinned repository documentation; it is explanatory, not a runtime topology capture.

04 / METHODOLOGY & IMPLEMENTATION

Decisions that shape the system

  • paraphrase-multilingual-MiniLM-L12-v2 creates multilingual embeddings.
  • FAISS performs local vector similarity search.
  • The generation configuration uses zero temperature, while SlowAPI rate limiting protects the web endpoint.

Implemented capabilities

  • PDF + OCR
  • Multilingual embeddings
  • FAISS
  • Context grounding
  • Rate limiting

05 / RESULTS & EVIDENCE

What the source supports

  • The repository documents a working local retrieval and FastAPI prototype with a browser interface.
  • It does not provide a retrieval benchmark, answer-accuracy evaluation, or production-security assessment.

Results preserve the repository’s units, evaluation framing, and stated limitations. Missing evidence is not converted into a claim.

06 / CHALLENGES & LIMITATIONS

Where the evidence stops

  • An external DeepSeek key is required for generation.
  • Zero temperature improves repeatability but cannot guarantee factual answers.
  • The public documentation does not quantify retrieval recall, hallucination rate, latency, or OCR quality.

07 / WHAT THIS DEMONSTRATES

Engineering signal

Document ingestion, OCR fallback, semantic retrieval, API design, and privacy-aware separation of local processing from external generation.

08 / SOURCE & RELATED WORK

Trace the evidence

RepositoryChatbot ↗
Audited files

README.md · main.py · pdf_reader.py · recherche_semantique.py · prompt.py