A support bot that remembers: cross-channel history and escalation with Hindsight
Picture a customer with a billing problem. They start in chat and get a suggestion. A few days later they email, because the suggestion didn't work. Then they phone, and the agent asks them to explain the whole thing from the beginning. Four contacts in, nobody has fixed anything, and nobody has noticed the pattern. That is the situation I built this bot for. It has two jobs: make sure a customer…
A support bot has been developed to remember customer interactions across multiple channels and to escalate the issue when necessary. This bot helps prevent customers from having to repeat themselves when switching between chat, email, and phone support. The bot uses Hindsight, FastAPI's API, and Groq's language model to function.
The bot connects different customers' interactions by using their email addresses as the primary identifier. There are four main files in the bot's architecture: hindsight_client.py, llm_client.py, memory_schema.py, and app.py.
The bot stores each interaction against the customer's email address and recalls the history when an agent needs context. When an agent picks up a call, they can see what was tried in chat and email before the conversation begins. The bot recalls interactions and asks the model for a brief summary.
The escalation policy is based on three or more unresolved issues from the same customer. The bot checks this through a Python function and then uses the language model to write a handoff note for a human agent. The bot's decision to escalate is returned along with a summary of the history. The bot has been tested with various customer scenarios, such as a billing case, a resolved bug, a smooth journey, and an API integration case. The bot escalates only when necessary and provides an explanation for its decision.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.