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
- 01 Question (AR / DE / EN)
- 02 Router: docs or numbers
- 03 Keyword + vector search → fusion
- 04 Answer with citations
- 05 Evaluation set
Key decisions
- Hybrid retrieval: keyword search (exact invoice numbers, names) plus multilingual vectors (Arabic question → German letter), merged with reciprocal rank fusion.
- Embeddings run locally on small hardware, so documents never leave the house; only the selected passages go to the answering model.
- Numeric questions go to predefined, parameterised queries. The model never writes free SQL.
- 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