How kasturimaheshbabu2316-mc/capstone---e-commerce-retail works
Nykaa’s support agent handles policy questions and order-status inquiries through a customer-facing API. The main documented flow applies runtime budget and input safeguards, checks a normalized response cache, executes specialized retrieval and lookup work, reviews the draft, then returns a structured answer and records telemetry. Separate capabilities include policy ingestion and indexing, session memory, escalation scoring, and evaluation. The README documents the broad architecture; some subsystem links below rely on that documentation because their implementation was not sampled.
Main entry points: pipeline.py Support pipeline · main.py HTTP and WebSocket API · crew.py Crew orchestration · review_team.py Draft review
Components 19
Serving
- HTTP and WebSocket API
app/main.py - Support pipeline
app/pipeline.py - Response contracts
api/schemas.py
Governance
- Token budget
governance/risk_budget.py - Input and output safeguards
agents/guardrails.py - Response cache
governance/cache.py
Agent workflow
- Crew orchestration
agents/crew.py - Offline model
agents/mock_llm.py - Session memory
agents/memory.py - Draft review
autogen_review/review_team.py
Knowledge and orders
- Policy and order tools
agents/tools.py - Order records and scoring
dataset.py - Policy documents
knowledge_base - Document chunking
rag/chunking.py - Vector indexing and search
rag/indexer.py - Retrieval calibration
rag/evaluation.py
Telemetry and evaluation
- Redacted telemetry
api/logger.py - LLM-as-judge evaluation
evaluation/run_judge.py
Other components
- Customer
Connections 22
- Customer → HTTP and WebSocket API: submits query
README.md - HTTP and WebSocket API → Support pipeline: routes requests
app/main.py - HTTP and WebSocket API → Token budget: checks budget
README.md - HTTP and WebSocket API → Redacted telemetry: logs requests
app/main.py - Support pipeline → Input and output safeguards: sanitizes input
app/pipeline.py - Support pipeline → Response cache: checks cache
app/pipeline.py - Support pipeline → Crew orchestration: runs query
app/pipeline.py - Support pipeline → Draft review: reviews draft
app/pipeline.py - Support pipeline → Response contracts: returns response
app/pipeline.py - Crew orchestration → Policy and order tools: invokes tools
agents/crew.py - Crew orchestration → Session memory: records turns
agents/crew.py - Crew orchestration → Offline model: generates draft
agents/crew.py - Policy and order tools → Order records and scoring: looks up orders
README.md - Policy and order tools → Vector indexing and search: searches policies
README.md - Policy documents → Document chunking: provides text
README.md - Document chunking → Vector indexing and search: produces chunks
rag/indexer.py - HTTP and WebSocket API → Vector indexing and search: ingests documents
README.md - Retrieval calibration → Vector indexing and search: benchmarks retrieval
rag/evaluation.py - Draft review → Response contracts: emits verdict
autogen_review/review_team.py - Draft review → Input and output safeguards: redacts PII
autogen_review/review_team.py - LLM-as-judge evaluation → Crew orchestration: scores answers
README.md - LLM-as-judge evaluation → Draft review: evaluates review
README.md