1. Home
  2. Get started
  3. How to use an entity?

How to use an entity?

An Entity represents a concept, or a subject, that can be used in a sentence. It can be used to handle different values for an important concept, or for the chatbot to retain information during the conversation.

There are two kinds of entities in the Clustaar Platform: Built-in and User defined.

User-defined entities

You can create your own entities according to your own needs. You can allow your chatbot to recognize words or expressions. 

You should use an entity when you need to:

  • Write several formulations with one, in an intent (factorisation);
  • Force the presence of a concept for the matching of an intent (like an essential key-word);
  • Use the value of a session variable.

Factorisation

You can use this to easily maintain several formulations in an intent. It can be useful for concepts or actions.

Concept

Action

A single entity can be used in several intents.

⚠️⚠️ When using an entity, the sentence must remain coherent: don’t mix adjectives, verbs and nouns in one entity. ⚠️⚠️

Don’t hesitate to create many different entities. It’s better than to create one “catch-all” entity: in a context, two words can be synonyms, but not in the other. 

Two entities can also share values/synonyms and be used in different contexts.

“Required” parameter

An intent does not use the entity directly. The intent will create a parameter to represent an entity, whose value can be stocked in a session. Those parameters are very important because you can change them yourself, to have two different versions of one entity in the same intent. For example, one “Required”, the other not.

By default, the parameter of an entity is on “Synonym”. This means this value has the same weight as any other word of the formulation.

It can also be “Required“. This means one of the values/synonyms of the entity must be present in the user query to match the intent.

⚠️⚠️ A non-necessary word must never be “required”, or else it can stop the intent from matching when it should. ⚠️⚠️

In this example, “contact” and “customer service” are essential words (Required), but “mail” is not because (Non-required) people could say: “I want to contact your customer service” or say “by phone” instead of “via email”.

A few tips on how to use the “Required” option:

I use my entities for synonyms, but if it’s not present, the intent should still match

>> Synonym

I want to anticipate informations a user could give me before I even ask (see the article about values)

>> Not Required

I need this word to be present in the question

>> Required

I don’t need the concept to be present in the question, but if it’s absent, the sentence loses its meaning

>> Synonym

Here is the basis of the entity concept. To go further, you can check out these articles:

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
More help