Skip to main content

Entities

Entities are specific pieces of information that your bot extracts from user messages. They represent the key data points your bot needs to understand and act upon user requests effectively. Entities work hand-in-hand with intents to create rich, context-aware conversations.

What are Entities?

An Entity is a structured piece of information that your bot identifies and extracts from user input. For example, in the message "Book a table for 4 people at 7pm tomorrow," the entities might be:

  • Number of people: 4
  • Time: 7pm
  • Date: tomorrow

Entities help your bot capture the specific details needed to fulfill user requests, turning natural language into structured data your bot can work with.

How Entities Work

LLM-Based Extraction: Botnex uses Large Language Models (LLMs) with carefully constructed prompts to identify and extract entities from user messages. When you define an entity, Botnex creates specialized prompts that instruct the LLM to look for and extract specific types of information from user input.

Parameter Creation: When an entity match occurs during conversation, Botnex automatically creates a parameter with the same name as the entity. This parameter contains the extracted value and can be used throughout your bot flows, making the captured information available for Story Nodes, Transition Nodes, and actions.

Custom Entity Creation: Define your own entity types specific to your domain—like product names, service categories, or company-specific terminology. Each entity uses tailored LLM prompts to understand the context and extract the relevant information.

Context-Aware Processing: The LLM-based system considers the full conversation context when extracting entities, improving accuracy and handling ambiguous references.

Testing and Debugging Entities

Test Simulator: Use Botnex's test simulator to see how entities work in real-time. As you chat with your bot in the simulator, you can observe which parameters are being created when entity matches occur. This makes it easy to test your entity definitions and debug extraction issues.

Parameter Visibility: The simulator shows you exactly what parameters are being set during the conversation, helping you verify that your entities are working correctly and capturing the information you expect.

Using Entities in Your Bot

  1. Define Entities: Decide what information you need to extract from users (e.g., dates, names, product types) and create entities for them in Botnex
  2. Add Entity Recognition to Intents: Link entities to relevant intents so that when a user triggers an intent, the bot also looks for and extracts the necessary entities
  3. Use Parameters in Flows: Reference the automatically created parameters (with the same names as your entities) in your Story Nodes, Transition Nodes, or actions to personalize the conversation or perform specific tasks
  4. Validate and Confirm: Optionally, ask users to confirm or correct extracted entities to ensure accuracy and prevent misunderstandings

Examples

Entity: pizza_size

  • Values: small, medium, large, extra-large
  • Synonyms:
    • small: tiny, personal, individual
    • medium: regular, standard, normal
    • large: big, family
    • extra-large: xl, jumbo, giant

Entity: shirt_color

  • Values: red, blue, green, black, white
  • Synonyms:
    • red: crimson, scarlet, cherry
    • blue: navy, royal, sky
    • green: forest, lime, emerald

Best Practices

Be Specific: Define entities for all the key information your bot needs to collect to complete user tasks effectively.

Create Comprehensive Custom Entities: Create entities with example values and synonyms that cover how users actually speak, as these help train the LLM prompts for better extraction accuracy.

Test Entity Extraction: Use the test simulator regularly to verify that your entities are being extracted correctly and that the right parameters are being created.

Validate User Input: Confirm extracted entities with users when necessary to avoid misunderstandings, especially for important information like dates, times, or quantities.

Keep Entities Updated: Regularly review and update your entities as your bot's functionality grows and you learn more about how users express themselves.

Test with Real Language: Use actual user messages in the test simulator to verify entity extraction and identify gaps in your entity definitions.

Handle Missing Entities: Plan for cases where entities aren't detected and prompt users for the missing information.

Monitor Parameters: Use the test simulator to watch how parameters are being set and ensure they match your expectations.

Entity Features Summary

FeatureDescriptionExample
EntitySpecific piece of information to extract"date", "time", "location"
Custom EntityUser-defined entity for specific needs"product_name", "service_type"
LLM PromptsSpecialized prompts that extract entity valuesPrompts trained to recognize dates, names, etc.
ParametersAutomatically created when entities are matchedEntity "date" creates parameter "date"
SynonymsAlternative ways to express the same value"large" = "big", "jumbo", "xl"
Test SimulatorTool to test and debug entity extractionSee real-time parameter creation during chat
UsageHow parameters are used in the flowFill forms, trigger actions, personalize responses

By using entities effectively in Botnex, you can make your bot more intelligent and responsive, enabling it to understand and act on the details your users provide. Entities are the building blocks for creating rich, interactive, and personalized conversational experiences that feel natural and helpful.