# Entity-Based Conversation

## An Enhanced Conversational Experience

Speaking with Crystal is getting easier than ever!

Since [<mark style="color:blue;">**Release 2.57**</mark>](https://docs.igenius.ai/release-notes/2024/crystal-web/crystal-web-v2.57), Crystal offers you **more freedom** when asking questions.

1. **You can ask about Topics that are not pre-configured**

*In the past, you needed to know which Topics were configured in order to ask a question. Now, there are no limits to the Topics that you can ask Crystal about.*

2. **You can ask questions with more flexibility**

*In the past, explicating the Objective was always strictly mandatory when asking about a Topic. Now, there are also scenarios where you don't need to specify it in greater detail.*

## A New Topic Generation Method&#x20;

The described conversation enhancements are possible thanks to the introduction of a new Crystal capability: the **automatic generation of Topics based on Entities**.&#x20;

This is an *additional method for Topic generation* that stands alongside the *pre-existing* [***Configuration process***](https://docs.igenius.ai/crystal-console/topics-configuration) *method,* carried out by the Admin User in the Crystal Console.

{% hint style="info" %} <mark style="color:blue;">**Please Note**</mark>

The Topics known as "A*uto-generated Topics*" are automatically generated by Crystal to differentiate them from the *"Configured Topics"*, created by the Admin User.
{% endhint %}

Unlike Configured Topics, Auto-generated Topics don't need to be manually created as they are **generated directly by Crystal**.&#x20;

That's why you can now ask questions beyond the scope of Configured Topics.

However, Topic Configuration is still currently supported, as it remains a fundamental pillar of Crystal conversations. Both methods combined together ensure the most advanced and complete conversational experience ever available on Crystal.

A this time, the automatic Topic generation method is activated *when no specific Configured Topic is available* to address the request.

In other words, when you ask about a Topic, Crystal first tries to match a Configured Topic for which you have viewing permissions. If there aren't any, a new Topic will be generated.&#x20;

*All you need to do is keep asking questions and Crystal will provide the best type of Topic available to meet your request.* &#x20;

{% hint style="warning" %} <mark style="color:orange;">**Remember**</mark>

Even though this capability revolves more around the *logics beneath Crystal's answer formulation* (i.e. how Crystal generates Topics autonomously), it also impacts *the way you can ask for Topics*.

To talk to Crystal and get answers in the form of Auto-generated Topics, you can still follow the same [**conversational rules**](https://docs.igenius.ai/crystal-advisor/talk-to-your-data/conversation/request-topics) used for Configured Topics, keeping in mind **new logics that make the rules less strict**!
{% endhint %}

## How Does It Work?

The automatic Topic Generation capability and the Conversation enhancements will be analyzed separately.

### Automatic Topic Generation

Crystal can autonomously generate Topics **using the Entities within the dataset**, either individually or in combination.&#x20;

When you ask about a Topic that has not been configured by the Admin, Crystal leverages the **Entity configuration** **pre-existing in other Configured Topics** to **infer possible combinations** of the Entities.&#x20;

Starting from a single Configured Topic, Crystal can create new Topics based on any combination of Entities, regardless of the Objective and Filters included.

For example:&#x20;

* Consider a Configured Topic with the Main Entity *"Licenses"* and three Filters applied: *"country"*, *"region"*, and *"product type"*
* Crystal can create:
  * *"Overtime of Licenses (by day)"*&#x20;
  * *"Comparison of licenses by region and country"*
  * *and other similar results.*&#x20;

<figure><img src="https://2516160394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmAOqTQkYofJrevcpklA7%2Fuploads%2FapyNHeHlyHZ72KWfAEqT%2FScreenshot%202024-04-08%20at%2012.00.14.png?alt=media&#x26;token=67d147da-947f-4c2c-9f08-77c01e6e3ea2" alt=""><figcaption><p>Auto-generated Topic</p></figcaption></figure>

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

Auto-generated Topics will always *look* the same and be made of the same *elements* as the Configured Topics (read more [here](https://docs.igenius.ai/fundamentals/crystal-topics)).&#x20;

The main difference lies in the *generation method*. Configured Topics  can be considered to be *"real"*, as they are created and managed by the Admin. However, Auto-generated Topics are considered as *"virtual"*, as they exist but cannot be created or managed manually.

Moreover, there are differences in the *functionalities* that they currently support, as explained in the following paragraph.
{% endhint %}

#### Rules

* For Crystal to auto-generate a Topic from your question, the Entities in the question must be **present in at least one Configured Topic.**
* The Entities that Crystal can use for Topic generation can be of any type, **including Custom Entities.**
* Auto-generation **does** **not take viewing permissions of Topics** **into account.** Therefore, Crystal will also be able to generate Topics from Configured Topics that you don't have permissions for.
* If you ask for multiple Entities, they can belong indistinctly to the **same Table** or to **different Tables** (in this case, Crystal will automatically join them for you).
* When **Entities with the same name** are detected, the misunderstanding risk is higher. In this case, Crystal will enter [**Disambiguation**](https://docs.igenius.ai/crystal-advisor/talk-to-your-data/conversation/disambiguation) and ask you to choose the correct Table source for the Entity.
* When you ask for an **Objective "Composition"**, Crystal applies the following logics to generate Topics:
  * When comparing two Entities with *different units of measure*, a *Scaled-up Number* will be the default Visualization, containing all the requested measures.
  * When comparing two Entities with *different units of measure with a Breakdown*, a *Scatterplot* will be the default Visualization.
  * In all other cases, a *Bar Chart* will be the default Visualization.
* If an **aggregation** is recognized in a Topic, it will also be used in the Auto-generated Topic. otherwise an aggregation will be established based on the Configured Topic specifications. In particular:
  * If the Entity has been configured by specifying an aggregation, the *first aggregation* on this Entity will be considered.&#x20;
  * If the Entity is not numeric, and has only been configured as a Filter or Categorical Entity, the *distinct count* is used by default.
  * If the Entity is numeric, and is without explicit aggregation, the *sum* is used by default
* The **default Time Range** applied to the Auto-generated Topics will be handled in different ways, based on whether Crystal is able to perform a **Time Entity inference** or not:
  * Usually, Crystal should infer the Time Entity *from at least one Configured Topic.* In this case, the default Time Range applied on the Auto-generated Topic is the same inferred from the Configured Topics.
    * In the case where Crystal finds ambiguities among several Configured Topics, the applied default Time Range is *the* *one configured in the System Settings.*
  * Should Crystal not be able to infer the Time Entity at all, it will be missing on the Topic and therefore *all* [*start-to-date*](#user-content-fn-1)[^1] *records will be extracted and shown* on the Topic. Moreover, you *won't be able to filter this Topic using Time Filters* (but only with Dynamic Filters).
* In the case where Crystal auto-generates an "**Overtime" Topic**, if no Time-Entity Topics have been configured for the specific requested Entity, Crystal will **guess which Time Entity** to use. If this operation fails, you will see a specific error message.
* The **time aggregation for Topics with an Overtime Objective** can only be requested if at least one other Overtime Topic is previously configured for the same Entity. In that case, you can ask the for a time aggregation. However, if not specified, the time aggregation would be *monthly,* by default.
* Auto-generated Topics **only inherit the permissions from the Configured Topic for Entities and Filter Values.** Unlike Configured Topics, Auto-generated Topics don't need assigned Permissions, as they are "virtual" Topics", and therefore cannot be manually managed by the Admin.
* The following **Crystal capabilities** are also **available for Auto-generated Topics:**
  * All the actions available on the Topic Card ([Filter](https://docs.igenius.ai/crystal-advisor/explore-your-data/how-to-use-filters), Set [Anomaly Detection](https://docs.igenius.ai/crystal-advisor/analyze-your-data/alerts/alerts) or [Schedule Topic ](https://docs.igenius.ai/crystal-advisor/analyze-your-data/alerts/alerts-2)Alerts, Save in [Data Stories](https://docs.igenius.ai/crystal-advisor/report-and-discuss-your-data/data-storytelling), [Share](https://docs.igenius.ai/crystal-advisor/report-and-discuss-your-data/share-topic), [Download](https://docs.igenius.ai/crystal-advisor/report-and-discuss-your-data/export-topic), [Ask again](https://docs.igenius.ai/crystal-advisor/explore-your-data/ask-topics), [Forecast](https://docs.igenius.ai/crystal-advisor/analyze-your-data/forecasting), Expand)
  * [Context Memory](https://docs.igenius.ai/crystal-advisor/talk-to-your-data/conversation/request-topics/context-memory)
  * [Automated Insights](https://docs.igenius.ai/crystal-advisor/analyze-your-data/automated-insights)

#### Limitations

* If the requested Entities are **not** **present in at least one Configured Topic**, Crystal cannot generate new Topics.
* When you ask for **Entities coming from different Tables**, you can involve up to **40 Tables** from the chosen Data Source, as this is the current limit for Table configuration on Crystal.
* If the requested Entities are spread across **multiple Data Sources**, they cannot be used to generate a new Topic.
* When the Entities used for Topic generation are **Custom Entities**, keep the following limitations in mind:
  * If a Custom Entity is defined by Columns from Table A, you can request Virtual Topics with Entities different from A *only if there are Configured Topics* [*that have the necessary joins*](#user-content-fn-2)[^2]
  * If the Custom Entity is defined by Columns from both Tables A and B, you can request Virtual Topics with Entities from both A and B.
* Topic types such as **Description** or **Comparison - Single column pos. neg.** cannot be auto-generated.
* When asking about a Topic of **List** type, the auto-generated **Table** Visualization will contain *as many Columns as the Entities specified in the question.* This means that if only one Entity is specified, the table will have only one Column, but if you specify all the Entities, you'll get more Columns.&#x20;
  * For example: "*Show me a list of customer IDs"* and "*Show me a list of customer IDs and relative names and ages".*
* When asking for a Topic of **Ranking** type, you need to specify the Entity order in which you want your result.&#x20;
  * For example: *"Show me the ranking of sales agents by closed contracts"*
* Auto-generated Topics **won’t be involved in other Crystal capabilities** related to Topics, which will be *available for Configured Topics only*:
  * [Topics Overview](https://docs.igenius.ai/crystal-advisor/explore-your-data/dashboard)
  * [Topic Suggestions](https://docs.igenius.ai/crystal-advisor/explore-your-data/suggestions)
  * [Autocomplete](https://docs.igenius.ai/crystal-advisor/talk-to-your-data/conversation/request-topics/autocomplete)
  * [Insight Analysis](https://docs.igenius.ai/crystal-advisor/analyze-your-data/insight-analysis)
  * [Alerts setting via conversation](https://docs.igenius.ai/crystal-advisor/analyze-your-data/alerts), for both Anomaly Detection and Threshold Monitoring (but you can set an Anomaly Detection via Topic Card instead).

### Enhanced Conversation Rules

Crystal can now infer a Topic Objective, even when the question is not explicitly written out.&#x20;

{% hint style="success" %} <mark style="color:green;">**Examples**</mark>

* You can simply ask *"Sales by Country"* and Crystal will directly return a **Breakdown** Visualization, inferring a **Composition** Objective.&#x20;
* You can simply ask *"Total of Sales"* and Crystal will directly return a **Scaled-up Number** Visualization, inferring the **Highlight** Objective.&#x20;
  {% endhint %}

<figure><img src="https://2516160394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmAOqTQkYofJrevcpklA7%2Fuploads%2F9bqsbBQZUSDaNWEFTNqr%2FScreenshot%202024-04-08%20at%2012.01.03.png?alt=media&#x26;token=c33eefe2-4b6c-4292-bbc2-fa037a1b08e5" alt=""><figcaption><p>Objective Inference</p></figcaption></figure>

#### Rules & Limitations

* At present, this capability is only available for two Objectives: **Composition** and **Highlight.**
* *For all the other cases*, **you still need to** **specify your Objective** to obtain the corresponding Visualization
* *When the Objective is not specified*, Crystal will assume that you are asking for a Composition. Therefore, by default you'll receive a **Breakdown by default** (if the underlying data allows it).

Keep talking to your data!

***

[^1]: what does this mean?

[^2]: what?&#x20;
