US Delivery Internship β Technical Task Round
Production-grade AI for Technical Support & TAM Teams
The TAM AI Platform is an enterprise-grade intelligent support system that combines AI-powered ticket triage with account health analysis. Built with LangGraph orchestration, FAISS vector retrieval, and local Ollama models, it delivers production-ready workflows for Technical Support and TAM teams.
β
Task 1: Intelligent Ticket Triage β LangGraph-based triage with RAG, routing, confidence scoring, and retry/fallback handling
β
Task 2: Account Health Briefs β Multi-document account summarization with churn-risk detection and TAM recommendations
β
Task 3: Evaluation Harness β Automated evaluation suite with success rate, quality score, latency, confidence, and report generation
β
Bonus Task: System Dashboard β Live monitoring dashboard for system resources, Ollama model status, FAISS health, and runtime metrics
β
Intelligent Ticket Triage β Automatic ticket classification with P1-P4 urgency routing
β
Account Health Briefs β Multi-document summarization for customer insights
β
Evaluation Harness β Automated quality checks for triage and account brief outputs
β
Local Execution β 100% local inference via Ollama (no external APIs)
β
Production Reliability β Retry loops, fallback handlers, and schema validation
β
Bonus System Dashboard β Live monitoring dashboard with metrics and model status
β
Knowledge Base RAG β FAISS-powered semantic search over product documentation
Main triage interface showing ticket intake, P1 urgency routing, and real-time analysis with confidence scores
Triage output displaying detected product, issue category, routing team, and knowledge base matches with RAG confidence scoring
Account health summarization interface using multi-document analysis to detect churn signals and escalation points
Generated brief showing executive summary, open risks, flagged issues, and recommended talking points for TAM engagement
Completed Task 3 evaluation harness showing automated test success rates, quality scores, latency metrics, confidence scoring, and detailed test case results with failure analysis
Bonus system dashboard displaying CPU/RAM/storage utilization, Ollama model status, FAISS index health, live service checks, and resource allocation
The platform consists of a React/Vite SPA frontend, a FastAPI backend server serving REST and SSE endpoints, a FAISS vector database for product knowledge retrieval, and local Ollama model engines orchestrated via LangGraph.
graph TD
subgraph Client ["Client Layer"]
FE[React + Vite Frontend]
end
subgraph API ["API & Application Layer"]
BE[FastAPI Web Server]
USE[Application Use Cases]
PM[Prompt Manager]
DL[Data Loader]
end
subgraph Orchestration ["Orchestration Layer"]
LG[LangGraph State Machines]
T1[Triage Graph]
T2[Account Brief Graph]
end
subgraph Infrastructure ["Infrastructure Layer"]
OL[Ollama Local LLM Client]
FS[FAISS Vector Store]
EM[Embedding Service]
end
FE <-->|REST API / SSE| BE
BE <--> USE
USE <--> LG
LG --> T1
LG --> T2
T1 --> OL
T1 --> FS
T2 --> OL
FS --> EM
graph LR
Pres[Presentation Layer<br/>FastAPI Routers & Pydantic Schemas] --> App[Application Layer<br/>Triage & Brief Use Cases]
App --> Dom[Domain Layer<br/>Entities & Interfaces]
Inf[Infrastructure Layer<br/>Ollama Client / FAISS Store / Data Loader] --> Dom
This section covers only the AI workflows implemented as LangGraph state machines. The evaluation harness and bonus system dashboard are documented separately because they validate and monitor the platform rather than define LangGraph pipeline logic.
The triage workflow automates ticket classification through a multi-step LangGraph state machine. Raw tickets undergo validation, context retrieval, and LLM-powered generation with built-in failure recovery.
Pipeline Steps:
- Input Validation β Enforce schema compliance on incoming ticket data
- Knowledge Base Retrieval β FAISS similarity search to find relevant KB articles
- Context Compression β Summarize top-K chunks to fit within LLM context window
- Prompt Construction β Template-based prompt with few-shot examples and KB context
- LLM Generation β Stream responses from Ollama with structured output
- Output Validation β JSON schema validation and enum constraint checking
- Confidence Calculation β Heuristic scoring based on validation success and model certainty
- Retry Loop β On validation failure, re-prompt with error feedback (max 3 retries)
graph TD
Start([Input Ticket]) --> Val[Input Validation]
Val --> Ret[FAISS Retrieval]
Ret --> Comp[Context Compression]
Comp --> Prom[Prompt Construction]
Prom --> LLM[LLM Generation]
LLM --> OutVal[Output Validation]
OutVal -- Malformed JSON / Invalid Enum --> Retry{Retry Count < 3?}
Retry -- Yes --> RegNode[Retry Node & Feedback]
RegNode --> Prom
Retry -- No --> Fallback[Fallback Default Output]
Fallback --> Conf[Confidence Calculation]
OutVal -- Valid JSON --> Conf
Conf --> Log[Observability Logging]
Log --> End([Structured Triage Result])
Output Schema:
{
"ticket_id": "TKT-12345",
"detected_product": "DataBridge Pro",
"category": "Bug",
"urgency": "P1",
"confidence": 0.92,
"reasoning": "Connection timeout error pattern matches known DataBridge Pro issue",
"kb_matches": ["databridge-pro.md#connection-errors"],
"routing_team": "Engineering Support"
}The account brief pipeline performs multi-document analysis to synthesize customer health signals, churn indicators, and strategic recommendations.
Pipeline Features:
- Extracts recent tickets, escalation notes, and health metrics for a specific account
- Detects churn signals (cancellation keywords, frustration indicators)
- Generates 3-section briefs: Executive Summary β Open Risks β Recommended Actions
- Includes determinism guard (temp=0) to ensure consistent outputs across runs
graph TD
Start([Account ID]) --> Val[Input Validation]
Val --> Fetch[Account Data Fetch]
Fetch --> Churn[Churn Signal Detection]
Churn --> Compress[Multi-Doc Summarization]
Compress --> Prom[Prompt Construction]
Prom --> LLM[LLM Generation]
LLM --> Section[Section Assembly]
Section --> OutVal[Output Validation]
OutVal --> Log[Logging & Trace]
Log --> End([Account Brief])
- Ollama: Download and install Ollama.
- Pull Models: Run the following commands to download the classification and embedding models:
ollama pull qwen2.5 ollama pull nomic-embed-text
- Start Ollama: Make sure Ollama is running (
ollama serveor run the Ollama desktop app). - System Requirements:
- Minimum 8GB RAM (16GB+ recommended)
- 30GB free disk space for models
- Python 3.10+
- Node.js 16+ (for frontend)
From the project root directory:
# 1. Install Python dependencies
pip install -r requirements.txt
# 2. Configure environment variables
cp .env.example .env
# Edit .env with your settings (LLM model names, API ports, etc.)
# 3. Build FAISS vector index from knowledge base
python scripts/build_index.py
# This ingests all markdown files from knowledge-base/ directory
# 4. Install frontend dependencies (optional, only if running dev mode)
cd frontend
npm install
cd ..# Set Python path
$env:PYTHONPATH = "C:\Users\hp\OneDrive\Desktop\TAM"
# Start uvicorn server on port 8050
python -m uvicorn src.presentation.main:app --host 0.0.0.0 --port 8050 --reload- Swagger UI: http://localhost:8050/docs
- API Base: http://localhost:8050/api/v1
cd frontend
npm run dev- Local Access: http://localhost:5173
- Proxy to Backend:
/apiroutes forward to http://localhost:8050/api
# Build optimized frontend bundle
cd frontend
npm run build
# FastAPI automatically serves from frontend/dist
# Access at http://localhost:8050 (no need for separate frontend server)| Field | Type | Description / Key Values |
|---|---|---|
ticket_id |
string | Unique ticket identifier |
product |
string | DataBridge Pro, CloudSync, AnalyticsHub, SecureVault, WorkflowEngine |
category |
enum | Bug, Feature Request, How-To, Performance, Billing, Integration, Onboarding, Data Loss |
urgency |
enum | P1 (critical ~5%), P2 (major ~20%), P3 (moderate ~45%), P4 (low ~30%) |
status |
enum | Open, In Progress, Pending Customer, Resolved, Closed |
| Field | Type | Description / Key Values |
|---|---|---|
account_id |
string | Unique account identifier |
health_status |
enum | Healthy, At Risk, Churning, New |
usage_trend |
enum | Increasing, Stable, Declining, Inactive |
escalation_notes |
array | Churn signals containing competitor keywords, cancels, or frustrations |
TAM/
βββ src/ # Python backend source code
β βββ presentation/ # FastAPI routers & request handlers
β β βββ main.py # Application entrypoint
β βββ application/ # Business logic layer
β β βββ triage_usecase.py # Triage orchestration
β β βββ account_brief_usecase.py # Brief generation
β βββ ai/ # LangGraph pipelines & nodes
β β βββ graphs/ # State machine definitions
β β βββ nodes/ # Individual pipeline steps
β β βββ rules.py # Business rules & validation
β βββ infrastructure/ # External integrations
β β βββ llm_client.py # Ollama connection
β β βββ vector_store.py # FAISS wrapper
β β βββ embedding_service.py # Sentence embeddings
β βββ observability/ # Logging & tracing
β
βββ frontend/ # React + Vite UI
β βββ src/components/ # React components (Tabs, Forms)
β βββ src/App.jsx # Main app shell
β
βββ knowledge-base/ # Product documentation
β βββ products/ # Product guides
β βββ troubleshooting/ # Error solutions
β βββ onboarding/ # Setup guides
β
βββ evaluation/ # Automated test suite
β βββ run_eval.py # Evaluation orchestrator
β βββ framework/ # Test metric classes
β βββ test_cases/ # Scenario files
β
βββ data/ # Sample datasets
β βββ tickets.json # Test ticket corpus
β βββ accounts.json # Test account profiles
β
βββ vector_store/ # FAISS index artifacts
β βββ faiss_index/
β βββ index.faiss # Serialized vector database
β
βββ scripts/ # Utility scripts
βββ build_index.py # Index builder
{
"ticket_id": "TKT-3847",
"account_id": "ACC-3847",
"subject": "DataBridge pipeline stopped - ERR_CONNECTION_TIMEOUT",
"body": "Our DataBridge Pro Connectors pipeline has been failing since this morning. Error: ERR_CONNECTION_TIMEOUT after 30s. This is impacting 47 users in Engineering. We have tried restarting but the issue persists.",
"product": "DataBridge Pro",
"category": "Bug",
"urgency": "P1",
"status": "Open",
"plan_tier": "Enterprise (2h SLA)"
}{
"account_id": "ACC-3336",
"account_name": "TechCorp Inc",
"health_status": "At Risk",
"usage_trend": "Declining",
"arr_usd": 250000,
"p1_tickets_last_30d": 3,
"escalation_notes": ["Churn signals", "Performance complaints", "Critical incident history"],
"renewal_date": "2026-12-15"
}{
"account_id": "ACC-3336",
"generated_at": "2026-08-08T10:30:00Z",
"brief": {
"executive_summary": "The account's usage trend is currently inactive with a high number of open tickets (7), indicating potential issues that have not been resolved in recent weeks.",
"open_risks": [
"Health Status is At Risk",
"Usage Trend is Inactive",
"3 consecutive P1 incidents in the last 30 days"
],
"recommended_actions": "The TAM should prioritize addressing the performance degradation and billing concerns. Given the recent escalation note about P1 tickets, it is crucial to ensure that all team members are informed about potential maintenance windows."
}
}The platform includes an automated evaluation framework to validate triage and brief generation quality:
python evaluation/run_eval.pyMetrics:
- Success Rate: % of tests with correct output schema
- Quality Score: Heuristic scoring for reasoning relevance (0.0β1.0)
- Latency: End-to-end pipeline execution time
- Confidence: Average model confidence score across test set
Test Cases:
- Task 1 (Triage): 5 test scenarios covering P1βP4 urgencies, product variety, and edge cases
- Task 2 (Brief): 5 test scenarios for healthy, at-risk, and churning accounts
Output Reports:
eval_report.jsonβ Structured test resultseval_report.mdβ Human-readable summary with pass/fail details
β
Local Inference Only β All LLM calls run on-device via Ollama (no API calls)
β
Secret Management β Environment variables for sensitive config (never hardcoded)
β
Input Sanitization β Validation at presentation layer prevents injection attacks
β
PII Masking β Email, phone, and name fields masked in logs
β
Retry Loops β Max 3 retries with exponential backoff on LLM generation failure
β
Fallback Handlers β Graceful degradation when models unavailable
β
Schema Validation β JSON schema + enum enforcement before returning results
β
Observability β Structured logging with request tracing and performance metrics
β
Docker-Ready β Containerizable backend and frontend
β
Horizontal Scaling β Stateless FastAPI allows multi-instance deployment
β
Health Checks β /health endpoint monitors Ollama, FAISS, and system resources
curl -X POST http://localhost:8050/api/v1/triage \
-H "Content-Type: application/json" \
-d '{
"ticket_id": "TKT-001",
"account_id": "ACC-3847",
"subject": "DataBridge pipeline stopped",
"body": "Pipeline failing with connection timeout error",
"plan_tier": "Enterprise (2h SLA)"
}'Response:
{
"ticket_id": "TKT-001",
"detected_product": "DataBridge Pro",
"category": "Bug",
"urgency": "P1",
"confidence": 0.95,
"routing_team": "Senior Engineering Support",
"reasoning": "Connection timeout + production impact = P1 bug",
"kb_matches": [
{
"title": "DataBridge Pro β Product Reference",
"error_codes": ["ERR_CONNECTION_TIMEOUT"],
"relevance": 0.89
}
]
}curl -X GET http://localhost:8050/api/v1/account/ACC-3336/briefResponse:
{
"account_id": "ACC-3336",
"account_name": "TechCorp Inc",
"brief": {
"executive_summary": "Account at risk with recent escalation...",
"open_risks": ["Performance issues", "High P1 ticket count"],
"recommended_actions": "Prioritize customer outreach and issue resolution"
},
"generated_at": "2026-08-08T10:45:00Z"
}- DESIGN_NOTE.md β Architectural decisions, failure modes, and 10x scale roadmap
- PROJECT_BLUEPRINT.md β Detailed technical blueprint and system components
- DATA_SCHEMA.md β Complete data model reference
- eval_report.md β Evaluation results and quality metrics
To extend the platform:
- Add New Nodes β Create new node functions in
src/ai/nodes/following the existing pattern - Extend Graphs β Modify state machines in
src/ai/graphs/to add new workflow steps - Update KB β Add markdown files to
knowledge-base/and rebuild index:python scripts/build_index.py - Add Tests β Extend
evaluation/test_cases/with new test scenarios
Built for the US Delivery Internship β Technical Task Round