Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -514,23 +514,23 @@ The `Arguments` names (element ID) and data types need to match the elements we

Here is the function to use:
```copy-code
Max(Text(CallVariant("SNOWFLAKE.CORTEX.COMPLETE", "claude-3-5-sonnet", Array({ role: "system", content: [p_persona_data] }, { role: "user", content: [p_prompt_data] }), { temperature: 0 }).choices[0].messages))
Max(Text(CallVariant("SNOWFLAKE.CORTEX.COMPLETE", "claude-4-5-sonnet", Array({ role: "system", content: [p_persona_data] }, { role: "user", content: [p_prompt_data] }), { temperature: 0 }).choices[0].messages))
```

The function will return `Text` to Sigma.

Click `Save`.

### What the formula does
This formula sends a prompt to Claude 3.5 Sonnet using Snowflake Cortex and returns the AI’s text response as a string.
This formula sends a prompt to Claude 4.5 Sonnet using Snowflake Cortex and returns the AI’s text response as a string.

Let's review it in chunks.

**CallVariant(...)**
Invokes the Snowflake Cortex function SNOWFLAKE.CORTEX.COMPLETE to perform a chat-style completion using Claude 3.5 Sonnet.
Invokes the Snowflake Cortex function SNOWFLAKE.CORTEX.COMPLETE to perform a chat-style completion using Claude 4.5 Sonnet.

**Model Parameters:**
- "Claude-3-5-sonnet" = the AI model being used
- "Claude-4-5-sonnet" = the AI model being used

**The Array(...) defines the conversation history:**

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading