Entities
An Entity is a building block which contains a collection of entries, typically words or lists that have some characteristics in common. A typical example for such words include named entities, like cities or product names. The entries of the Entity are then used to identify when the Entity should match, which helps your bot understand what the user said.
The sections on this page provide information about the various aspects of Entities:
Concept
An Entity is a building block which contains a collection of entries, typically words or lists that have some characteristics in common. A typical example for such words include named entities, like cities or product names, which are then used to identify when the Entity should match.
Entities can be used in TLML Syntax, Language Objects, Listeners, Matches, etc. to create more powerful natural language understanding. In many ways, they are similar to Language Objects.
When referenced in other components of Teneo, Entity names must be preceded with the percentage sign %.
An Entity is made up of the following components:
- Entity name
- Entry
- (Optional) variables
An Entity can have as many entries as needed and each entry can be associated with zero or more variables. However, all entries must have the same type of variable.
Relevant data can be extracted from the user input via NLU variables; see Tips and Tricks for an example.
Naming an Entity
The following conventions apply for naming an Entity:
- An Entity's name must be unique within the solution.
- The name must be written in upper case. Lower-cased characters are automatically upper-cased by Teneo.
- The name cannot contain any reserved characters. Any special characters or blank spaces are automatically converted into underscores by Teneo.
The following conventions apply for naming an Entry:
- The entry must be unique within the Entity. Teneo Studio prevents the user from saving the Entity if two entries have the same value.
- Reserved characters used as entry values will automatically be escaped with quotes.
- To use another Entity as an entry value, its name must be preceded by the percentage sign (
%) and written in capitalized letters. Teneo Studio automatically capitalizes letters following%.
The following conventions apply for naming a variable:
- The name cannot contain spaces or other special characters.
- The variable cannot be named
lobor_USED_WORDSsince it conflicts with special variables. - A closing curly bracket used as a script variable value will automatically be escaped with a backslash.
Entity Matching
The Longest Match option (:L) is implicitly applied to the Entity. The Longest Match option is used in TLML Syntax and it ensures that Engine evaluates the full syntax and selects the match with the maximum number of matched words. In other words, this type of behavior makes sure that substrings are not accidentally matched.
For example, given the following TLML Syntax and user input:
- TLML Syntax:
(york / (new >> york)):L - User input: "new york"
"new york" will match instead of "york".
Entities within a Solution
When working in a solution, users have access to the following collections of Entities:
- Entities built and stored within the solution, and
- Entities available in any lexical resource assigned to the solution.
Entities stored in the solution are under full control of the Teneo Studio user and these can be managed and modified in any way. Entities from a pre-built lexical resource (e.g. Teneo Lexical Resources) can be viewed and used in TLML Syntaxes but not modified.
A full list of pre-built Entities can be found here.
If an Entity created in the solution shares its name with an Entity available through an assigned lexical resource, the Entity located in the solution is always chosen by Engine over the Entity from the assigned lexical resource.
Entries
An entry is one row in the Entries Editor in an Entity.
The entry value can be either of the following:
- a word
- a sequence of words
- a different Entity
- a different Language Object
Internally, a sequence of words will be transformed into Teneo's condition syntax. For example, if the two words "Chai latte" are entered into the entry field of an Entity, they will be interpreted as Chai>>latte which means that the word "Chai" is directly followed by the word "latte" without any intervening word allowed in between them. However, this holds only for sequences of strings.
For any other combination of entries, e.g. sequences containing Entities or Language Objects concatenating multiple elements is not possible. If you want to add such a sequence (for example HOT.ADJ.LEX WATER.NN.LEX) to an Entity, you should create a new Language Object (here: HOT_WATER.ADJ.NN.MUL) that contains the sequence of these two Language Objects in its language condition. This multiword Language Object can then be added to be an entry of the Entity BEVERAGES_SERVED.ENTITY.
Variables
You can assign an entry zero, one or more variables of type string or script. When a variable is added to one entry, all entries need to have a variable value:
- String type variables are implicitly quoted and a variable value can be left empty when needed.
- Script type variables can contain scripted values or manually quoted values.
When changing the type from script to string, quotes are added to the variable values; while changing from string to script, any leading or trailing quotes are removed from variable values and the implicit ones remain.

