Snowflake Cortex Complete Query for a single response with a system prompt
InfoGeneratePackages
This example illustrates the use of a system prompt to provide a sentiment analysis of movie reviews. The prompt argument here is an array of objects, each having an appropriate role value.
SELECT SNOWFLAKE.CORTEX.COMPLETE(
'llama2-70b-chat',
[
{'role': 'system', 'content': 'You are a helpful AI assistant. Analyze the movie review text and determine the overall sentiment. Answer with just \"Positive\", \"Negative\", or \"Neutral\"' },
{'role': 'user', 'content': 'this was really good'}
], {}
) as response;
Try a prompt