QuestionQ19

Snowflake Gen AI & LLM Functions

A Gen AI Specialist is developing an internal company chatbot that uses Streamlit and Snowflake Cortex Analyst to interpret and answer user queries against Snowflake data.

Team members need to be able to ask a question such as:

Can you provide the sales trend for the last 6 months?

The tool must also be able to answer follow-up questions such as:

Can you break that down by region?

What factors contributed to the dip in February?

To ensure the tool correctly interprets follow-up questions, what must be included in the API request to Cortex Analyst?

  • A The most recent user message
  • B A session token to maintain session state across API requests
  • C The entire conversation history in the messages field of the API request
  • D A Snowflake session parameter to maintain conversation context among the previous API requests
Explanation

Cortex Analyst does not store state between requests. Multi-turn context must be supplied on every request as the complete, chronologically ordered conversation history in the messages field, including prior user messages and Analyst responses.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!