Skip to content

AI & automation · Guide

How does an AI agent work in customer service?

AI customer service is the use of an agent built on a language model to answer customers from company data. On every message, the agent works out the request, finds the answer in the knowledge base (RAG), queries systems such as the ERP and CRM when needed and passes what it cannot solve to a person, with the context.

Master TimmUpdated on 6 min read

Rule-based chatbot, AI chatbot and support agent: what changes

All three can share the same channel. What changes is what each one solves without a person and what has to be ready before it goes live.

Rule-based chatbot, AI chatbot and support agent: how each one answers
TypeHow it answersWhere it stops
Rule-based chatbotMenus and keywords, with answers written in advanceFollows the option tree designed by the teamAt any question outside the script
AI chatbotA language model with a knowledge base (RAG)Writes the answer from approved documentsWhen the answer depends on the customer's data or on an action
Support agentA model with tools connected to your systemsLooks up and, with permission, changes orders, accounts and ticketsAt the edge of its permissions and on topics that need a person

How the agent answers from company data (RAG)

RAG (retrieval-augmented generation) is the technique that makes the model answer from company documents rather than from what it learned in training. It cuts down made-up answers, as long as the knowledge base is correct and current.

  1. Knowledge base: Policies, catalog, FAQs and ticket history, split into passages and indexed for search.
  2. Retrieval: For every question, the system pulls the most relevant passages, often combining search by meaning (embeddings) and by keyword.
  3. Answer: The model writes from those passages, cites the source and says it does not know when the base does not cover the subject.
  4. Updates: When a policy changes, the passage changes in the base, and the next answer already follows the new rule.

In Contas Casal, an own product of Master Timm, the assistant answers from the user's account data on structured RAG: intent routing, 10 retrieval tools running in parallel and a semantic cache.

System integration: looking up an order, opening a ticket

What sets an agent apart from a chatbot is action. Each system becomes a tool the agent can call, with a defined permission, and the model decides when to use it.

  • Lookups: Order status, a copy of an invoice or payment slip, delivery dates, the state of a ticket.
  • Actions with clear rules: Updating an account, opening a ticket or rescheduling a delivery, within limits.
  • Sensitive actions: Refunds, cancellations or policy exceptions require human approval or stay with the team.
  • Identity: Before showing order data, the agent confirms who the customer is, as a human agent would.

Instructions hidden in a message can try to divert the agent, which is called prompt injection. That is why each tool gets the least permission the task needs, and the model's output is validated before it reaches the system.

Handing off to a person, with context

A good agent knows when to stop. The handoff follows rules set with the team, and the customer does not have to repeat what they already said.

  • Triggers: The customer asks for a person, the confidence of the answer is low, the topic is on the list of sensitive subjects or the same question keeps coming back.
  • Context: The human agent receives the conversation summary, the data already confirmed and the reason for the handoff, in the support tool they already use.
  • After hours: The agent logs the request, opens the ticket and tells the customer when the team will reply.
  • Review: Handed-off conversations are read every week, because they show what the agent cannot solve yet.

The metrics that show whether AI customer service works

Counting how many messages the agent answered says little: an agent that answers everything may be confidently wrong. The metrics look at outcome, quality and cost together.

  • Resolution: Conversations closed without a person and without the customer coming back with the same problem.
  • Handoff: How many conversations went to the team and why; a recurring reason points to the next fix.
  • Quality: The agent's score on an evaluation dataset of real tickets and edge cases, on every change of instructions, knowledge base or model.
  • Satisfaction: The rating the customer gives at the end of the conversation, compared with the human team.
  • Cost per conversation: Tokens, tool calls and response time of every conversation, recorded in traces.

The yardstick comes from your own support operation. Measuring today's conversations, before the agent goes live, is what lets you compare afterwards without guessing.

Related service

AI Customer Service Agents

Answers from your data and calls a person at the right time.

Free first conversation · Reply within 1 business day

See also: AI & LLM Engineering.

Frequently asked questions

Can an AI agent serve customers outside business hours?

Yes: the agent answers at any hour on what is within its reach, such as lookups and actions with clear rules. Whatever needs a person becomes a ticket, with the context of the conversation and the reply time stated to the customer, and the team picks it up when it is back.

Does an AI agent learn from conversations on its own?

No, and that protects the business: the model is not trained on each conversation. The agent improves when the team reviews handed-off or poorly rated conversations, fixes the knowledge base, tunes the instructions and adds the new cases to the evaluation dataset, which runs before every change goes live.

What if the knowledge base is out of date?

The agent will repeat the mistake with confidence, so the knowledge base needs an owner and a routine. Every document has someone responsible and a review date, policy changes go into the base the same day, and the questions the agent could not answer show what is missing.

Is a company required to offer human support in Brazil?

It depends on the sector: for services regulated by Brazil's federal government, such as telephone, electricity and health plans, Decree No. 11,034/2022 requires customer service reachable 24 hours a day and phone support by people for at least 8 hours a day. Elsewhere, keeping a path to a person is good practice. Each case is for your legal counsel to assess.

Can a customer contest a decision made by the agent?

Yes: article 20 of the LGPD, Brazil's data protection law, gives people the right to ask for a review of decisions made solely by automated processing of personal data that affect their interests. In practice, a refund denied by the agent needs a review path, and the conversation log shows what the agent did and with which data.

Sources

Master Timm · Updated on

Tell us what you're building

Tell us the context: the problem, the timeline and what already exists. You talk directly to the engineer who will do the work.

Request a first call

Free first conversation · Reply within 1 business day