Medium severityexecution
Power BI Refresh Error:
LLM_FUNCTION_FAILED
What does this error mean?
A Snowflake Cortex LLM function such as COMPLETE(), SUMMARIZE(), or TRANSLATE() failed to return a result due to a model-side error or an invalid input.
Common causes
- 1The input prompt or text exceeds the model's maximum context window
- 2The selected model is temporarily unavailable in the current Snowflake region
- 3The input contains characters or encoding that the model cannot process
- 4The function was called with an unsupported model name
How to fix it
- 1Step 1: Check the error message for the specific reason — context length exceeded, model unavailable, or invalid argument.
- 2Step 2: If context length exceeded, truncate or chunk the input text: use LEFT(text, 4000) or split into batches.
- 3Step 3: Verify the model name is supported in your region: SELECT SNOWFLAKE.CORTEX.COMPLETE('supported-model', 'test').
- 4Step 4: Add a TRY_CAST or IFF wrapper to handle failures gracefully in batch queries.
- 5Step 5: Check Snowflake status page for regional Cortex AI service disruptions.