Spaces:
Sleeping
title: NileTel Arabic AI Assistant
emoji: π€
colorFrom: blue
colorTo: indigo
sdk: docker
sdk_version: latest
python_version: '3.14'
app_file: main.py
pinned: false
NileTel Arabic AI Assistant
π Live Demo
Experience the NileTel Arabic AI Assistant in action!
π Launch the Live Demo Here
RAG-based telecom support assistant for Arabic and English with hybrid retrieval, query rewriting, and ticket automation. The UI is built with Streamlit and the FastAPI backend is deployed on Hugging Face. Ticket creation is triggered automatically via n8n when the answer implies an action, and the UI asks for the user name only in those cases.
Features
- Hybrid retrieval: semantic search + BM25 with RRF fusion
- Query rewriting to improve recall
- Paragraph chunking with overlap
- Action detection to trigger ticket automation
- Streamlit UI with RTL-friendly answer rendering
- Caching of embeddings and FAISS index for fast startup
Architecture
- Streamlit UI sends queries to FastAPI
- FastAPI calls TelecomRAG for retrieval and answer generation
- If action is required, FastAPI posts to the n8n webhook (Google Sheets)
- UI requests the user name only when a ticket must be created
Setup
1) Create environment file
Copy the example and set your Groq API key:
cp .env.example .env
Then edit .env:
GROQ_API_KEY=your_key_here
Installation & Running Options
Choose one of the following methods to run the project. We recommend using Option A for significantly faster dependency installation and execution.
Option A: Fast Setup with uv (Recommended)
1) Install dependencies:
uv pip install -r requirements.txt
2) Run the API:
uv run uvicorn main:app --reload --port 8000
3) Run the UI:
uv run streamlit run streamlit_app.py
Option B: Standard Setup with pip
1) Install dependencies:
pip install -r requirements.txt
2) Run the API:
uvicorn main:app --reload --port 8000
3) Run the UI:
streamlit run streamlit_app.py
Configuration
N8N_WEBHOOK_URLinmain.pyto point to your n8n workflowAPI_URLinstreamlit_app.pyto point to your FastAPI endpointSHEET_URLinstreamlit_app.pyto your Google Sheet CSV export
Data Ingestion
Place Markdown files inside the data/ directory. The index is cached in cache/ (ignored by git). If the data changes, the cache is automatically rebuilt.
Notes
- Ticket creation is triggered only when the assistant response implies an action.
- The UI collects the user name only in those cases, then submits the ticket.