How To
Open an Entity
- Teneo Studio Desktop
- Teneo Studio Web
To open an Entity in read only mode, do one of the following:
- Double-click the wanted Entity in the Solution Explorer view.
- Select the Entity and click Open in the top menu.
- Right-click the Entity and select Open in the context menu.
It is possible to open an Entity in the Entries editor by left-clicking it. You can also open an Entity by double-clicking it.
You can open an existing Entity by:
- Navigating to the folder where the Entity is stored or, alternatively, open the list of available Entities from the Solution dashboard.
- Click the Entity name.
- The Entity is now opened.
Edit an Entity
- Teneo Studio Desktop
- Teneo Studio Web
You can easily modify Entities in the Entity Editor. To edit an Entity in Teneo Studio Desktop, do one of the following:
- Press the Alt key while double-clicking the wanted Entity in the Solution Explorer view.
- Select the Entity and click Edit in the top ribbon.
- Right-click the Entity and select Edit in the context menu.
Updating the name of the Entity is done by clicking the name in the top ribbon and performing any needed modification inline; alternatively click Info to update the name and the description.
When writing entries referencing other Entities, Language Objects and annotations (by writing % and the name of the document or annotation), the entry value is validated as TLML Syntax and the highlighting known from the Syntax editor is applied.
Note that Language Objects and Entities referenced from an assigned lexical resource always open in read-only mode. It is possible to open an Entity in edit mode in the Entries editor by left-clicking it. You can also open an Entity in edit mode from the Syntax Editor by pressing Alt while clicking.
To edit an Entity in Teneo Studio Web, do the following:
- Navigate to the Entities panel on your Solution dashboard.
- Open one of the Entities and click Edit in the top right of the navigation bar.
If the Entity has been locked, it will not be possible to edit it. In that case, you may want to create a new Entity instead.
Create an Entity
- Teneo Studio Desktop
- Teneo Studio Web
To create a new Entity, follow these steps:
- Go to the Solution Explorer in the main Teneo Studio window (Home tab).
- Optionally select the folder, or create a new folder where the Entity should be added.
- In the top ribbon, click on the Entity button in the New area.
- The Entity window opens on the Properties tab, add the Name of the Entity. Note that the .ENTITY suffix is automatically added to the Name field.
- Optionally, add a Description.
- Click the green Play icon, or the back arrow in the top left corner.
- Enter the Entries and any wanted Variables and Values.
- Optionally, add Examples in the right side panel.
- Remember to Save to preserve all the modifications.
Need to create several Entities (or Language Objects)? Consider using Bulk import.
Create Entity from Entry
Create a new Entity (or Language Object) from the Entity editor by right-clicking the strikethrough reference to the new document and select Create Entity or Create Language Object in the context menu.

To create a new Entity, follow these steps:
- If in a folder, click the Create button and select Create new entity; if in the Entity list, simply click the Create new entity button.

