Sanad – Bilingual Arabic/English Banking RAG Assistant
Aya Mydani
Published
0
Live demo: https://www.twine.net/signin
Code: https://www.twine.net/signin
The brief
Bank customers struggle to find clear answers about fees inside long PDF documents. I built Sanad (سند), an AI assistant that answers questions about Dubai Islamic Bank fees in Arabic or English, using only the bank’s public documents, and cites the exact PDF page for every answer.
What I built
- RAG pipeline over DIB’s current schedules of charges, card key-fact statements and warning documents
- Hybrid search: vector search (Voyage AI embeddings + PostgreSQL pgvector) combined with Postgres full-text search
- Structure-aware chunking that detects headings by relative font size, compared against size-based chunking during evaluation
- Customer-segment filtering (standard, Wajaha, Aayan, business), so answers match the right fee schedule
- Agent mode: Claude gets search as a tool and decides what to look up. It beat the simple pipeline in my evals and is now the default
- Evaluation set to measure retrieval and answer quality. I tested contextual retrieval too, and reverted it when it lowered retrieval scores
Stack
Python, FastAPI, PostgreSQL + pgvector (Neon), Claude API, Voyage AI, React, TypeScript, Vercel
Result
A working, deployed bilingual assistant that gives cited, verifiable answers. Every design choice was tested with evals, not guessed.