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 = """
'\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"])
Desirae
2 months agoBurma
2 months agoCassandra
3 months agoLenora
3 months agoNakita
3 months agoParis
3 months agoLynda
3 months agoLili
4 months agoGussie
4 months agoBillye
4 months agoFrancesco
4 months agoMichal
4 months agoValentine
5 months agoMicah
5 months agoRebbecca
8 months agoJanine
8 months agoCecilia
8 months agoLuz
8 months agoCharlette
8 months agoSocorro
8 months agoTruman
8 months agoAmber
8 months agoBuddy
8 months agoTaryn
9 months agoLeila
8 months agoFairy
8 months agoBarb
9 months agoRex
10 months agoTequila
8 months agoFreeman
8 months agoSean
9 months agoLaquita
10 months ago