Skip to content
Lucas Lessa
Voltar para as notícias
SnowflakePublic PreviewImpacto: Médio

Evaluate data and text using Snowflake Decision in AI_COMPLETE

Snowflake Decision evaluates text and structured data against custom questions using the AI_COMPLETE function.

O que mudou

Use cases

Imagine you have a table of support tickets and need to classify the responsible department, score customer frustration, and check urgency in a single SQL query. With the snowflake-decision model accessed via AI_COMPLETE, you can:

  • Choose an option from a fixed set with probabilities and confidence levels.
  • Evaluate content against an ordered rubric to return a weighted score.
  • Get true-or-false assessments for specific statements.
  • Combine multiple evaluations in the same request.

How to use

The AI_COMPLETE function uses the snowflake-decision model to process text inputs or structured data in SQL statements.

SELECT AI_COMPLETE(
  'snowflake-decision',
  {
    'input': 'The customer is extremely frustrated and the payment failed.',
    'questions': [
      {
        'type': 'choice',
        'name': 'department',
        'options': ['finance', 'support', 'sales']
      }
    ]
  }
);

What happens in this code:

  1. The AI_COMPLETE function receives the snowflake-decision model identifier.
  2. The input dictionary defines the text to analyze and the list of structured questions.
  3. The selected question type (choice) picks the best option from the provided fixed set.
  4. The query returns the chosen option along with probabilities and the confidence score for application logic.

Limitations and requirements

  • This feature is in Private Preview.
  • Users must use a role that has been granted the SNOWFLAKE.CORTEX_USER database role.
Ver nota oficial do Snowflake

Snowflake Decision with AI_COMPLETE (Private Preview)

Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.

Relacionadas