<< Prev Question Next Question >>

Question 21/28

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"])

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (28q)
Question 1: How does SAP deal with vulnerability risks created by genera...
Question 2: Which of the following are grounding principles included in ...
Question 3: How does the Al API support SAP AI scenarios? Note: There ar...
Question 4: What are the benefits of SAP's generative Al hub? Note: Ther...
Question 5: What are some benefits of SAP Business Al? Note: There are 3...
Question 6: What must be defined in an executable to train a machine lea...
Question 7: Which of the following techniques uses a prompt to generate ...
Question 8: Which of the following are functionalities provided by the g...
Question 9: What are some metrics to evaluate the effectiveness of a Ret...
Question 10: Which of the following must you do before connecting to a da...
Question 11: What is the goal of prompt engineering?...
Question 12: What contract type does SAP offer for Al ecosystem partner s...
Question 13: Which neural network architecture is primarily used by LLMs?...
Question 14: What are some benefits of the SAP AI Launchpad? Note: There ...
Question 15: Which of the following is a principle of effective prompt en...
Question 16: What must be defined in an executable to train a machine lea...
Question 17: What are some examples of generative Al technologies? Note: ...
Question 18: Which of the following steps must be performed to deploy LLM...
Question 19: How do resource groups in SAP AI Core improve the management...
Question 20: What is a Large Language Model (LLM)?...
Question 21: You want to assign urgency and sentiment categories to a lar...
Question 22: What are some drivers for the rapid adoption of generative A...
Question 23: What does SAP recommend you do before you start training a m...
Question 24: What are some SAP recommendations to evaluate pricing and ra...
Question 25: Which of the following sequence of steps does SAP recommend ...
Question 26: Which of the following are features of the SAP AI Foundation...
Question 27: What are some metrics to evaluate the effectiveness of a Ret...
Question 28: What are some components of the training pipeline in SAP AI ...