YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

๐Ÿง  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

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:

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:

768

๐Ÿ“Š Knowledge Base

The indexed knowledge base contains approximately:

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

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:

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:

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

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support