Skip to main content

Metrics

The Metrics Dashboard allows you to transform sentence-level labels from ZQ Classify into document-level metrics. By building custom formulas, you can quantify financial trends directly within your Snowflake environment.

All metrics are calculated and grouped by DOCUMENT_ID, aggregating the specific labels assigned to sentences within those documents.


Metrics Dashboard

Metrics Dashboard

The dashboard provides a centralized view to monitor existing documents and previously calculated metrics.


Workflow

To generate a new metric, follow these three steps:

  1. Identify Topics: Review available relevancy and classification labels.
  2. Add Filters (Optional): Narrow the dataset to specific subsets.
  3. Build Formula: Define the mathematical relationship to save the metric.

Step 1: Available Topics

The system automatically detects data from your PIPELINE_LABELS table:

Topics Selection
  • Relevancy Topics: Topics providing binary RELEVANT or IRRELEVANT labels.
  • Classification Topics: Topics providing structured, custom labels (e.g., HAWKISH, DOVISH).

Step 2: Add Filter Conditions (Optional)

Filters restrict which sentences are included in the metric calculation.

Use filters when you want the metric to apply only to a specific subset of labeled data.

Filters

Each filter condition includes:

  • Topic
  • Label

When adding multiple filters, you can combine them using logical operators:

  • AND → Both conditions must be satisfied
  • OR → At least one condition must be satisfied

Examples

Single filter

INFLATION = RELEVANT

Multiple filters using AND

INFLATION = RELEVANT AND POLICY = HAWKISH

Multiple filters using OR

INFLATION = RELEVANT OR GROWTH = NEGATIVE

If no filters are added, the metric is calculated across all labeled sentences.


Step 3: Create Metrics Formula

Define how the metric value is calculated.

Formula Builder

A metric consists of:

Numerator Terms

Each term includes:

  • Coefficient
  • Topic
  • Label

Example:

1.0 × (INFLATION = RELEVANT)

Denominator Terms

Denominator terms define the total base used for normalization.

Example:

(INFLATION = RELEVANT) + (INFLATION = IRRELEVANT)

Example Metric

(RELEVANT) / (RELEVANT + IRRELEVANT)

This produces a relevancy ratio per DOCUMENT_ID.


Preview (Formula + SQL)

Review your logic before execution.

Formula Preview
  • Formula Preview: Displays the mathematical structure of your metric.
  • SQL Preview: Shows the raw Snowflake SQL generated, highlighting the GROUP BY DOCUMENT_ID logic.

Results & Storage

Metric Results
  • Automatic Storage: Calculated metrics are saved directly into your configured Snowflake metrics table.
  • CSV Download: Results are instantly available for download as a CSV file for external analysis.
  • Overwriting: Creating a metric with an existing name will overwrite the previous calculations.
  • Zero Denominators: If a document has no matching sentences for the denominator, the value defaults to 1.0 to prevent calculation errors.

Troubleshooting

  • No topics visible → Ensure ZQ Classify completed successfully

  • Metric creation fails → Check formula structure

  • Permission errors → Verify Data Access Grants

  • Unexpected values → Review labels and filters

  • No output generated → Confirm pipeline data exists

  • Download not working → Refresh and recreate metric


Next Steps

  1. ZQ Classify - Run a new analysis to generate more topics for your metrics.
  2. Telemetry - Monitor metric calculation logs and execution status.
  3. Data Configuration - Update your target database or metrics table mapping.