Black Friday Reward - Upto 75% off - Ends in 0d 00h 00m 00s - Coupon code: CFsave75

Snowflake SnowPro Specialty: Gen AI Exam GES-C02 Question # 10 Topic 2 Discussion

Snowflake SnowPro Specialty: Gen AI Exam GES-C02 Question # 10 Topic 2 Discussion

GES-C02 Exam Topic 2 Question 10 Discussion:
Question #: 10
Topic #: 2

A Gen AI Specialist is writing a Python script that leverages Snowflake Cortex to answer users' questions. The script contains this code:

Python

from snowflake.cortex import CompleteOptions, complete

user_question = < 'Prompt that could generate an unsafe response' >

Regardless of the content of the prompt (user_question) that is passed to snowflake.cortex.complete, the Specialist must ensure that the function filters potentially unsafe or harmful response language.

Which code will accomplish this?

Python


A.

response = complete(

'llama3.1-70b',

[dict(role='user', content=user_question)],

options=CompleteOptions(temperature=1),

)


B.

response = complete(

'llama3.1-70b',

[dict(role='user', content=user_question)],

stream=False,

)


C.

response = complete(

'llama3.1-70b',

[dict(role='user', content=user_question)],

options=CompleteOptions(guardrails=True),

)


D.

response = complete(

'llama3.1-70b',

[dict(role='user', content=user_question)],

options=CompleteOptions(response_format='safe'),

)


Get Premium GES-C02 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.