<< Prev Question Next Question >>

Question 21/27

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 (27q)
Question 1: Which of the following executables in generative Al hub work...
Question 2: What contract type does SAP offer for Al ecosystem partner s...
Question 3: Which of the following steps must be performed to deploy LLM...
Question 4: Which of the following techniques uses a prompt to generate ...
Question 5: What capabilities does the Exploration and Development featu...
Question 6: Which of the following statements accurately describe the RA...
Question 7: What are some benefits of SAP Business Al? Note: There are 3...
Question 8: What are the applications of generative Al that go beyond tr...
Question 9: What are some use cases for fine-tuning of a model? Note: Th...
Question 10: Which neural network architecture is primarily used by LLMs?...
Question 11: Which of the following are features of the SAP AI Foundation...
Question 12: What advantage can you gain by leveraging different models f...
Question 13: What are the benefits of SAP's generative Al hub? Note: Ther...
Question 14: Which statement best describes the Chain-of-Thought (COT) pr...
Question 15: Which of the following are grounding principles included in ...
Question 16: Which of the following must you do before connecting to a da...
Question 17: Why is generative Al gaining significant attention and inves...
Question 18: Which of the following is unique about SAP's approach to Al?...
Question 19: What is the goal of prompt engineering?...
Question 20: What is the primary function of the generative Al hub in SAP...
Question 21: You want to assign urgency and sentiment categories to a lar...
Question 22: What is Machine Learning (ML)?
Question 23: Which of the following are functionalities provided by the g...
Question 24: Which technique is used to supply domain-specific knowledge ...
Question 25: What is the purpose of splitting documents into smaller over...
Question 26: Which of the following capabilities does the generative Al h...
Question 27: Which of the following steps is NOT a requirement to use the...