Legacy documentation — AI Fusion 1.x / 2.x. This article describes AI Fusion versions 1.x and 2.x. For AI Fusion 3, see the current GenAI Data Fusion documentation.

Assurance Database Schema Reference

AI Fusion stores observation data in the Assurance database - a relational database that BI tools, reporting systems, and data pipelines can query directly. This article describes the table schemas, their relationships, and provides example queries for common reporting use cases.

The Assurance database holds session-level and aggregate data. Detailed per-turn data (individual messages, tool calls, execution traces) is stored in Fabric LU storage and is accessed via the Fabric AI Fusion REST API, not by direct SQL - this is described separately at the end of this article.

Assurance DB Tables

ACTVSESSION

This is the central table for monitoring, holding one row per conversation session.

Column Type Description
session_id TEXT (PK) Unique session identifier. Join key for all other tables.
creation_date TIMESTAMP When the session was created.
last_modified_date TIMESTAMP Timestamp of the last message in the session.
app_id TEXT AI Fusion application that handled the session (e.g., banking, telecom).
customer_id TEXT Customer identifier (IID - Logical Unit Instance ID). Correlates with CRM records.
chat_summary TEXT LLM-generated summary of the conversation. Populated after RunAnalyze.flow runs.
suggestion TEXT LLM-generated suggested next action or follow-up for this conversation. Currently reserved for future use.
input_tokens INTEGER Total input tokens consumed across all LLM calls in the session.
output_tokens INTEGER Total output tokens generated.
cache_read_tokens INTEGER Tokens served from the LLM provider's prompt cache (lower cost than input tokens).
cache_write_tokens INTEGER Tokens written to the prompt cache.
total_tokens INTEGER Sum of all token types for the session.
conversation_pairs INTEGER Number of user–assistant turn pairs.
avg_response_time INTEGER Average assistant response time across all turns, in milliseconds.
feedback TEXT Aggregated feedback indicator for the session.
submitted_by TEXT User or system identity that initiated the session.
snap_mode TEXT Data snapshot mode: none, all, first, or first+last.
status TEXT OPEN (active or pending analysis) / CLOSED (analyzed) / FAILED.

Notes:

  • chat_summary, suggestion, and the *_tokens aggregates are populated only after RunAnalyze.flow or runBatchChatAnalyzePipeline.flow has processed the session. Unanalyzed sessions have status = 'OPEN' and NULL values for these columns.
  • customer_id maps to the IID of the relevant Logical Unit (e.g., the Customer LU).

INSIGHTS

Contains one row per insight tag per session. Each analyzed session produces multiple rows, one for each signal the LLM extracted.

Column Type Description
session_id TEXT Foreign key → ACTVSESSION.session_id.
tag_name TEXT The signal category name.
tag_value TEXT The value classified for this signal.

Default signals (defined in the chat_signals.csv MTable, configurable per deployment):

tag_name tag_value options
Sentiment Satisfaction, Frustration, Neutral, Urgency, Happiness, Anger, Concern, Appreciation, Discontent, Disappointment
Resolution Status Resolved, Pending, Escalated
Topic Billing Inquiry, Account Update, Technical Support, Product Information, Complaint, Service Request, Fraud Report, Payment Issue, Contract Renewal, General Inquiry, Feedback, Escalation Request, Other
Urgency Level Low, Medium, High
Follow-up Required, Immediate
Complaint Severity Low, Medium, High
Customer Lifetime Value Risk Low, Medium, High
Upsell Opportunity Low, Medium, High
Consistency Low, Medium, High
Resolution Pathway conversation_started, issue_understood, topic_classified, solution_offered, problem_solved, satisfaction_expressed, natural_closure (and others)

Note: Since tag_name / tag_value is a key-value structure, pivot queries are needed to produce wide-format rows for BI tools. See the example queries below.

INVOKE_OBSERVATION

Telemetry for every LLM AI invocation. Use this table for performance profiling and LLM cost attribution at the flow level.

Column Type Description
flow TEXT Name of the Broadway flow executed.
actor TEXT Name of the actor within the flow.
interface TEXT LLM interface or service used (e.g., gpt4, claude).
timestamp TIMESTAMP When the invocation occurred.
duration INTEGER Execution duration in milliseconds.
total_tokens INTEGER Total tokens consumed by this invocation.
input_tokens INTEGER Input tokens.
output_tokens INTEGER Output tokens.
cache_read_tokens INTEGER Cache read tokens.
cache_write_tokens INTEGER Cache write tokens.
status TEXT IN_PROGRESS, DONE, or ERROR.

Note: This table mentions Broadway flow and actor names. Naming under agents and tools exist in the AIFusion LU tables.

MODEL_TOKEN_USAGE

Aggregation of token consumption, grouped by LLM interface and model. Updated continuously. Use for cost reporting and model usage trend dashboards.

Column Type Description
interface TEXT (PK) LLM interface name (e.g., gpt4, claude-sonnet).
model TEXT (PK) Model identifier returned by the provider.
total_tokens INTEGER Cumulative total tokens since deployment.
input_tokens INTEGER Cumulative input tokens.
output_tokens INTEGER Cumulative output tokens.
cache_read_tokens INTEGER Cumulative cache read tokens.
cache_write_tokens INTEGER Cumulative cache write tokens.
last_update TIMESTAMP When this row was last updated.

Table Relationships

ACTVSESSION (session_id)
    └── INSIGHTS (session_id)         - LLM-assigned tags, one row per tag per session

INVOKE_OBSERVATION                    - per-invocation telemetry (correlate via timestamp)
MODEL_TOKEN_USAGE                     - cumulative totals by interface + model

Example Queries

The following queries target the Assurance DB and are compatible with both SQLite and PostgreSQL unless noted.

More examples can be found in the Observation Dashboard default widgets queries.

Daily resolution rate (last 30 days)

SELECT
    DATE(a.creation_date)        AS day,
    COUNT(DISTINCT a.session_id) AS total_sessions,
    COUNT(DISTINCT CASE WHEN i.tag_value = 'Resolved'
          THEN a.session_id END) AS resolved,
    ROUND(
        100.0
        * COUNT(DISTINCT CASE WHEN i.tag_value = 'Resolved' THEN a.session_id END)
        / NULLIF(COUNT(DISTINCT a.session_id), 0)
    , 1)                         AS resolution_rate_pct
FROM ACTVSESSION a
LEFT JOIN INSIGHTS i
       ON a.session_id = i.session_id
      AND i.tag_name   = 'Resolution Status'
WHERE a.creation_date >= DATE('now', '-30 days')
  AND a.status         = 'CLOSED'
GROUP BY DATE(a.creation_date)
ORDER BY day;

Sentiment breakdown by application

SELECT
    a.app_id,
    i.tag_value   AS sentiment,
    COUNT(*)      AS session_count
FROM ACTVSESSION a
JOIN INSIGHTS i
  ON a.session_id = i.session_id
 AND i.tag_name   = 'Sentiment'
WHERE a.status = 'CLOSED'
GROUP BY a.app_id, i.tag_value
ORDER BY a.app_id, session_count DESC;

Session detail with key signals (pivot)

Produces one row per session with the most-used tags as columns.

SELECT
    a.session_id,
    a.app_id,
    a.customer_id,
    a.creation_date,
    a.conversation_pairs,
    a.avg_response_time,
    a.total_tokens,
    a.submitted_by,
    MAX(CASE WHEN i.tag_name = 'Sentiment'                     THEN i.tag_value END) AS sentiment,
    MAX(CASE WHEN i.tag_name = 'Resolution Status'             THEN i.tag_value END) AS resolution_status,
    MAX(CASE WHEN i.tag_name = 'Topic'                         THEN i.tag_value END) AS topic,
    MAX(CASE WHEN i.tag_name = 'Urgency Level'                 THEN i.tag_value END) AS urgency_level,
    MAX(CASE WHEN i.tag_name = 'Customer Lifetime Value Risk'  THEN i.tag_value END) AS clv_risk
