Sep 26, 2025: AI_COUNT_TOKENS function (Preview)

The Snowflake AI_COUNT_TOKENS function helps you size your AI workloads by calculating the total number of input tokens processed by large language models and task-specific functions, so you can size queries appropriately before hitting model limits and accurately estimate costs based on input token usage.

Les principales fonctionnalités des AI_COUNT_TOKENS comprennent :

  • Count tokens: Calculate the total number of input tokens for any AI Function, including AI_COMPLETE, AI_EMBED, AI_CLASSIFY, and AI_SENTIMENT. AI_COUNT_TOKENS also takes the specific model into account for functions that can use different models.

  • Obtenir des informations d’optimisation des coûts : obtenez un nombre précis de jetons d’entrée avant d’exécuter des opérations, ce qui vous aidera à optimiser les invites et des dépenses d’AI adaptées au sein de votre organisation.

  • Prise en charge des configurations complexes : analysez l’impact des fonctionnalités avancées telles que la classification avec des étiquettes, des descriptions, des définitions de tâches et des exemples personnalisés pour comprendre l’impact total de vos workflows d’AI.

Pour plus d’informations, voir AI_COUNT_TOKENS.