All projects
In progress

Home RAG · Master's thesis

Ask questions in Arabic about German documents and get answers with sources, measured, not guessed.

RAGHybrid retrievalMultilingual embeddingsEvaluationMaster's thesis

Problem

Reading a document is easy for today's models. Choosing the right document is the hard part: across languages, as the archive grows, and for questions that need a sum rather than a paragraph.

Architecture

  1. 01 Question (AR / DE / EN)
  2. 02 Router: docs or numbers
  3. 03 Keyword + vector search → fusion
  4. 04 Answer with citations
  5. 05 Evaluation set

Key decisions

  1. Hybrid retrieval: keyword search (exact invoice numbers, names) plus multilingual vectors (Arabic question → German letter), merged with reciprocal rank fusion.
  2. Embeddings run locally on small hardware, so documents never leave the house; only the selected passages go to the answering model.
  3. Numeric questions go to predefined, parameterised queries. The model never writes free SQL.
  4. Everything is measured on an evaluation set: Recall@k, MRR, answer faithfulness, latency and cost per question.

What I learned

  • In progress. The thesis compares keyword, vector, hybrid and reranked retrieval, plus tokenizers for German compound words.

Repository

Repository coming soon