Telecom / README.md
oluinioluwa814's picture
Update README.md
6626024 verified
|
Raw
History Blame Contribute Delete
2.82 kB

A newer version of the Gradio SDK is available: 6.20.0

Upgrade
metadata
title: Telecom
emoji: πŸƒ
colorFrom: pink
colorTo: red
sdk: gradio
sdk_version: 6.10.0
app_file: app.py
pinned: false
license: mit

Autonomous Telecom Support Agent (Self-Improving RAG)

A production-grade Tier-1 Telecommunications Support Engineer powered by Gemini 1.5 Flash-Lite and FAISS. This agent features a "closed-loop" learning system that automatically expands its knowledge base by capturing and validating high-confidence resolutions.

πŸš€ Key Features

  • Self-Improving Knowledge Base: Automatically collects and deduplicates high-scoring answers (Score β‰₯ 9) to improve future retrieval.
  • Hierarchical Retrieval (RAG): Combines vector search (FAISS) with session-based memory for context-aware troubleshooting.
  • Autonomous Evaluation: Includes an "AI Judge" that scores responses based on groundedness, hallucination risk, and evidence usage.
  • HNSW Vector Indexing: Uses Hierarchical Navigable Small Worlds for efficient, incremental updates to the knowledge base without full re-indexing.
  • Memory Summarization: Intelligently summarizes long conversations to stay within LLM context windows while preserving key facts.

πŸ—οΈ Architecture

attachment_0

  1. Retrieval: Pulls data from the Nigerian Telecom Customer Support dataset and short-term session memory.
  2. Generation: Gemini generates a structured JSON response grounded strictly in retrieved evidence.
  3. Validation: A secondary "Judge" prompt evaluates the output for logical consistency.
  4. Learning: If the answer is exceptional, it is embedded and injected into the permanent FAISS index for future use.

πŸ› οΈ Tech Stack

  • LLM: Google Gemini (via google-genai)
  • Vector Database: FAISS (Facebook AI Similarity Search)
  • Embeddings: all-MiniLM-L6-v2 (Sentence-Transformers)
  • Data Source: HuggingFace Datasets (Nigerian Telecom Support Records)
  • Language: Python

πŸ“‹ Prerequisites

pip install google-genai sentence-transformers faiss-cpu datasets scikit-learn

βš™οΈ Configuration Set your environment variables: GEMINI_API_KEY: Your Google AI Studio key. HF_TOKEN: HuggingFace token for dataset access.

πŸ“– Usage

from your_script import telecom_agent

Initialize and query the agent

answer, evaluation, stats = telecom_agent("My MTN sim is not showing 4G signal in Lagos.")

print(f"Diagnosis: {answer['diagnosis']}") print(f"Confidence: {answer['confidence_score']}")

πŸ“Š Self-Learning Logic The system uses Semantic Deduplication. New samples are only added to the training set if their cosine similarity to existing data is < 0.9, ensuring the knowledge base grows in quality, not just volume. Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference