> ## Documentation Index
> Fetch the complete documentation index at: https://rasa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics Pipeline: Data Structure Reference

> The data structure is created by the Analytics pipeline and treated as

The data structure is created by the Analytics pipeline and treated as
a public API. The versioning of the API follows the
[Rasa Product Release and Maintenance Policy](https://rasa.com/rasa-product-release-and-maintenance-policy/).
All [Internal Tables](/docs/reference/api/analytics-data-structure-reference#internal-tables) should be considered private and may
change without notice.

## Database Table Overview

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_c42c675a1e3e19b8.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=86610d55aa2bc40334d17c272352776f" alt="An overview of the components of Rasa" width="1605" height="1726" data-path="images/inline/img_c42c675a1e3e19b8.svg" />

## Common Terms

* **a sender** is a user who is talking to the assistant through a channel.
  A user might have multiple senders if they use multiple channels, e.g.
  communicating with the assistant through a website and through a
  channel integrated into a mobile app.
* **a session** is a conversation between a sender and the assistant.
  A session is started when a sender sends a message to the assistant and
  ends when the session either has been timed out or explicitly ended.
  If a session is interrupted by a longer period of inactivity new
  activity will trigger a new session to be created ([configurable
  through the session timeout](/docs/reference/config/domain#session-configuration)).
* **a turn** always starts with a message from a sender and ends right before
  the next message from the sender. A turn can also end with a session
  being timed out or explicitly ended. A turn will usually contain at least
  one bot response.
* **a dialogue stack frame** represents the state of a CALM assistant at a certain point
  in time. The stack frame contains the active flow and step of the assistant. The stack frame
  is created as the assistant advances through flow(s) and is updated with every event
  that is sent to the assistant. The stack frame is stored in the [`rasa_dialogue_stack_frame`](/docs/reference/api/analytics-data-structure-reference#rasa_dialogue_stack_frame)
  table.

## Tables

### rasa\_sender

A sender is a user who interacts with the assistant through a Rasa Channel.
If the assistant supports more than one channel, a user might have multiple
senders. For example, a user might have a sender for the Facebook channel
and a sender for the Slack channel.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_08d258d456502495.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=5ed60646bb1b29e0999462c2b17598ae" alt="rasa_sender table" width="455" height="418" data-path="images/inline/img_08d258d456502495.svg" />

#### `id` sender identifier

The unique identifier of the sender is generated by Analytics. Sender
gets a different, generated id assigned. The `id` differs from the `sender_id`
used by the Rasa channels, the `sender_id` in Rasa is the
`sender_key` in Analytics.

* Type: `varchar(36)`
* Example: `a78783c4-bef7-4e55-9ec7-5afb4420f19a`

#### `sender_key` Rasa channel sender identifier

The unique identifier used by the Rasa channel to identify this sender. The
`sender_key` is specific to the channel implementation in Rasa and
the format depends on the channel.

* Type: `varchar(255)`
* Example: `fb26ba0a9d8b4bd99e2b8716acb19e4b`

#### `channel` Rasa channel name

Name of the channel that is used for this sender. The channel names are
defined in the implementation of the respective Rasa channel.

* Type: `varchar(255)`
* Example: `socket.io`

#### `first_seen` first contact with this sender

The date and time of the first contact with this sender. Corresponds to the
time of the first event of the first session created for this sender.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

#### `last_seen` latest contact with this sender

The date and time of the last contact with this sender. Corresponds to the
time of the latest event of the latest session created for this sender.

* Type: `DateTime`
* Example: `2022-10-28 02:15:49.326936`

***

### rasa\_session

The `rasa_session` table contains information about all conversation
sessions that users started with the assistant. New sessions are created
for every new user and for users who return to the assistant. The
conditions that trigger a new session to start can be
configured in the [Rasa Domain](/docs/reference/config/domain#session-configuration).

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_bc61fcfed0972f1c.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=18dca94db798e13925239e5f12c58f95" alt="rasa_session table" width="886" height="704" data-path="images/inline/img_bc61fcfed0972f1c.svg" />

#### `id` session identifier

The unique identifier of the session. Every session gets a different,
generated id assigned.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `sender_id` sender who started the session

The unique identifier of the sender who started the session. It is a
foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `timestamp` creation date time

The timestamp when the session was created. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

#### `start_sequence_number` start of the session

The sequence number of the first event in this session. All events belong
to exactly one session. The start sequence number is always smaller or equal
to the `end_sequence_number`. The difference between start and end sequence
numbers does not equal the number of events in this session since
sequence numbers are incremented across multiple conversations.

* Type: `Integer`
* Example: `78`

#### `end_sequence_number` end of the session

The sequence number of the last event in the session.

* Type: `Integer`
* Example: `91`

***

### rasa\_turn

The `rasa_turn` table contains information about all conversation
turns. A turn is one interaction between a user and an assistant.
A turn always starts with a user message. It ends with the last event
before the next user message or with the end of a session. A turn
will usually be one user message followed by one or multiple assistant
responses. All events between the user message and the end of the turn
belong to the same turn.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_227d6a60183b930b.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=f827cda629398311b455fb7406ff0eef" alt="rasa_turn table" width="1317" height="704" data-path="images/inline/img_227d6a60183b930b.svg" />

#### `id` session identifier

The unique identifier of the turn. Every turn gets a different
generated id assigned.

* Type: `varchar(36)`
* Example: `ffa5d0cd-f5a6-45a4-9506-ba7ffd76edf1`

#### `sender_id` sender who started the turn

The unique identifier of the sender who started the turn. It is a
foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this turn is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `start_sequence_number` start of the turn

The sequence number of the first event in this turn. All events belong
to exactly one session. The start sequence number is always smaller or equal
to the `end_sequence_number`. The difference between start and end sequence
numbers does not equal the number of events in this session since
sequence numbers are incremented across multiple conversations.

* Type: `Integer`
* Example: `79`

#### `end_sequence_number` end of the turn

The sequence number of the last event in this turn.

* Type: `Integer`
* Example: `82`

***

### rasa\_dialogue\_stack\_frame

The `rasa_dialogue_stack_frame` table contains information about the
active flow identifier and flow step id of the topmost dialogue stack frame.
The CALM assistant adds and removes stack frames to the dialogue stack as it
advances through the flow and across flows. When a new `DialogueStackUpdated`
event is received, the table is updated with the new stack frame information.

The end sequence number of the stack frame record is updated with the
sequence number property of every [rasa event](/docs/reference/api/analytics-data-structure-reference#rasa_event) that is sent by
the assistant after emitting a `DialogueStackUpdated` event. This indicates
that the events taking place after this stack update event are associated with the
saved stack frame record. The end sequence number is no longer updated
when the next `DialogueStackUpdated` event is received.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_7426dfb16e88441a.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=3b6d185ed2097f0ea086bd5606ef8e88" alt="rasa_dialogue_stack_frame table" width="1327" height="812" data-path="images/inline/img_7426dfb16e88441a.svg" />

#### `id` stack frame identifier

The unique identifier of the stack frame. Every stack frame record gets a different
generated id assigned.

#### `sender_id` sender who started the stack frame

The unique identifier of the sender who started the stack frame. It is a
foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this stack frame is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `active_flow_identifier` active flow identifier

The identifier of the active flow in the stack frame. The flow identifier
is the flow id in the flows yaml file. When the assistant is not in a flow,
the active flow identifier is `null`.

* Type: `varchar(255)`
* Example: `book_restaurant`

#### `flow_step_id` step identifier

The identifier of the current step in the stack frame. The step identifier
is the step id in the flows yaml file. When the assistant is not in a flow,
the current step is `null`.

* Type: `varchar(255)`
* Example: `2_ask_amount`

#### `inserted_at` creation timestamp

The timestamp when the stack frame was created. The timestamp is in UTC.
The timestamp corresponds to the first event timestamp in the stack frame.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

#### `start_sequence_number` start of the stack frame

The sequence number of the first event in this stack frame. All events belong
to exactly one session. The start sequence number is always smaller or equal
to the `end_sequence_number`. The difference between start and end sequence
numbers does not equal the number of events in this session since
sequence numbers are incremented across multiple conversations.

* Type: `Integer`
* Example: `79`

#### `end_sequence_number` end of the stack frame

The sequence number of the last event in this stack frame.

* Type: `Integer`
* Example: `82`

***

### rasa\_flow\_status

The `rasa_flow_status` table contains information about the
active flow, status of the flow and flow step id in any given session.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_84760ee9c40c74a9.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=6fccfafc0fee0396ca206122aefe7801" alt="rasa_flow_status table" width="1244" height="776" data-path="images/inline/img_84760ee9c40c74a9.svg" />

#### `id` flow status identifier

The unique identifier of the flow status record. Every flow status record gets a different
generated id assigned.

#### `sender_id` sender who started the flow status

The unique identifier of the sender who started the flow event. It is a
foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this stack frame is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `flow_identifier` flow identifier

The identifier of the active flow in the stack frame. The flow identifier
is the flow id in the flows yaml file.

* Type: `varchar(255)`
* Example: `book_restaurant`

#### `flow_status` flow status

The status of the flow. The flow status can be one of the following:
The flow status can be one of the following:

* `started`: The flow is started and the assistant is in the flow.
* `completed`: The flow is completed and the assistant is not in the flow.
* `interrupted`: The flow is interrupted and the assistant is not in the flow.
* `resumed`: The flow is resumed and the assistant is in the flow.
* `cancelled`: The flow is aborted and the assistant is not in the flow.
* Type: `varchar(255)`
* Example: `started`

#### `step_id` step identifier

The identifier of the current step in the stack frame. The step identifier
is the step id in the flows yaml file.

* Type: `varchar(255)`
* Example: `0_ask_amount`

#### `inserted_at` creation timestamp

The timestamp when the flow status was created. The timestamp is in UTC.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

***

### rasa\_event

The `rasa_event` table contains all events that an assistant created. Events
are created for every user message, bot response, and action that is executed
as well as for a lot of internal changes to a conversation session.
[Overview of all Rasa Events](/docs/reference/integrations/action-server/events).

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_fdc3c9ea0eeacad9.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=77922376ee225f73326eaaa56b95e8f1" alt="rasa_event table" width="1278" height="740" data-path="images/inline/img_fdc3c9ea0eeacad9.svg" />

#### `id` event identifier

The unique identifier of the event. Every event gets different,
generated id assigned.

* Type: `varchar(36)`
* Example: `f5adcd16-b18d-4c5c-95f0-1747b20cb0e6`

#### `sender_id` sender whose conversation the event belongs to

The unique identifier of the sender whose conversation this event is part of.
It is a foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this event is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `timestamp` creation date time

The timestamp when the event was created. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

#### `event_type` kind of event

The type of the event. The event type is a string and can be one of the
following:

* `user`: The user sent a message to the assistant.
* `bot`: The assistant sent a message to the user.
* `action`: The assistant executed an action.
* `session_started`: A new session was started.
* `action_execution_rejected`: An action failed to execute.
* `active_loop`: The assistant is currently in a loop.
* `slot`: A slot was set.
* `followup`: A follow-up action was triggered.
* `loop_interrupted`: A loop was interrupted.
* `pause`: A session is paused, e.g. because the session was handed over
  to a human agent.
* `restart`: A session was restarted. This will trigger a new session to
  be started. The state of the assistant will be reset.
* `rewind`: The assistant rewinds to a previous state.
* `user_featurization`: The assistant featurized the user input.

The event type defines how the event is interpreted and how the event
affects the conversation. For example, the `user` event type will
be interpreted as a user message and the `bot` event type will be
interpreted as a bot response.

* Type: `varchar(255)`
* Example: `action`

#### `model_id` model identifier

The identifier of the Rasa model that was running as part of the assistant
when this event was created.

* Type: `varchar(255)`
* Example: `75a985b7b86d442ca013d61ea4781b22`

#### `environment` name of the assistant environment

The name of the environment of the assistant that created this event.
The environment is a string that is set up during the start of the assistant,

* Type: `varchar(255)`
* Example: `production`

#### `sequence_number` start of the event

The sequence number of the event. The events of a session always have
increasing sequence numbers. Sequence numbers are not guaranteed to be
sequential for events following one another. But sequence numbers can
be used to order the events of a session.

* Type: `Integer`
* Example: `78`

***

### rasa\_bot\_message

A message sent by the assistant to a user will be tracked in the
`rasa_bot_message` table. The table contains information about the
sent message.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_e2b80dcec8690539.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=3d0c649624444955d894875416aac16d" alt="rasa_bot_message table" width="1690" height="884" data-path="images/inline/img_e2b80dcec8690539.svg" />

#### `id` bot message identifier

The unique identifier of the bot message is generated by Analytics.

* Type: `varchar(36)`
* Example: `2f2e5384-1bfa-4b53-90a7-c75e5f20b117`

#### `event_id` id of the event of this message

The unique identifier of the event that created this bot message.
It is a foreign key to the [`rasa_event.id`](/docs/reference/api/analytics-data-structure-reference#rasa_event) column.

* Type: `varchar(36)`
* Example: `f5adcd16-b18d-4c5c-95f0-1747b20cb0e6`

#### `sender_id` sender whose conversation the message belongs to

The unique identifier of the sender whose conversation this message is part of.
It is a foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this message is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `timestamp` creation date time

The timestamp when the message was created. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

#### `template_name` name of the template used to generate the message

The name of the template that Rasa used to generate the bot message. Might
be empty if the message was not generated from a template but a custom
action.

* Type: `varchar(255)`
* Example: `utter_greet`

#### `text` message content

The text of the bot message.

* Type: `varchar(65535)`
* Example: `Ok, what can I help you with?`

#### `model_id` model identifier

The identifier of the Rasa model that was running as part of the assistant
when this message was created.

* Type: `varchar(255)`
* Example: `75a985b7b86d442ca013d61ea4781b22`

#### `sequence_number` start of the event

The sequence number of the message. The events of a session always have
increasing sequence numbers. The sequence number of this message is the same
as the one of the underlying event.

* Type: `Integer`
* Example: `78`

***

### rasa\_user\_message

A message sent by a user to the assistant will be tracked in the
`rasa_user_message` table. The table contains information about the
sent message.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_33dabab44f777554.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=eb2eb4d52413e45b5a59dcb0bc5b69b0" alt="rasa_user_message table" width="1690" height="992" data-path="images/inline/img_33dabab44f777554.svg" />

#### `id` user message identifier

The unique identifier of the user message is generated by Analytics.

* Type: `varchar(36)`
* Example: `49fdd79e-976b-47c2-ab27-a4c3d743a1c9`

#### `event_id` id of the event of this message

The unique identifier of the event that created this user message.
It is a foreign key to the [`rasa_event.id`](/docs/reference/api/analytics-data-structure-reference#rasa_event) column.

* Type: `varchar(36)`
* Example: `f5adcd16-b18d-4c5c-95f0-1747b20cb0e6`

#### `sender_id` sender whose conversation the message belongs to

The unique identifier of the sender whose conversation this message is part of.
It is a foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this message is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `intent` classification of the text

The name of the intent that Rasa classified the text as. One of the intents
in the domain used to train the model.

* Type: `varchar(255)`
* Example: `book_flight`

#### `retrieval_intent` classification of the text

The name of the retrieval intent that Rasa classified the text as. Only
populated if there is a configured retrieval intent.

* Type: `varchar(255)`
* Example: `book_flight/faq`

#### `confidence` certainty the model predicted for classifications

The confidence of the ML model's intent prediction. The confidence is a
value between 0 and 1. The higher the value, the more certain the model is
that the intent is correct.

* Type: `Float`
* Example: `0.8798527419567108`

#### `text` message content

The text of the user message.

* Type: `varchar(65535)`
* Example: `I want to book a flight.`

#### `timestamp` creation date time

The timestamp when the message was created. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

#### `model_id` model identifier

The identifier of the Rasa model that was running as part of the assistant
when this message was created.

* Type: `varchar(255)`
* Example: `75a985b7b86d442ca013d61ea4781b22`

#### `sequence_number` start of the event

The sequence number of the message. The events of a session always have
increasing sequence numbers. The sequence number of this message is the same
as the one of the underlying event.

* Type: `Integer`
* Example: `78`

#### `message_id` unique id for the message text

A unique id that identifies the text of the message.

* Type: `varchar(255)`
* Example: `7cdb5700ac9c493aa46987b77d91c363`

***

### rasa\_llm\_command

Commands sent by [`LLMCommandGenerator`](/docs/reference/config/components/llm-command-generators)
will be tracked in the `rasa_llm_command` table. The table contains information about the
commands issued in response to each user message.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_20b2a68252d50e4a.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=c7ed6d6329c5b68f32d0051f638f525c" alt="rasa_llm_command table" width="1726" height="1100" data-path="images/inline/img_20b2a68252d50e4a.svg" />

#### `id` llm command identifier

The unique identifier of the LLM command is generated by Analytics.

* Type: `varchar(36)`
* Example: `49fdd79e-976b-47c2-ab27-a4c3d743a1c9`

#### `sender_id` sender whose conversation the command belongs to

The unique identifier of the sender whose conversation this command is part of.
It is a foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this command is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `user_message_id` unique id for the user message text

A unique id that identifies the text of the message.
Represents a foreign key to the [`rasa_user_message.message_id`](/docs/reference/api/analytics-data-structure-reference#rasa_user_message) column.

* Type: `varchar(255)`
* Example: `7cdb5700ac9c493aa46987b77d91c363`

#### `command` command name

The name of the [command](/docs/reference/config/components/llm-command-generators#command-reference) issued.

* Type: `varchar(255)`
* Example: `set slot`

#### `inserted_at` creation timestamp

The timestamp when the user message was received. The timestamp is in UTC.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

#### `flow_identifier` flow identifier

The identifier of the active flow in the stack frame. The flow identifier
is the flow id in the flows yaml file. This is only populated for `start flow` commands.

* Type: `varchar(255)`
* Example: `book_restaurant`

#### `set_slot_name` slot name

The name of the slot that was set. This is only populated for `set slot` commands.

* Type: `varchar(255)`
* Example: `restaurant_name`

#### `clarification_options` list of flow identifiers

The list of flow identifiers that the user can choose from. This is only populated for `clarify` commands.

* Type: `varchar(65535)`
* Example: `'["add_contact", "remove_contact"]'`

***

### rasa\_action

An action executed by the assistant. All actions the bot executes are tracked
in the `rasa_action` table. The table contains information about the
executed action and its prediction.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_6269193746877d90.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=639e416371c7bb9a7be4766f263ad759" alt="rasa_action table" width="1670" height="920" data-path="images/inline/img_6269193746877d90.svg" />

#### `id` action identifier

The unique identifier of the action execution is generated by Analytics.

* Type: `varchar(36)`
* Example: `bd074dc7-e745-4db6-86d0-75b0af7bc067`

#### `event_id` id of the event of this action execution

The unique identifier of the event that created this action execution.
It is a foreign key to the [`rasa_event.id`](/docs/reference/api/analytics-data-structure-reference#rasa_event) column.

* Type: `varchar(36)`
* Example: `f5adcd16-b18d-4c5c-95f0-1747b20cb0e6`

#### `sender_id` sender whose conversation triggered this action execution

The unique identifier of the sender whose conversation triggered this action
execution. It is a foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this action execution is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `name` name of the executed action

The name of the action that Rasa has predicted and executed. One of the actions
in the domain used to train the model.

* Type: `varchar(255)`
* Example: `action_book_flight`

#### `confidence` ML models certainty of the predicted action

The confidence of ML model's action prediction. The confidence is a
value between 0 and 1. The higher the value, the more certain the model is
that the action is correct.

* Type: `Float`
* Example: `0.9398527419567108`

#### `policy` name of the policy that predicted the action

The name of the policy that predicted this action. The policy is a component
in the Rasa assistant that makes a prediction. The policy can be a rule
policy, a memoization policy, or an ML policy.

* Type: `varchar(255)`
* Example: `policy_2_TEDPolicy`

#### `timestamp` creation date time

The timestamp when the action was executed. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

#### `model_id` model identifier

The identifier of the Rasa model that was running as part of the assistant
when this action was executed.

* Type: `varchar(255)`
* Example: `75a985b7b86d442ca013d61ea4781b22`

#### `sequence_number` start of the event

The sequence number of the executed action. The events of a session always have
increasing sequence numbers. The sequence number of this executed action is
the same as the one of the underlying event.

* Type: `Integer`
* Example: `78`

***

### rasa\_slot

A slot that has been set for a session. All changes to slot values are tracked
in the `rasa_slot` table. The table contains information about the
change in the value of the slot.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_ed74c40ef936af84.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=bf2b781161d26e307dedacba4720a738" alt="rasa_slot table" width="1690" height="884" data-path="images/inline/img_ed74c40ef936af84.svg" />

#### `id` slot change identifier

The unique identifier of this change in slot values is generated by Analytics.

* Type: `varchar(36)`
* Example: `a793d284-b5b9-4cef-be8a-bc0f58c70c28`

#### `event_id` id of the event that triggered this slot change

The unique identifier of the event that triggered this change
in the slot value. It is a foreign key to
the [`rasa_event.id`](/docs/reference/api/analytics-data-structure-reference#rasa_event) column.

* Type: `varchar(36)`
* Example: `f5adcd16-b18d-4c5c-95f0-1747b20cb0e6`

#### `sender_id` sender whose conversation triggered this slot change

The unique identifier of the sender whose conversation triggered this
slot change. It is a foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this slot change is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `slot_path` path of the slot

A path to the slot that was changed. The path identifies the slot by its
name, the sender and the session. The path is a string that looks like
`<sender_id>/<session_id>/<slot_name>`.

* Type: `varchar(255)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53/63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1/email`

#### `name` name of the slot

The name of the changed slot. The name of the slot is the same
as the name of the slot in the domain.

* Type: `varchar(255)`
* Example: `email`

#### `value` new slot value

The new value of the slot for the session. The value is a dumped
JSON object.

* Type: `varchar(65535)`
* Example: `john@example.com`

#### `timestamp` creation date time

The timestamp when the slot value was changed. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-28 02:15:49.326936`

#### `sequence_number` start of the event

The sequence number of the slot change. The events of a session always have
increasing sequence numbers. The sequence number of the slot change is
the same as the one of the underlying event.

* Type: `Integer`
* Example: `78`

***

### rasa\_session\_slot\_state

The state of a slot at the end of a session. The state of a slot is the
value of the slot at the end of a session. The state of a slot is
stored in the `rasa_session_slot_state` table.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_9caa911fd7d642ea.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=f81d8cd19f0b11be23c4e528914c31a9" alt="rasa_session_slot_state table" width="1244" height="740" data-path="images/inline/img_9caa911fd7d642ea.svg" />

#### `id` path of the slot

A path to the slot. The path identifies the slot by its
name, the sender and the session. The path is a string that looks like
`<sender_id>/<session_id>/<slot_name>`.

* Type: `varchar(255)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53/63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1/email`

#### `sender_id` sender whose conversation this slot is part of

The unique identifier of the sender whose conversation this slot is part of.
It is a foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this slot is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `name` name of the slot

The name of the slot. The name of the slot is the same
as the name of the slot in the domain.

* Type: `varchar(255)`
* Example: `email`

#### `value` last value of the slot in the session

The value of the slot at the end of the session. The value is a dumped
JSON object. If a slot is changed multiple times during a session,
the value is set to the last change.

* Type: `varchar(65535)`
* Example: `john@example.com`

#### `timestamp` creation date time

Time of the last update of the slot in this session. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-21 02:15:49.326936`

### rasa\_pattern

Patterns are marker definitions that have been received from Rasa. This table is called `rasa_pattern`
to distinguish them from extracted markers which are stored in `rasa_marker` table. It
stores the configuration of markers (which can be thought of as a pattern
of conversational events) along with their metadata.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_9252a9e355114809.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=0d62dc76bb8e74a9941df467aabf542b" alt="rasa_pattern table" width="444" height="490" data-path="images/inline/img_9252a9e355114809.svg" />

#### `id` pattern identifier

The unique identifier of the rasa pattern is generated by Analytics.

* Type: `varchar(36)`
* Example: `bd074dc7-e745-4db6-86d0-75b0af7bc067`

#### `name` pattern name

Name of the pattern

* Type: `varchar()`
* Example: `registration success`

#### `description` pattern description

Description of the pattern

* Type: `varchar()`
* Example: `This marker identifies successful account registration in the chat`

#### `config` pattern configuration

Pattern configuration dictionary stored as an escaped string

* Type: `varchar()`
* Example: `"{'or': [{'intent': 'mood_unhappy'},{'intent': 'mood_great'}]}"`

#### `is_active` soft-delete flag

Only patterns with `is_active==True` are processed during real-time analysis

* Type: `boolean`

#### `created_at` creation date time

Time of creation of this pattern. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-21 02:15:49.326936`

#### `updated_at` update date time

Time of the last update of the pattern in this session. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-21 02:15:49.326936`

### rasa\_marker

Extracted markers from the conversations. Each row in this table corresponds
to a marker along with details of the pattern, sender, session and the last event where it was extracted.

<img src="https://mintcdn.com/rasa-43f32701/0i1yzR1bX1buXgH1/images/inline/img_7e649ad5c78c0afc.svg?fit=max&auto=format&n=0i1yzR1bX1buXgH1&q=85&s=3ef653fe0f9973b9bfe8520d7117da46" alt="rasa_marker table" width="2057" height="848" data-path="images/inline/img_7e649ad5c78c0afc.svg" />

#### `id` marker identifier

The unique identifier of the extracted rasa marker is generated by Analytics.

* Type: `varchar(36)`
* Example: `bd074dc7-e745-4db6-86d0-75b0af7bc067`

#### `pattern_id` pattern which was applied in this marker

The unique identifier of the pattern which was applied in this marker. It is
a foreign key to the [`rasa_pattern.id`](/docs/reference/api/analytics-data-structure-reference#rasa_pattern) column

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `sender_id` sender identifier

The unique identifier of the sender whose conversation this marker is part of.
It is a foreign key to the [`rasa_sender.id`](/docs/reference/api/analytics-data-structure-reference#rasa_sender) column.

* Type: `varchar(36)`
* Example: `9e4ebded-f232-4cc5-af78-d98daa0c1a53`

#### `session_id` session identifier

The unique identifier of the session this marker is part of.
It is a foreign key to the [`rasa_session.id`](/docs/reference/api/analytics-data-structure-reference#rasa_session) column.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `event_id` event identifier

The unique identifier of the event from event broker where this marker was applied.
Note that a marker can be applied across multiple events, this is the ID of the last event in the sequence.

* Type: `varchar(36)`
* Example: `63b150a6-21a3-4e6c-bb24-5ab6ddc30cf1`

#### `num_preceding_user_turns` Number of Proeeding User turns

an integer indicating the number of user turns preceding the event at which the marker applied.

* Type: `integer`
* Example: `4`

#### `created_at` creation date time

Time of creation of this marker. The timestamp is a UTC.

* Type: `DateTime`
* Example: `2022-06-21 02:15:49.326936`

## Internal Tables

Internal tables are used to store information about the assistant and
the events that are sent to the assistant. They are not meant to be
queried directly but are required for the functioning of Analytics. They
are a private API that is used by the Analytics service internally
and might change without notice.

Internal tables:

* `_rasa_raw_event`
* `alembic_version`


## Related topics

- [Analytics](/docs/pro/improve/analytics.md)
