Exam C-AIG-2412 Topic 1 Question 12 Discussion
Actual exam question for SAP's C-AIG-2412 exam
Question #: 12
Topic #: 1
Question #: 12
Topic #: 1
You want to assign urgency and sentiment categories to a large number of customer emails. You want to get a valid json string output for creating custom applications. You decide to develop a prompt for the same using generative Al hub.
What is the main purpose of the following code in this context?
prompt_test = """Your task is to extract and categorize messages. Here are some examples:
{{?technique_examples}}
Use the examples when extract and categorize the following message:
{{?input}}
Extract and return a json with the following keys and values:
- "urgency" as one of {{?urgency}}
- "sentiment" as one of {{?sentiment}}
"categories" list of the best matching support category tags from: {{?categories}} Your complete message should be a valid json string that can be read directly and only contains the keys mentioned in t import random random.seed(42) k = 3 examples random. sample (dev_set, k) example_template = """<example> {example_input} examples
'\n---\n'.join([example_template.format(example_input=example ["message"], example_output=json.dumps (example[ f_test = partial (send_request, prompt=prompt_test, technique_examples examples, **option_lists) response = f_test(input=mail["message"])
What is the main purpose of the following code in this context?
prompt_test = """Your task is to extract and categorize messages. Here are some examples:
{{?technique_examples}}
Use the examples when extract and categorize the following message:
{{?input}}
Extract and return a json with the following keys and values:
- "urgency" as one of {{?urgency}}
- "sentiment" as one of {{?sentiment}}
"categories" list of the best matching support category tags from: {{?categories}} Your complete message should be a valid json string that can be read directly and only contains the keys mentioned in t import random random.seed(42) k = 3 examples random. sample (dev_set, k) example_template = """<example> {example_input} examples
'\n---\n'.join([example_template.format(example_input=example ["message"], example_output=json.dumps (example[ f_test = partial (send_request, prompt=prompt_test, technique_examples examples, **option_lists) response = f_test(input=mail["message"])
Suggested Answer: D Vote an answer
by Gwendolyn at Feb 24, 2025, 11:35 PM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).