TaLibAI
Answer Arabic and English study questions from course materials instead of relying on generic model memory.

- Problem
- Bilingual students need answers from their own slides and notes, not model memory.
- What I built
- An Arabic-English RAG study assistant with FAISS, OCR, and RTL-aware retrieval.
- My role
- Project author: manual RAG build, LangChain refactor, Arabic normalization, OCR.
- Result
- Recorded grounded Arabic answers and honest abstention on out-of-scope questions.
Evidence
More recorded proof

Honest out-of-scope response
Recorded out-of-scope abstention with source links. The preceding reply in the capture contains unrendered answer markup, which is preserved as a visible UI issue.
Problem
What this project had to solve
Students need answers grounded in their own lecture slides, textbooks, and handwritten notes, but bilingual Arabic-English retrieval is harder when OCR, RTL text, and mixed-language queries are involved.
Role / contribution
What I owned in the system
Project author responsible for both the manual RAG implementation and the later LangChain refactor, including retrieval design, Arabic normalization, OCR integration, and local-generation path selection.
Architecture flow
System flow from input to output
Document ingestion
What happens
PDFs, slides, and handwritten notes enter through a loader or OCR path depending on source type.
Why it matters
The assistant only works on real study material if it can handle both clean digital inputs and scanned notes.
Related tools
Engineering decisions
Tradeoffs that shaped the build
Decision 01
Build the system twice
Keeping both a manual pipeline and a framework refactor proves understanding of retrieval internals and higher-level abstractions.
Decision 02
Treat Arabic processing as a first-class concern
Normalization, RTL handling, and OCR support are system requirements, not cosmetic extras.
Decision 03
Support local generation paths
The repo's local-generation design keeps the project closer to a practical student assistant than an API-only demo.
Technical implementation
How the system is built
The repository includes a manual version built around direct FAISS retrieval, Arabic normalization, custom chunking, and explicit grounding mechanics.
A second version refactors the system with LangChain abstractions, hybrid retrieval, LCEL chains, and local Gemma generation through the documented local-first stack.
OCR support is included for scanned or handwritten notes, which keeps the system useful beyond born-digital PDFs.
Stack
Core tools and system layers
Limits and next steps
What is not done yet
- Add retrieval evaluation and citation-quality scoring to quantify answer grounding.
- Improve document lifecycle handling for updates, duplicates, and stale indices.
- Expose a cleaner service boundary for production-style API consumption.
Project explainer
Ask about this project
A case-study guide to the architecture and decisions behind TaLibAI.