Skip to content

A production-grade, voice-enabled AI system for answering airline policy questions using metadata-aware routing and multi-domain RAG, designed with observability, caching, and real-world deployment trade-offs in mind.

Notifications You must be signed in to change notification settings

KadirGokdeniz/global_gate

Repository files navigation

AI-Powered Multi-Airline Policy Assistant

Python FastAPI PostgreSQL React Docker Coverage

Problem

Airline policy information is scattered, inconsistent, and hard to access when you actually need it. Phone support averages 2-12 hours. 80% of travelers say standard chatbots can't answer simple policy questions. And when you're rushing between gates or driving to the airport, typing through FAQ pages isn't practical.

Solution

A voice-enabled assistant that understands natural language and compares policies across multiple airlines. Semantic search interprets intent—not just keywords. Response time under 3 seconds. Voice support in Turkish and English for hands-free use.

Demo

demo.mp4

System Architecture

Speech services run as separate streams—TTS failure doesn't block query processing. Dual-LLM setup enables quality comparison and prevents vendor lock-in.

graph TD
    A[User] <--> B[Frontend React]
    B --> C[FastAPI Backend]
    
    B --> I[Audio Input]
    I --> J[AssemblyAI STT]
    J --> C
    
    C <--> D[PostgreSQL + pgvector]
    E[Web Scraper] --> D
    C <--> F[OpenAI/Claude APIs]
    
    C --> K[AWS Polly TTS]
    K --> L[Audio Output]
    L --> B
    
    G[Prometheus] --> H[Grafana]
    C --> G
    
    classDef userPath fill:#e1f5fe
    classDef audioPath fill:#f3e5f5
    classDef backend fill:#e8f5e8
    classDef monitoring fill:#fff3e0
    
    class A,B userPath
    class I,J,K,L audioPath
    class C,D,E,F backend
    class G,H monitoring
Loading

Technology Decisions

Technology Purpose Trade-off Reasoning
pgvector Vector Search Reduced overhead vs Pinecone/Weaviate. Sufficient for policy-scale datasets.
gte-multilingual-base Embeddings Open-source, no per-query cost. Native Turkish/English support.
FastAPI Backend Async handles concurrent LLM + STT + TTS calls.
BeautifulSoup Scraping Sufficient for general-purpose scraping needs.
OpenAI + Claude LLM Dual-provider prevents lock-in. Enables quality comparison.
AssemblyAI STT Strong Turkish accuracy. Handles background noise well.

Core Capabilities

RAG Pipeline: Semantic search with source attribution. Reduces hallucination risk.

Voice Interface: Real-time STT/TTS in Turkish and English.

Production Monitoring: Prometheus + Grafana for latency, errors, and API costs.

Multi-LLM Support: Switch providers without code changes.

Intelligent Caching: Multi-layer LRU cache for repeated queries.

Metadata-Aware Routing: Airline-level metadata prefiltering combined with query routing to the correct policy domain.

Quick Start

1. Clone and Setup

git clone <repository-url>
cd multi-airline-rag-system

2. Configure Environment Variables

cp .env.example .env

Edit the .env file and add your API keys:

OPENAI_API_KEY=your_openai_api_key_here
AWS_ACCESS_KEY_ID=your_aws_access_key_here
AWS_SECRET_ACCESS_KEY=your_aws_secret_key_here
# ... other required keys

3. Start the Application

docker-compose up -d

Note: Initial startup may take 3-5 minutes as Docker builds the images and downloads ML models.

4. Run the Scraper

docker-compose run scraper python scraper_only.py

5. Verify Installation

curl http://localhost:8000/health
Service URL
Frontend http://localhost:8501
API http://localhost:8000
Grafana http://localhost:3000

About

A production-grade, voice-enabled AI system for answering airline policy questions using metadata-aware routing and multi-domain RAG, designed with observability, caching, and real-world deployment trade-offs in mind.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published