FROM ACTVSESSION a
LEFT JOIN INSIGHTS i ON a.session_id = i.session_id
WHERE a.status = 'CLOSED'
GROUP BY a.session_id, a.app_id, a.customer_id, a.creation_date,
         a.conversation_pairs, a.avg_response_time, a.total_tokens, a.submitted_by
ORDER BY a.creation_date DESC;

Token cost by model

SELECT
    interface,
    model,
    total_tokens,
    input_tokens,
    output_tokens,
    cache_read_tokens,
    last_update
FROM MODEL_TOKEN_USAGE
ORDER BY total_tokens DESC;

Average response time and token usage by application (last 30 days)

SELECT
    app_id,
    COUNT(session_id)                AS sessions,
    ROUND(AVG(avg_response_time), 0) AS avg_response_ms,
    ROUND(AVG(total_tokens), 0)      AS avg_tokens_per_session,
    SUM(total_tokens)                AS total_tokens
FROM ACTVSESSION
WHERE creation_date >= DATE('now', '-30 days')
  AND status = 'CLOSED'
GROUP BY app_id
ORDER BY total_tokens DESC;

Fabric LU Tables

The following tables are stored inside the Fabric LU - one LUI per session (not accessible via direct SQL).

Table Key columns What it contains
STEP step_id, user, assistant, duration, time_to_first_token Each user–assistant turn: raw question text, response text, latency
MESSAGES message_id, execution_id, role, content, tool_calls Full message sequence including tool-role messages; used to reconstruct the exact LLM context sent to the model
EXECUTIONS execution_id, step_id, name, status, duration The modules executions per turn, like agents and tools names
TOOL_CALLS tool_call_id, function, arguments, response, duration Individual tool/function invocations with inputs, outputs, and latency
USAGE execution_id, interface, input_tokens, output_tokens Token usage attributed to each LLM invocation within a turn
FEEDBACK step_id, reaction, note, submitted_by User ratings and free-text notes per turn

Legacy documentation — AI Fusion 1.x / 2.x. This article describes AI Fusion versions 1.x and 2.x. For AI Fusion 3, see the current GenAI Data Fusion documentation.

Assurance Database Schema Reference

AI Fusion stores observation data in the Assurance database - a relational database that BI tools, reporting systems, and data pipelines can query directly. This article describes the table schemas, their relationships, and provides example queries for common reporting use cases.

The Assurance database holds session-level and aggregate data. Detailed per-turn data (individual messages, tool calls, execution traces) is stored in Fabric LU storage and is accessed via the Fabric AI Fusion REST API, not by direct SQL - this is described separately at the end of this article.

Assurance DB Tables

ACTVSESSION

This is the central table for monitoring, holding one row per conversation session.

Column Type Description
session_id TEXT (PK) Unique session identifier. Join key for all other tables.
creation_date TIMESTAMP When the session was created.
last_modified_date TIMESTAMP Timestamp of the last message in the session.
app_id TEXT AI Fusion application that handled the session (e.g., banking, telecom).
customer_id TEXT Customer identifier (IID - Logical Unit Instance ID). Correlates with CRM records.
chat_summary TEXT LLM-generated summary of the conversation. Populated after RunAnalyze.flow runs.
suggestion TEXT LLM-generated suggested next action or follow-up for this conversation. Currently reserved for future use.
input_tokens INTEGER Total input tokens consumed across all LLM calls in the session.
output_tokens INTEGER Total output tokens generated.
cache_read_tokens INTEGER Tokens served from the LLM provider's prompt cache (lower cost than input tokens).
cache_write_tokens INTEGER Tokens written to the prompt cache.
total_tokens INTEGER Sum of all token types for the session.
conversation_pairs INTEGER Number of user–assistant turn pairs.
avg_response_time INTEGER Average assistant response time across all turns, in milliseconds.
feedback TEXT Aggregated feedback indicator for the session.
submitted_by TEXT User or system identity that initiated the session.
snap_mode TEXT Data snapshot mode: none, all, first, or first+last.
status TEXT OPEN (active or pending analysis) / CLOSED (analyzed) / FAILED.

