# 🧠 Arabic FAQ RAG > **Arabic Semantic FAQ Retrieval with Intent Classification and Intent-Aware Reranking** ## 🚀 Live Demo Try the deployed application: https://arabic-faq-rag.streamlit.app/ --- ## 📌 Overview **Arabic FAQ RAG** is an Arabic semantic retrieval system designed to retrieve relevant answers from a large FAQ knowledge base. The system combines: * Arabic intent classification * Multilingual semantic embeddings * FAISS vector search * Intent-aware reranking The goal is to retrieve relevant FAQ answers even when the user's wording differs significantly from the original question stored in the knowledge base. --- # 🏗️ Retrieval Pipeline ```text User Question │ ▼ Intent Classification │ ▼ Multilingual E5 Embedding │ ▼ FAISS Semantic Retrieval │ ▼ Top-K Candidates │ ▼ Intent-Aware Reranking │ ▼ Best FAQ Results ``` --- # 🔍 Embedding Model The retrieval system uses: ```text intfloat/multilingual-e5-base ``` The model converts Arabic questions into dense vector representations that can be compared using semantic similarity. The embedding dimension used by the retrieval index is: ```text 768 ``` --- # 📊 Knowledge Base The indexed knowledge base contains approximately: ```text 164,456 FAQ chunks ``` Each metadata record contains information such as: * FAQ ID * Company * Domain * Country * Chunk index * Question * Answer * Answerability * Question type / intent --- # 📦 Repository Contents ```text data/ ├── train_chunks.faiss └── train_chunks_metadata_v2.parquet models/ └── intent_classifier.joblib ``` ### `train_chunks.faiss` FAISS vector index containing the precomputed FAQ embeddings. ### `train_chunks_metadata_v2.parquet` Metadata associated with the indexed FAQ chunks. ### `intent_classifier.joblib` Serialized intent classification model used to predict the user's question type. --- # 🎯 Intent Classification The intent classifier provides an additional signal during retrieval. Examples include intents such as: ```text Account / Subscription Management Billing Dispute Troubleshooting Policy Product / Plan Details ``` The predicted intent is used by the reranking stage to improve candidate ordering. --- # 🧠 Intent-Aware Reranking After retrieving the initial candidates using semantic similarity, the system performs a reranking step. Conceptually: ```text Final Score = Semantic Similarity + Intent Compatibility ``` This allows the retrieval system to consider both: 1. How semantically similar the FAQ is to the user's question. 2. How well the FAQ matches the predicted intent. --- # 💻 Usage The artifacts can be used as part of the complete Arabic FAQ RAG application. The main application repository is available on GitHub: https://github.com/AbdelrhmanAkl/Arabic-FAQ-RAG The application automatically downloads the required artifacts from this Hugging Face repository when local copies are unavailable. --- # 🌐 Online Demo The complete system is deployed as a Streamlit application: **Arabic FAQ RAG — Live Demo** https://arabic-faq-rag.streamlit.app/ --- # 🔗 Related Resources ### 💻 Source Code https://github.com/AbdelrhmanAkl/Arabic-FAQ-RAG ### 🚀 Live Demo https://arabic-faq-rag.streamlit.app/ ### 🤗 Hugging Face Repository https://huggingface.co/AbdelrahmanAkl/Arabic-FAQ-RAG --- # ⚠️ Important Note This repository provides retrieval and classification artifacts for the Arabic FAQ system. The complete application logic, retrieval pipeline, reranking implementation, and Streamlit interface are available in the GitHub repository. The current system retrieves existing FAQ answers rather than generating new answers with a generative LLM. --- # 🔮 Future Work Future versions may include: * LLM-based answer generation * Full RAG generation pipeline * Hybrid retrieval * Cross-encoder reranking * Query rewriting * Conversation memory * Retrieval evaluation benchmarks * Arabic dialect optimization --- ## 👨‍💻 Author **Abdelrahman Ahmed Akl** AI / ML Engineer NLP • LLMs • AI Agents • RAG • Machine Learning