Use case / Chatbots

See where the conversation lost the thread.

A chatbot answers one message at a time, but the problem is often ten messages back. Trace every turn with the history it was given, and a drifting reply is a step you can open.

Turns
Traced
History
Visible
Fallbacks
Counted

Conversation record

The turn where it lost the thread.

  1. Each conversation is one trace, with every turn inside it.

  2. See exactly which messages were loaded for this reply.

  3. Trimmed history is visible, so a forgotten detail has a cause.

  4. The reply sits next to the context that produced it.

  5. Compare closed conversations to find where people give up.

Chatbots1 / 5 steps
  1. 01

    Message received

    “Can I change the address on my order?”

    ok
  2. 02

    History loaded

    Eleven earlier messages, 3,100 tokens.

    ok
  3. 03

    Context trimmed

    The order number fell out of the window.

    drift
  4. 04

    Reply drifts off topic

    The bot asks for an order number again.

    drift
  5. 05

    Conversation closed

    The customer left after four turns.

    ok
Cost of the conversation$0.00

What Tracify watches.

01

Turn by turn context

Recorded on every run, so it can be searched, compared and alerted on.

02

Answer latency

Recorded on every run, so it can be searched, compared and alerted on.

03

Fallback replies

Recorded on every run, so it can be searched, compared and alerted on.

04

Cost per conversation

Recorded on every run, so it can be searched, compared and alerted on.

The failure to catch

A friendly reply that forgot what the customer said three messages ago.

Trace every turn of a customer-facing chatbot, with the context it was given, the answer it wrote and the moment it drifted.

Instrument it

Trace every turn, not just the chat.

Open one trace per conversation and one span per turn, and the history each reply used is stored next to it.

$ npm install tracify-sdk

import { span, traceAgent } from "tracify-sdk";

export const reply = traceAgent(async (history: string[], message: string) => {
  const context = await span("load-history", () => trimHistory(history), { type: "tool", input: message });
  return span("reply", () => callModel(context, message), { type: "llm" });
}, { environment: "production" });