← Kalyan Venkatesh View repository ↗

Flagship project · Work in progress

ChargeBack

An AI agent for card-fraud disputes built around evaluation, observability and guardrails. It connects a streamed customer conversation to transaction lookup, fraud scoring and a controlled dispute decision.

555K+transactions loaded
9PostgreSQL tables
3agent tools
7golden conversations
0.74test AUPRC

Interactive policy explorer

See how the guardrails change a dispute decision

Move the internal fraud score or choose a sample. The explorer mirrors ChargeBack's policy gates but uses synthetic data and does not call the live model.

Human review Score 0.51

File and escalate the dispute

The score is uncertain. The system records the dispute with an escalation reason so a human can review it.

  1. 1
    look_up_transactionsMatched the cardholder's transaction
    done
  2. 2
    score_fraudReturned 0.51 to the policy layer
    done
  3. 3
    file_disputeOwnership checked and escalation reason stored
    review

Workflow

One conversation with controlled actions behind it

  1. 01

    Find the charge

    The agent searches only the signed-in cardholder's transactions and asks for clarification when several records match.

  2. 02

    Score the transaction

    A PyTorch fraud model exported to ONNX evaluates amount, hour and merchant category signals.

  3. 03

    Apply server-side policy

    The 0.33 and 0.67 gates decide whether to refuse, escalate or file. Ownership checks and a unique constraint prevent unsafe filings.

  4. 04

    Leave an audit trail

    Every tool call records its inputs, result, start time and latency beside the conversation that caused it.

Evaluation

The workflow is tested as a conversation

Seven golden conversations replay the full dispute path and check database records plus tool traces. The cases cover refusal, human escalation, duplicate prevention, unsupported action claims, score secrecy and wrong-owner access.