How jeeva-004/customer-support-ai-agent works
AmazonHelp is a retrieval-grounded customer-support agent. Offline, it extracts and pairs brand replies, filters the corpus, and builds an embedding index. Online, an inbound message passes through intent classification and semantic retrieval; escalation rules route unsupported or weak matches to a human, while eligible messages receive a grounded generated reply. The README documents corpus preparation, dense retrieval, a TF-IDF baseline, and evaluation capabilities; the graph focuses on the product runtime and preparation flow. Some preparation links are documented rather than verified in sampled source.
Main entry points: pipeline.py Message Pipeline · filter_english.py English Filtering · generate_reply.py Reply Generation · retrieve_embeddings.py Semantic Retrieval
Components 16
Support Corpus
- TWCS Dataset
- Brand Extraction
src/production/filter_brand.py - Tweet Pairing
src/production/build_threads.py - English Filtering
src/production/filter_english.py - Text Preprocessing
src/production/preprocess.py - Embedding Index Build
src/production/build_retrieval_index.py - Dense Embeddings
Agent Runtime
- Message Pipeline
src/production/pipeline.py - Intent Classification
src/production/classify_intent.py - Escalation Rules
src/production/escalate.py - Reply Generation
src/production/generate_reply.py
Retrieval Methods
- Semantic Retrieval
src/production/retrieve_embeddings.py - TF-IDF Baseline
src/evaluation/classify_tfidf.py
Other components
- Customer
- Local Ollama LLM
- Human Agent
Connections 17
- TWCS Dataset → Brand Extraction: extracts brand replies
README.md - Brand Extraction → Tweet Pairing: pairs tweets
README.md - Tweet Pairing → English Filtering: filters pairs
README.md - English Filtering → Embedding Index Build: encodes corpus
README.md - Embedding Index Build → Dense Embeddings: writes vectors
README.md - English Filtering → Text Preprocessing: prepares text
- Customer → Message Pipeline: submits message
README.md - Message Pipeline → Intent Classification: classifies
src/production/pipeline.py - Intent Classification → Local Ollama LLM: fallback inference
README.md - Message Pipeline → Semantic Retrieval: retrieves cases
src/production/pipeline.py - Semantic Retrieval → Dense Embeddings: searches vectors
src/production/retrieve_embeddings.py - Message Pipeline → Escalation Rules: checks decision
src/production/pipeline.py - Escalation Rules → Human Agent: routes escalation
README.md - Message Pipeline → Reply Generation: generates when eligible
src/production/pipeline.py - Reply Generation → Semantic Retrieval: retrieves grounding
src/production/generate_reply.py - Reply Generation → Local Ollama LLM: requests generation
README.md - TF-IDF Baseline → TWCS Dataset: uses reference cases
README.md