- The Create New Entity opens, write the Entity name and, optionally, an Entity description.
- Lastly, click Create Entity.
Save an Entity
- Teneo Studio Desktop
- Teneo Studio Web
To save an Entity with a comment follow these steps:
- Click Save in the top ribbon of the Entity.
- In the dialogue box (optionally) write a comment.
- Click OK.
To save directly and bypass the comment, press the Alt key while clicking the Save button.
To save an Entity, follow these steps:
- Click Save in the top right corner of the window. Note that the Save button is only visible when changes have been performed.
- Optionally, add a comment.
- Click Save to confirm the save action or Cancel to abort the save.
Successful save is confirmed with a "Document saved successfully!" message; by clicking elsewhere in the browser window the message is closed.
Close an Entity
- Teneo Studio Desktop
- Teneo Studio Web
To close an Entity, either:
- Click the X in the top, right corner of the Entity window.
- Click the Close button available in the top ribbon.
- In the Entity backstage, click Close in the left-side menu.
Should there be unsaved changes, Teneo Studio prompts the user to Save or Close without saving.
To close an Entity in Teneo Studio Web:
- First, remember to Save if any changes were performed in the Entity to preserve these.
- Next, simply navigate back by using the back arrow of the browser.
Teneo Studio will prompt the user to save if unsaved changes are detected.
Delete an Entity
- Teneo Studio Desktop
- Teneo Studio Web
To delete a Entity from the solution, follow these steps:
- Select the Entity in the Solution Explorer.
- In the top ribbon of Teneo Studio, click Delete.
- A confirmation message will be displayed, click Delete again. If the Entity is in use, an Item in Use message will appear, click Select All to delete anyhow or Continue to cancel deletion (the user can also click the X in the box to cancel the deletion).
For more information, please see delete documents.
To delete an Entity from the solution, follow these steps:
- Navigate to the folder where the Entity is saved.
- Hovering over the Entity, an icon of a recycle bin appears in the right side of the browser window, click it.
- The user will be prompt to confirm the deletion of the Entity:
- Click Delete to perform a usage check before deletion.
- Click Delete without usage check to delete directly.
- Click Cancel to cancel the action.
The deletion of an Entity currently cannot be undone in Teneo Studio Web, for this action please refer to the Recycle Bin available in Teneo Studio Desktop.
Add Entries and Variables
- Teneo Studio Desktop
- Teneo Studio Web
To add an entry in your Entity, please follow these steps:
- Open the entity where you wish to add entries.
- Select the Edit mode in the ribbon bar; a new window will open.
- You can now add new entries.
- Remember to Save the Entity to preserve the changes.
To add a variable for you entry in Teneo Studio Desktop, please follow the below steps:
- In the top ribbon of the Entity, click Add Variable.
- Clicking the lower part of the button allows to select between String variable or Script variable; a string variable is added when clicking the upper part of the Add Variable button.
- Add the name of the variable by clicking the cell New_Variable
- Remember to Save the Entity to preserve the changes.
When entering variable values, the auto complete function looks up other values already in the variable column and suggest the value text to the user; pressing Enter copies the suggestion into the cell.
You can generate entries for an entity using the copilot feature. Please see generate entries for more information.
Add Bulk Data
Data can be added to an Entity in bulk by dragging/dropping or copying/pasting content from external files. The data can be single piece of text (no TABs and a maximum of one trailing carriage-return) which when pasting will enter the text in all the selected cells, or an array of data with 1-n rows and 1-n columns. Pasting or dragging and dropping will create new entries.
Please note:
- Rows are carriage-return separated.
- Columns are TAB separated.
- Variable columns are only created if they are needed when using drag/drop or copy/paste.
- When creating new variable columns, the user can decide if first row in the pasted data should be header, i.e. variable names or just data.
- If the Entity already has enough variables defined, then no variable columns are created.
- Variable columns created when using drag/drop or copy/paste defaults to the type string.
- If one or more of the variables to be pasted should be of the type scripts, to avoid them becoming string types when pasted (and thus resulting in quoted scripts if the type is changed), rather:
- Copy and paste the header, i.e. the variable names only, this will just create the variable columns.
- Remember to include an empty entry column in the one-row of data to copy.
- Change the type of the variables that are to be script types.
- Now, copy and paste the entries data.
- Copy and paste the header, i.e. the variable names only, this will just create the variable columns.
- When using Ctrl + c on more than one row, the Ctrl + v shortcut will paste into the first column as entries.
- When using Ctrl + c on one field and marking several rows, doing Ctrl + v will paste to several rows the same content.
To add an entry in your Entity, please follow the below steps:
- On your Solution dashboard, navigate to the Entities panel.
- Choose the Entity where you wish to add a new entry.
- Click the Add entry button; this will add a new row to your entity.
- Remember to Save the Entity to preserve the changes.
To add a variable for your entry in Teneo Studio Web, follow the below steps:
- Click Add string variable or Add script variable.
- Give the variable a name by clicking New_Variable.
- Remember to Save the Entity to preserve the changes.
Sorting by variable value is possible by clicking the arrow next to the three vertical dots.
See also the Entries editor.
Edit Entries and Variables
- Teneo Studio Desktop
- Teneo Studio Web
Any existing entry value or variable can be modified by simply clicking the text field to update the value; pressing Enter allows to go to the next entry (move one line down) while pressing Tab allows to move to the next column.
To change the type of an already existing variable, follow the below steps:
- Select the header of the variable or any field below.
- In the top ribbon, click String or Script depending on the wanted type.
- Remember to Save the Entity to preserve the changes.
When changing the type from string to script, quotes are added to the variables values while any leading or trailing quotes are removed from variable values when changing from script to string (only the implicit coral-colored quotes remain).
String type variables are implicitly quoted and a variable value can be left empty if needed. Script type variables can contain scripted values or manually quoted values.
Any existing entry value or variable can be modified by simply clicking the text field to update the value; pressing Enter allows to go to the next entry (move one line down) while pressing Tab allows to move to the next column.
To change the type of an already existing variable, follow the below steps:
- In the variable's header, click the three vertical dots.
- Next, click Change Type.
- The variable is now changed to Script/String (depending on which variable type it had before).
- Remember to Save the Entity to preserve the changes.
Delete Entries and Variables
- Teneo Studio Desktop
- Teneo Studio Web
A line containing an entry can be deleted by following the below steps:
- Select the entry.
- In the top ribbon, click Delete in the Entries or Variables section.
- The entry and any following variables are deleted from the Entity (the line is removed).
- Remember to Save the Entity to preserve the changes.
Deleting an entry also means deleting its variable.
To delete a variable, simply follow the below steps:
- Select the header of the variable or any field below.
- In the top ribbon, click Delete in the variables section.
- Remember to Save the Entity to preserve the changes.
A line containing an entry can be deleted by clicking the x available at the line of the entry.
To delete a variable, simply follow the below steps:
- In the variable's header, click the three vertical dots.
- Next, click Delete variable.
- Remember to Save the Entity to preserve the changes.
Sort Entries and Variables
- Teneo Studio Desktop
- Teneo Studio Web
To sort by a specific column, select the column header, then the arrow will appear next to the name and it is possible to sort either a-z or z-a as visualized in the below image.

