Analyzing the JSON telemetry reported in the `usage` metadata block reveals the exact configuration options passed to `SNOWFLAKE.CORTEX.COMPLETE`:
1. **`guardrails` parameter:** The usage block explicitly reports a non-zero metric for `"guardrails_tokens": 565`. Cortex Guard meters tokens only when the safety filter is actively engaged; if guardrails were disabled (`false`), this attribute would either be omitted or set to 0. Therefore, `'guardrails': true` was configured.
2. **`max_tokens` parameter:** The model successfully generated `"completion_tokens": 580`. The `max_tokens` parameter establishes a strict ceiling on the number of output completion tokens an LLM can produce. If `max_tokens` had been set to 512, generation would have been truncated at or before 512 tokens. Because the completion reached 580 tokens, `max_tokens` had to be configured with a higher threshold, specifically 4096.
Together, the presence of active guardrail tokens and a completion token length of 580 confirm that the parameters used were `'max_tokens': 4096` and `'guardrails': true`.
References & Study Guide Topics:
* Snowflake Gen AI Functions: `SNOWFLAKE.CORTEX.COMPLETE` Usage Metadata Analysis
* Telemetry & Cost Accounting: Interpreting `guardrails_tokens` and `completion_tokens`
===============
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit