|
Download README.md from AbdelrahmanAkl/Arabic-FAQ-RAG: direct link, hf CLI and curl.
- Browser
- Download file 4.23 kB
-
https://huggingface.co/AbdelrahmanAkl/Arabic-FAQ-RAG/resolve/main/README.md
- Command line
-
hf download hf://AbdelrahmanAkl/Arabic-FAQ-RAG/README.md
-
curl -L -o README.md https://huggingface.co/AbdelrahmanAkl/Arabic-FAQ-RAG/resolve/main/README.md
4.23 kB
| # ๐ง 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 | |