To sort by a specific column, simply click the arrow icon available in the top of each column.

UI
- Teneo Studio Desktop
- Teneo Studio Web
Entries Editor

| Section | Description | Related Pages |
|---|---|---|
| Top ribbon | Contains editing options and buttons. | See table below. |
| Copilot | Allows the user to use Generative AI for easy entry creation. | Teneo Copilot |
| Used by panel | Provides information about where the Language Object is referenced. Click any of the listed documents to navigate to it. | |
| Errors | Highlights any errors for easy troubleshooting. | |
| Entries editor | The editor where entries and variables can be added in a table-like view | Add Entries and Variables |
| An entry | Either a string, Language Object, or another Entity. | Entries |
| A variable | A string or a value obtained from a script. | Variables |
| Examples | Allows the user to write example which the Entity scope should cover |
Top ribbon

The Entity top ribbon provides a range of buttons and options for working with the Entity, in the following table the different buttons are listed and - when relevant - links to more information provided.
| Section | Button | Description | Related pages |
|---|---|---|---|
| Entity | Close | Close the Entity window | Close an Entity |
| Save | Save the Entity in the current state; clicking the lower part of the button allows the user to save the Entity with or without a comment | Save an Entity | |
| Enable/disable | Enable or disable the Entity | Enable or Disable documents | |
| Edit | Undo/Redo | Undo/redo changes performed in the Entity | |
| Entries | Add Entry | Adds new entry line to the Entity | Add Entries and Variables |
| Delete | Deletes the selected entry line | Delete Entries and Variables | |
| Generate | Only available when LLM Settings are defined for the Account Generate entries automatically with help from Large Language Models | Teneo Copilot | |
| Variables | Add Variable | Adds a new variable. | Add Entries and Variables |
| Delete | Deletes the selected variable. | Delete Entries and Variables | |
| String/Script | Select if the variable should be of type string or script. | Variables | |
| Stable Version | Set/Unset | Set the current version of the Entity as stable or unset it | Version flag |
| Branching | Include/Exclude | Include or Exclude the Entity from branching when working in a Localization setup | Localization setup |
Entity tab

The backstage of an Entity (Entity tab in the top of the Entity window) contains the following menu items.
| Backstage menu | Description | Related pages |
|---|---|---|
| Save | Saves the Entity. | Save an Entity |
| Properties | Allows to edit the name of the Entity, add a description or view the Id and location | |
| History | Lists the history of versions created each time the Entity was saved, comments added at save are displayed here. Open a previous version by clicking the version number; restore a previous version by opening a specific version and clicking Restore in the top ribbon | Version history |
| Close | Closes the Entity; Teneo Studio prompts the user to save in case unsaved changes are detected. | Close an Entity |
| Green arrow | Creates a new entity. | Create an Entity |

The Entity window in Teneo Studio Web contains the following:
| Section | Description | Related Pages |
|---|---|---|
| Entity name | Displays path and name of selected Entity. | |
| Search | Allows the user to search for a specific entry in the Entries editor. | |
| Info | View information related to the Entity. | |
| Save | Visible only when changes have been performed. | |
| Entries editor | The editor where entries and variables can be added in a table-like view | |
| Add entry | Allows the user to add a new entry. | Add Entries and Variables Entries |
| Add string variable | Either a string, Language Object, or another Entity. | Variables |
| Add script variable | A string or a value obtained from a script. | Variables |
| Generate Entries | Use LLMs to generate Entries using Teneo Copilot. | Teneo Copilot |
| Tryout | Allows the user to test changes. | Tryout |
Practical Examples
Simple Entity
- Teneo Studio Desktop
- Teneo Studio Web
This simple Entity contains entries denoting cities in the Netherlands:
To enhance natural understanding, the entries can have variables carrying additional information about each entry. For example, different names may denote the same city, like "Den Haag" and "The Hague". With variables, it is possible to map these different variants to the same city name. Another example is the code of the nearest airport, which is useful to have in flight booking scenarios.
This simple Entity contains entries denoting cities in the Netherlands:

