Back to featured work
Arabic NLP / RAGComplete
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. A recorded Arabic C++ answer with the retrieval pipeline marked ready and a FAISS index loaded. The same capture also shows an upload timeout to localhost:8000, so it documents the answer and visible UI state rather than a successful upload in that session.
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.
Bilingual RAGManual FAISS pipelineLangChain refactorArabic normalizationRTL-aware retrievalOCR supportLocal Gemma path

Evidence

More recorded proof

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

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

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

  1. Decision 01

    Build the system twice

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

  2. Decision 02

    Treat Arabic processing as a first-class concern

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

  3. 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

PythonFastAPIFAISSLangChainGemmaOllamaGemini Flash OCRStreamlit

Project explainer

Ask about this project

A case-study guide to the architecture and decisions behind TaLibAI.