← All case studies
Arabic Extractive Q&A
Retrieval-augmented Q&A over classical Arabic religious texts despite sparse Arabic NLP tooling.
~90%answer accuracy
Context
Users wanted precise answers from classical Arabic religious texts, quoting the source rather than paraphrasing it.
Challenge
Arabic NLP tooling is thin, classical Arabic is harder still, and answers had to come straight from the text.
My role
Built the system end to end.
Architecture
How the system fits together
Simplified for public sharing; client-specific details are omitted.
Approach
Key engineering decisions
- 01
Arabic-aware preprocessing
Text is normalised (diacritics, letter variants) and segmented so retrieval works on classical spelling.
- 02
Retrieval with LangChain
Passages are embedded and retrieved with LangChain against the normalised corpus.
- 03
Extractive answers
Open-source LLMs pick the answer span from retrieved passages, so every answer is a quote with a reference.