To enhance natural understanding, the entries can have variables carrying additional information about each entry. For example, different names may denote the same city, like "Den Haag" and "The Hague". With variables, it is possible to map these different variants to the same city name. Another example is the code of the nearest airport, which is useful to have in flight booking scenarios.

Entity with Language Objects
- Teneo Studio Desktop
- Teneo Studio Web
This Entity maps Language Objects to strings:

In this example, the entries are either Language Objects (e.g. %AMERICANO.NN.LEX) or plain text (e.g. flat white). Note that the plain text entries are not wrapped in quotes, but the values in variable coffeeType are, making them strings.
This Entity maps Language Objects to strings:

Accessing Variables
- Teneo Studio Desktop
- Teneo Studio Web
One way to access Entity variables is by using Listeners.
Here, the Flow Variable orderedBeverage is assigned lob.beverageType. This lob is a special variable which points to the Entity (or, more generally speaking the Language Object, hence lob) to which the script has been attached to, BEVERAGES_SERVED.ENTITY, and retrieves the value of the Entity's variable beverageType. This way, if a valid beverage type is mentioned in the conversation, it is picked up by the Listener, stored in a Flow Variable and stored for further processing, such as ordering the beverage.

Did you know you can access Entity variables by using attached scripts and After Matches?
One way to access Entity variables is by using Listeners.
Here, the Flow Variable orderedBeverage is assigned lob.beverageType. This lob is a special variable which points to the Entity (or, more generally speaking the Language Object, hence lob) to which the script has been attached to, BEVERAGES_SERVED.ENTITY, and retrieves the value of the Entity's variable beverageType. This way, if a valid beverage type is mentioned in the conversation, it is picked up by the Listener, stored in a Flow Variable and stored for further processing, such as ordering the beverage.

Using Script Variables
- Teneo Studio Desktop
- Teneo Studio Web
In the following example, the value 'americano' will be assigned to the Flow Variable orderedBeverage if the user input is 'I want an americano'.
What happens is the following:
- The user says "I want an americano".
- All entries of BEVERAGES_SERVED.ENTITY are searched through to match "americano".
- A match is found in the values of the nested Entity COFFEES_SERVED.ENTITY, more specifically in the Language Object AMERICANO.NN.LEX.
- The value "americano" of the Entity variable coffeeType is propagated up to the Entity variable beverageType.
- The value of the variable beverageType is accessed via the propagation script in the listener condition and assigned to the Flow Variable orderedBeverage.

In the following example, the value 'americano' will be assigned to the Flow Variable orderedBeverage if the user input is 'I want an americano'.
What happens is the following:
- The user says "I want an americano".
- All entries of BEVERAGES_SERVED.ENTITY are searched through to match "americano".
- A match is found in the values of the nested Entity COFFEES_SERVED.ENTITY, more specifically in the Language Object AMERICANO.NN.LEX.
- The value "americano" of the Entity variable coffeeType is propagated up to the Entity variable beverageType.
- The value of the variable beverageType is accessed via the propagation script in the listener condition and assigned to the Flow Variable orderedBeverage.

Tips and Tricks
Automatic Propagation of Variable Values
Variables of referencing entries can be automatically set to propagate the variable value when a matching variable is present.
- A new referencing entry is added to the parent - any matching variables will be propagated.
- A new variable is added to the parent - any referencing entry with matching variables will be propagated.
In this example:
CITIESEntity contains acity_codestring variable.- A new
SPECIAL_CITIESEntity / Language Object is added. This has acity_codeNLU variable and a three-character value. - In the Entity
CITIESa reference to theSPECIAL_CITIESEntity / Language Object is added.
The editor now detects the city_code variable in the SPECIAL_CITIES Entity / Language Object and adds the value obtained from lob.city_code to the variable cell. In other words, this is a more automatic way to obtain values for the entries in an Entity.
The value "BAS" is only assigned when Basingstoke is found (as specified in the first row of SPECIAL_CITIES.LOB)
