Back to featured work
Arabic NLP / RAGComplete

TaLibAI

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

Bilingual RAGManual FAISS pipelineLangChain refactorArabic normalizationRTL-aware retrievalOCR supportLocal Gemma path

Local project explainer

Ask about this system

A local, predefined assistant for the documented details in TaLibAI.

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.

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.

Architecture flow

System flow from input to output

Step 01

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

Gemini Flash OCR

Engineering decisions

Tradeoffs that shaped the build

Build the system twice

Keeping both a manual pipeline and a framework refactor proves understanding of retrieval internals and higher-level abstractions.

Treat Arabic processing as a first-class concern

Normalization, RTL handling, and OCR support are system requirements, not cosmetic extras.

Support local generation paths

The repo's local-generation design keeps the project closer to a practical student assistant than an API-only demo.

Stack

Core tools and system layers

PythonFastAPIFAISSLangChainGemmaOllamaGemini Flash OCRStreamlit

Evidence

Grounded project proof

TaLibAI interface displaying a structured Arabic answer to a C++ question, with the retrieval pipeline marked ready and the FAISS index loaded.

Arabic-first grounded Q&A

TaLibAI answering an Arabic C++ question from indexed course material, with the interface showing the loaded retrieval pipeline and FAISS index state.

TaLibAI interface explaining that the indexed documents do not fully cover the user's question.

Honest out-of-scope response

TaLibAI responding conservatively when the indexed documents do not contain enough information to fully answer the question.