How jayaprabhapalani/evals_handson works
This repository implements a conversational customer-support agent for investigating purchase histories and handling refund requests. A customer interacts through the conversation loop; the agent uses a language model, prompt, and tools to identify purchases, calculate refund eligibility and amounts, and issue a refund ticket. The tools read customer and purchase data through a SQLite query layer. Source excerpts show the main calls and data access; no README is present, and database setup details are not needed to describe the runtime workflow.
Main entry points: tools.py Refund tools · agent.py Conversation loop · database.py SQLite query helpers · data.py Data compatibility
Components 16
Conversation and reasoning
- Conversation loop
agent/agent.py - Agent runtime
agent/agent.py - Refund prompt
agent/prompts.py - Chat model
agent/models.py - Answer schema
agent/objects.py
Refund operations
- Refund tools
agent/tools.py - Purchase history
agent/tools.py - Refund calculation
agent/tools.py - Ticket issuance
agent/tools.py - Current date
agent/tools.py - Purchase item
agent/objects.py - Refund amount
agent/objects.py
Purchase data
- Data compatibility
agent/Data/data.py - SQLite query helpers
agent/Data/database.py - SQLite store
Other components
- Customer
Connections 17
- Customer → Conversation loop: sends request
agent/agent.py - Conversation loop → Agent runtime: invokes
agent/agent.py - Conversation loop → Answer schema: validates response
agent/agent.py - Conversation loop → Customer: prints reply
agent/agent.py - Agent runtime → Chat model: uses model
agent/agent.py - Agent runtime → Refund prompt: uses prompt
agent/agent.py - Agent runtime → Refund tools: registers tools
agent/agent.py - Refund tools → Purchase history: registers
agent/tools.py - Refund tools → Refund calculation: registers
agent/tools.py - Refund tools → Ticket issuance: registers
agent/tools.py - Refund tools → Current date: registers
agent/tools.py - Purchase history → SQLite query helpers: reads purchases
agent/tools.py - Refund calculation → SQLite query helpers: reads purchases
agent/tools.py - Refund calculation → Purchase item: matches items
agent/tools.py - Refund calculation → Refund amount: returns amount
agent/tools.py - SQLite query helpers → SQLite store: queries
agent/Data/database.py - Data compatibility → SQLite query helpers: delegates queries
agent/Data/data.py