Documentation Index
Fetch the complete documentation index at: https://docs.winningvariant.com/llms.txt
Use this file to discover all available pages before exploring further.
Cortex
Test different models with SQL
This example demonstrates how you can run a SQL query that produces an output from Cortex’sCOMPLETE method, testing different model versions for various customers. Winning Variant is used to determine which model should be used per customer ID. Later, we would tie business KPIs (i.e., revenue, churn, returns, etc) back to each variant to see which model should be deployed.
We have the following declared for this example:
- A 50/50 test between control (
llama3.2-1bmodel) and treatment (claude-3-5-sonnet) - The Winning Variant experiment ID is
cortex-test - The ID of your user in this example is
abc123
ML Models
This following examples demonstrate how you would use Winning Variant to run predictions for a set of customers using two model versions from the Snowflake Model Registry. The experiment has the following definition:- A 50/50 test between control (
v1of our model) and treatment (v2) - Winning Variant experiment ID of
ml-test
customer_test_data in these examples contains the following fields:
customer_id: ID of the customerage: how long the customer has been a customerusage: some arbitrary integer that defines how much the customer has used the product
customer_churn_model has been trained to predict churn given an age and usage for a customer.
The “Python (Simple)” example below uses the Winning Variant Python SDK.