We use cookies to improve your experience. By continuing, you agree to our use of cookies. Read our Privacy Policy

    Back to The Signal

    The Signal

    Chatbot Intent Libraries: How to Build, Test and Govern Them

    What a chatbot intent library is, how to structure and maintain one, and why independent testing of real conversations shows whether it works in production.

    30 November 2026 · 10 min read

    Chatbot Intent Libraries: How to Build, Test and Govern Them

    A chatbot intent library is the organized set of things customers want from an AI agent, each defined with example phrasings and a rule for what happens next. It decides what the agent understands, what it hands to a human and what it ignores. A library can look complete in the build tool and still fail in production, which is why independent testing of live behavior matters: Lexic audits found that 85% of assessed agents fail to escalate issues to a human representative appropriately. This guide covers how to structure a library, what each intent needs, how to test it and how to keep it current.

    Lexic AI
    lexic.ai
    Check How Your Agent Handles Intents
    Lexic Compass independently audits conversational AI agents, surfacing blind spots in customer experience, security, reliability, and regulatory compliance.
    Visit

    TL;DR

    • An intent library is a taxonomy of customer goals, each with a definition, example utterances, and a fallback or escalation rule.
    • Mine real conversations to build it, name intents with a verb and an object, and keep intents from overlapping.
    • Test with a held-out set of real utterances, not only happy-path scripts, and watch the share of unmatched input.
    • Escalation and disclosure rules belong in the library, because regulators and customers judge the agent on those moments.
    • A library is never finished: review it on a fixed schedule, version it and give it one owner.

    Table of Contents

    What an intent library is

    An intent is the action a user wants to perform. In the common JSON format, an intent has a tag (its name), patterns (what users might say) and responses (what the bot replies), and the bot matches input to the closest pattern by similarity score. A tutorial on intents in natural language processing shows this structure, including a similarity threshold below which input passes to a higher tier, such as a human agent.

    The library is the whole collection, plus the structure around it. Three terms matter:

    • Intent: the user’s goal, such as “cancel booking”.
    • Utterance: one way a user might phrase that goal.
    • Entity or slot: a detail the agent must extract, such as a date, an order number or a product size.

    The library is not the classifier. The taxonomy is the map, and the classifier is the model that places each message on it. Teams that confuse the two tend to fix routing errors by retraining the model when the real problem is that the map has two intents with the same meaning.

    In most platforms the library is also a practical container. Some tools let you group intents into folders by sub-domain, preload system intents such as greeting, goodbye and escalate, and import intents in bulk from a spreadsheet. Others keep a global repository of intents and entities that every workflow can reuse. The mechanics differ, but the design questions are the same.

    Build it from real conversations

    The most common mistake is writing intents from the org chart: one intent per department or product line. Customers do not think that way. Start from what they actually said.

    1. Collect source material. Call transcripts, chat threads, email subject lines and ticket categories all work. Mask personal data before anyone clusters or labels it.
    2. Cluster, then split. Clusters group messages by theme, not by action. A retail banking study presented at ACL 2026 found a single direct-debit cluster that held cancel, reinstate and query requests. Those are three intents with three different next steps.
    3. Name each intent with a verb and an object. “Cancel booking” and “change delivery address” tell a reviewer what should happen. “Billing” does not.
    4. Have two reviewers sort a sample independently. Where they disagree, the definitions overlap.
    5. Keep the hierarchy shallow. Two levels (domain, then intent) are enough for most teams. Add a third only where workflows genuinely differ, for example where verification rules change.

    The banking paper is a useful reference for scale. Its deployed taxonomy has 14 top-level nodes and more than 200 granular ones, built with LLM-assisted induction under a mutually-exclusive, collectively-exhaustive principle and refined by subject-matter experts. The authors report that iterating on the taxonomy produced the largest performance gains in their ablation tests. Better structure beat better modeling.

    What each intent needs

    A name and a list of phrases is not a definition. An intent that a new team member could not apply consistently will not be applied consistently by a model either. For each intent, record:

    Field What it holds Why it matters
    Definition One line stating the customer goal Settles disputes about overlap
    Examples Several varied, real utterances Trains and tests recognition
    Counter-example At least one message that looks similar but is not this intent Prevents false matches
    Entities Details the agent must capture Lets the agent act without extra turns
    Next action What the agent does, or who takes over Exposes duplicate intents
    Risk level Whether the topic is sensitive, regulated or financial Drives escalation rules
    Owner and status Who maintains it, and whether it is permanent or tied to a campaign Allows later merging or retirement

    A quick overlap check is the next-action test: if two intents lead to the same next action, they are probably one intent. If one intent leads to two different actions, it should be split.

    How many intents and examples

    Platform guidance gives a feel for the numbers, though each tool has its own limits. Oracle’s intent training guidance says test cases that resolve within 5% of the confidence threshold are unreliable and may signal too few training utterances. It also notes that up to 40% of a skill’s workload may be off-domain. Plan for that traffic from the start rather than treating it as an exception.

    Oracle’s do’s and don’ts for conversational design add practical rules: use real, whole-sentence utterances, keep utterance counts similar across intents, use entities to separate overlapping intents, and avoid over-training any single intent. They also advise against testing only the happy path.

    Design the fallback and escalation ladder

    The library has to say what happens when recognition fails or the topic is sensitive. A workable ladder has four rungs:

    1. High confidence, in scope: proceed.
    2. Medium confidence: ask one clarifying question.
    3. Low confidence or out of scope: state what the agent can do and offer a human.
    4. Sensitive trigger: escalate whatever the confidence score says.

    The fourth rung is where compliance and customer trust are won or lost. Legal, compliance and clinical owners, not only the AI team, should sign off the list of sensitive triggers. Complaints, vulnerability signals, cancellation of regulated products, and requests to speak to a person all belong on it.

    The banking paper shows the same discipline in production. Below a similarity threshold, cases route to fallback queues or manual review. When the share of unknown conversations passes 10%, the team triggers a taxonomy realignment. Predictions are logged with candidate matches and confidence scores for audit, outputs assist routing without triggering irreversible customer-facing decisions, and human override stays in place.

    Test recognition, then test behavior

    Testing an intent library has two layers, and teams often stop after the first.

    Layer one: recognition. Hold back part of your real utterances as a test set. Oracle’s guidance describes an 80/20 split between training and test data, and a cycle of build, test, deploy, monitor and update. Look for confusion between intents, intents that score well on messages that do not belong to them, and the proportion of input that lands in the unmatched bucket.

    Training split and intent testing lifecycle

    Layer two: behavior in conversation. A correct classification does not prove a correct conversation. Research on high-quality conversational systems argues that testing should cover all dialogue flows, ambiguity in intent identification and model sensitivities, and should be repeated during development and periodically in production. That includes multi-turn flows, users who change their mind, and users who say something the library never anticipated.

    This is also where internal tests run out of road. The team that wrote the intents tends to test the phrasings it expected. Vendor dashboards report on the vendor’s own model. Neither shows what a customer meets when they type something unexpected or ask for a person.

    Maintain the library as customers change

    Customers invent new phrasings, products change, and policies move. The same research on conversational systems notes that the intent set has to grow: new intents for new topics, richer examples for new ways of saying old things, and archived intents when they stop being used. It also observes that adjusting confidence thresholds only softens the effects of drift. It does not remove the cause.

    A maintenance routine that stays manageable:

    • Monthly: review the top unmatched and low-confidence conversations and the intents with the highest handover rates.
    • Quarterly: re-run overlap tests, merge or split intents, and retire intents with near-zero volume.
    • Before any change goes live: update affected intents ahead of a new product, fee, policy or regulation.
    • Always: version the library with a change log and assign one named owner.

    Retrain after every session of edits, since a library and a model that have drifted apart produce errors nobody can trace.

    Why the library matters for AI Act and compliance teams

    For regulated sectors and US companies entering Europe, the library is also an evidence document. It records what the agent was designed to recognize, what it was designed to escalate and what it was told to say.

    Under Article 50 of the EU AI Act, providers of chatbots and virtual assistants must design them so that users are informed they are interacting with an AI. The obligations extend to deployers as well. Confirm the current application dates and any amendments on the official EU pages, since timelines for parts of the Act have been under revision.

    A disclosure rule written into the library is a design intent. Whether the live agent follows it in every channel and every edge case is a separate question, and only observed conversations can answer it. The same goes for escalation: a defined “speak to a person” intent is only worth something if the agent hands over when a real user asks.

    Promo: checking the library against real behavior

    Lexic Compass is our AI agent audit platform. It assesses conversational AI agents from any vendor by interacting with them as real users would, and it covers Customer Experience, Security, Technical Reliability and Regulatory Compliance. Findings come with evidence, and third-party cryptographic hashing supports verification of evidence integrity and traceability. Teams use it to govern agents in production and to hold vendors accountable.

    Lexic AI

    The engagement options are Flash Preview, Audit Sprint and Enterprise Continuous Trust, described on the Compass audit page. For teams that also want to learn from every customer conversation, Lexic Pulse analyzes calls, chats, emails and tickets for sentiment, churn and opportunity signals, which feeds the monthly review of your intent library with what customers actually ask.

    Perspective

    We see an intent library as a promise the organization makes about its AI agent: this is what it understands, this is what it hands to a person, this is what it tells the customer about itself. Promises are checked by watching what happens, not by reading the document.

    That is why we audit agents from the outside, as a real user would. Our audits found that 85% of the agents assessed fail to escalate issues to a human representative appropriately. In most of those cases a handover rule existed on paper. The gap sat between the design and the conversation.

    Vendor-led monitoring measures the vendor’s own model against the vendor’s own categories. Independent assurance, with evidence that can be verified later, gives business, CX and compliance leaders something they can use to govern the agent and to hold the provider to account. As deployments scale, the library, the monitoring and the independent audit work best together.

    Sergio Llorens

    FAQ

    What is the difference between an intent and an entity?

    An intent is what the user wants to do, such as “change delivery address”. An entity is a detail the agent needs to do it, such as the new address or the order number. Entities also help separate intents that otherwise overlap.

    How many intents should a chatbot have?

    There is no universal number. Start with the requests that make up most of your volume and add intents as real conversations show new needs. Overlap becomes harder to control as the list grows, so split broad intents only when the next action differs.

    How do I know if two intents overlap?

    Have two reviewers sort a mixed sample of real utterances independently and compare results. Disagreements point to overlapping definitions. If two intents lead to the same next action, merge them.

    How often should an intent library be reviewed?

    Review unmatched and high-handover conversations monthly, and re-test overlap quarterly. Update affected intents before any product, policy or regulatory change goes live, and keep a change log with one named owner.

    Does a good intent library prove an AI agent is compliant?

    No. The library shows design intent. Compliance with disclosure, escalation and security expectations is shown by how the agent behaves in real conversations, which is what an independent audit examines.

    Sources

    Want an independent verdict on your AI agent?

    Back to The Signal