Notes:

  • chat_summary, suggestion, and the *_tokens aggregates are populated only after RunAnalyze.flow or runBatchChatAnalyzePipeline.flow has processed the session. Unanalyzed sessions have status = 'OPEN' and NULL values for these columns.
  • customer_id maps to the IID of the relevant Logical Unit (e.g., the Customer LU).

INSIGHTS

Contains one row per insight tag per session. Each analyzed session produces multiple rows, one for each signal the LLM extracted.

Column Type Description
session_id TEXT Foreign key → ACTVSESSION.session_id.
tag_name TEXT The signal category name.
tag_value TEXT The value classified for this signal.

Default signals (defined in the chat_signals.csv MTable, configurable per deployment):

tag_name tag_value options
Sentiment Satisfaction, Frustration, Neutral, Urgency, Happiness, Anger, Concern, Appreciation, Discontent, Disappointment
Resolution Status Resolved, Pending, Escalated
Topic Billing Inquiry, Account Update, Technical Support, Product Information, Complaint, Service Request, Fraud Report, Payment Issue, Contract Renewal, General Inquiry, Feedback, Escalation Request, Other
Urgency Level Low, Medium, High
Follow-up Required, Immediate
Complaint Severity Low, Medium, High
Customer Lifetime Value Risk Low, Medium, High
Upsell Opportunity Low, Medium, High
Consistency Low, Medium, High
Resolution Pathway conversation_started, issue_understood, topic_classified, solution_offered, problem_solved, satisfaction_expressed, natural_closure (and others)

Note: Since tag_name / tag_value is a key-value structure, pivot queries are needed to produce wide-format rows for BI tools. See the example queries below.

INVOKE_OBSERVATION

Telemetry for every LLM AI invocation. Use this table for performance profiling and LLM cost attribution at the flow level.

Column Type Description
flow TEXT Name of the Broadway flow executed.
actor TEXT Name of the actor within the flow.
interface TEXT LLM interface or service used (e.g., gpt4, claude).
timestamp TIMESTAMP When the invocation occurred.
duration INTEGER Execution duration in milliseconds.
total_tokens INTEGER Total tokens consumed by this invocation.
input_tokens INTEGER Input tokens.
output_tokens INTEGER Output tokens.
cache_read_tokens INTEGER Cache read tokens.
cache_write_tokens INTEGER Cache write tokens.
status TEXT IN_PROGRESS, DONE, or ERROR.

Note: This table mentions Broadway flow and actor names. Naming under agents and tools exist in the AIFusion LU tables.

MODEL_TOKEN_USAGE

Aggregation of token consumption, grouped by LLM interface and model. Updated continuously. Use for cost reporting and model usage trend dashboards.

Column Type Description
interface TEXT (PK) LLM interface name (e.g., gpt4, claude-sonnet).
model TEXT (PK) Model identifier returned by the provider.
total_tokens INTEGER Cumulative total tokens since deployment.
input_tokens INTEGER Cumulative input tokens.
output_tokens INTEGER Cumulative output tokens.
cache_read_tokens INTEGER Cumulative cache read tokens.
cache_write_tokens INTEGER Cumulative cache write tokens.
last_update TIMESTAMP When this row was last updated.

Table Relationships

ACTVSESSION (session_id)
    └── INSIGHTS (session_id)         - LLM-assigned tags, one row per tag per session

INVOKE_OBSERVATION                    - per-invocation telemetry (correlate via timestamp)
MODEL_TOKEN_USAGE                     - cumulative totals by interface + model

Example Queries

The following queries target the Assurance DB and are compatible with both SQLite and PostgreSQL unless noted.

More examples can be found in the Observation Dashboard default widgets queries.

Daily resolution rate (last 30 days)

