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.
AI_COUNT_TOKENS には主に次のような機能があります。
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.
コスト最適化のインサイトを取得: 操作を実行する前に正確な入力トークン数を取得し、プロンプトや組織全体で使用する適切なサイズの AI 最適化を支援します。
複雑な構成のサポート: AI ワークフローのトークン全体の影響を理解するため、カスタムラベルを使った分類、説明、タスク定義、例などの高度な機能の影響を分析します。
詳細については、 AI_COUNT_TOKENS をご参照ください。