One chat turn
The customer writes one message. Seven steps follow. The model decides one of them. The code decides the rest.
“Vi en mi estado de cuenta un cargo de 320 pesos mexicanos de Cafe Central del 12 de junio y no lo reconozco.”
“não reconheço uma cobrança de 320 no Cafe Central em 12 de junho”
Demo data: Cafe Central, 320 MXN. The values are team-generated.
1. Masking
Code decides
Code masks personal identifiers by pattern. It also refuses a request to reveal the prompt, before any model call.
- In
- The text of the customer.
- Out
- The same text, with personal identifiers masked. The model never sees the customer id.
What can stop the turn
- Refuse A request to reveal the prompt gets a refusal. The code records the attempt.
Evidence: sentinel-ai-core/app/privacy · docs/build/decisions/004-pii-lifecycle.md
2. Intent router
Model labels
A prompted LLM labels the intent. It decides nothing else. If the model fails, the keyword baseline answers the turn.
- In
- The masked text.
- Out
- One intent label: charge, missing, out of scope or person. For this sample: charge.
What can stop the turn
- Clarify Label missing: not enough information. The system asks.
- Refuse Label out of scope: the system does not act.
- Hand off Label person: the customer asks for an advisor.
Evidence: docs/build/decisions/016-router-models.md · evidence/evaluation-runs/2024Q4-eval-v8/summary.json
3. Charge lookup
Code decides
A session-bound tool reads the charges. The code narrows the list with the words of the customer.
- In
- The session account and the words of the customer: amount, merchant, date.
- Out
- The candidate charges of this account. For this sample: one match, Cafe Central, 320 MXN (demo data).
What can stop the turn
- Clarify Several candidates, or none for the date: the system shows the charges and asks which one.
- Hand off Three failed lookups hand off without an action.
Evidence: sentinel-ai-core/app/tools · docs/build/conversation.md
4. Policy engine
Code decides
Code checks the window, the status, the amount and the fraud rule. A later question of why gets this stored decision.
- In
- The facts of the charge and the policy of the country.
- Out
- A decision with a rule id: allow, refuse or hand off. For this sample: allow.
What can stop the turn
- Refuse Outside the window, or a status that cannot be disputed.
- Hand off A high amount, or a fraud signal. A person decides.
Evidence: docs/build/decisions/021-dispute-policy-sources.md · docs/rationale/policy-sources.md
5. Confirmation
Code decides
The system opens nothing before the customer confirms. A confirm opens only the charge of the box that the customer saw.
- In
- The allowed charge.
- Out
- A confirm box with the verified facts. The customer confirms or not.
What can stop the turn
- Clarify The customer does not confirm, or names another charge. The box closes and nothing opens.
Evidence: docs/build/conversation.md
6. Case opening
Code decides
A tool writes the case. The system counts only an action that the tool confirms. A timeout is not a success.
- In
- The confirmed charge.
- Out
- A case record in the case store.
What can stop the turn
- Hand off A step that fails is not reported as done. The package for the advisor lists it.
Evidence: sentinel-ai-core/app/models/dispute_case.py · docs/architecture/mocks.md
7. Read-back
Code decides
The code reads the case back from the store. The system says that the case exists only after this read.
- In
- The case reference.
- Out
- The case number, shown to the customer.
What can stop the turn
- Nothing stops this step. It is the end of the turn.
Evidence: docs/architecture/specification.md
Each stop is a kind of reply: Clarify asks the customer, Refuse declines, Hand off files a ticket for an advisor. See the conversation page.