SELECT
    DATE(a.creation_date)        AS day,
    COUNT(DISTINCT a.session_id) AS total_sessions,
    COUNT(DISTINCT CASE WHEN i.tag_value = 'Resolved'
          THEN a.session_id END) AS resolved,
    ROUND(
        100.0
        * COUNT(DISTINCT CASE WHEN i.tag_value = 'Resolved' THEN a.session_id END)
        / NULLIF(COUNT(DISTINCT a.session_id), 0)
    , 1)                         AS resolution_rate_pct
FROM ACTVSESSION a
LEFT JOIN INSIGHTS i
       ON a.session_id = i.session_id
      AND i.tag_name   = 'Resolution Status'
WHERE a.creation_date >= DATE('now', '-30 days')
  AND a.status         = 'CLOSED'
GROUP BY DATE(a.creation_date)
ORDER BY day;

Sentiment breakdown by application

SELECT
    a.app_id,
    i.tag_value   AS sentiment,
    COUNT(*)      AS session_count
FROM ACTVSESSION a
JOIN INSIGHTS i
  ON a.session_id = i.session_id
 AND i.tag_name   = 'Sentiment'
WHERE a.status = 'CLOSED'
GROUP BY a.app_id, i.tag_value
ORDER BY a.app_id, session_count DESC;

Session detail with key signals (pivot)

Produces one row per session with the most-used tags as columns.

SELECT
    a.session_id,
    a.app_id,
    a.customer_id,
    a.creation_date,
    a.conversation_pairs,
    a.avg_response_time,
    a.total_tokens,
    a.submitted_by,
    MAX(CASE WHEN i.tag_name = 'Sentiment'                     THEN i.tag_value END) AS sentiment,
    MAX(CASE WHEN i.tag_name = 'Resolution Status'             THEN i.tag_value END) AS resolution_status,
    MAX(CASE WHEN i.tag_name = 'Topic'                         THEN i.tag_value END) AS topic,
    MAX(CASE WHEN i.tag_name = 'Urgency Level'                 THEN i.tag_value END) AS urgency_level,
    MAX(CASE WHEN i.tag_name = 'Customer Lifetime Value Risk'  THEN i.tag_value END) AS clv_risk
FROM ACTVSESSION a
LEFT JOIN INSIGHTS i ON a.session_id = i.session_id
WHERE a.status = 'CLOSED'
GROUP BY a.session_id, a.app_id, a.customer_id, a.creation_date,
         a.conversation_pairs, a.avg_response_time, a.total_tokens, a.submitted_by
ORDER BY a.creation_date DESC;

Token cost by model

SELECT
    interface,
    model,
    total_tokens,
    input_tokens,
    output_tokens,
    cache_read_tokens,
    last_update
FROM MODEL_TOKEN_USAGE
ORDER BY total_tokens DESC;

Average response time and token usage by application (last 30 days)

SELECT
    app_id,
    COUNT(session_id)                AS sessions,
    ROUND(AVG(avg_response_time), 0) AS avg_response_ms,
    ROUND(AVG(total_tokens), 0)      AS avg_tokens_per_session,
    SUM(total_tokens)                AS total_tokens
FROM ACTVSESSION
WHERE creation_date >= DATE('now', '-30 days')
  AND status = 'CLOSED'
GROUP BY app_id
ORDER BY total_tokens DESC;

Fabric LU Tables

The following tables are stored inside the Fabric LU - one LUI per session (not accessible via direct SQL).

Table Key columns What it contains
STEP step_id, user, assistant, duration, time_to_first_token Each user–assistant turn: raw question text, response text, latency
MESSAGES message_id, execution_id, role, content, tool_calls Full message sequence including tool-role messages; used to reconstruct the exact LLM context sent to the model
EXECUTIONS execution_id, step_id, name, status, duration The modules executions per turn, like agents and tools names
TOOL_CALLS tool_call_id, function, arguments, response, duration Individual tool/function invocations with inputs, outputs, and latency
USAGE execution_id, interface, input_tokens, output_tokens Token usage attributed to each LLM invocation within a turn
FEEDBACK step_id, reaction, note, submitted_by User ratings and free-text notes per turn