Ask your documents in Arabic
An Arabic RAG system that reads laws, contracts and notes, and answers with the source of each point.
An example I built for my own documentsYour documents stay on your server: reading, search and answers all happen in house, and nothing is sent to a cloud service.
The idea
I built it because I need it: I use it to review my documents, contracts and obligations, and to answer some legal questions from Arabic laws and regulations.
Many of these documents are scanned, and searching them by hand is slow. The system reads and indexes them, then answers the question and says where the answer came from.
How it works
- 1
Reads scanned documents with PaddleOCR-VL, then a local model classifies them automatically: law, contract, letter, invoice.
- 2
Splits notes by their headings, then nomic-embed-text turns each chunk into a vector.
- 3
Searches by meaning and by keywords together and merges the results. For Arabic questions it weights keywords higher, because they are more precise in Arabic.
- 4
Qwen 3.8 27B writes the answer and cites the source of each point.
- 5
All of it runs on my machines, so the documents never leave them.
"What do I owe under the contract?"
Embeds the question
Meaning and keywords
Laws, contracts, notes
Reads and classifies
Documents and notes archive
Writes the answer with a source for each point