Extract the transcript in JSON.
Transcript:
Speaker 1 (Customer): Hi, can I get a cheeseburger and large fries, please?
Speaker 2 (Restaurant employee): Coming right up! Anything else you'd like to add to your order?
Speaker 1: Hmmm, maybe a small orange juice. And could I get the fries with ketchup on the side?
Speaker 2: No problem, one cheeseburger, one large fries with ketchup on the side, and a small
orange juice. That'll be $5.87. Drive through to the next window please.
{
"speakers": [
{
"speaker": "Customer",
"utterances": [
"Hi, can I get a cheeseburger and large fries, please?"
]
},
{
"speaker": "Restaurant Employee",
"utterances": [
"Coming right up! Anything else you'd like to add to your order?"
]
},
{
"speaker": "Customer",
"utterances": [
"Hmm, maybe a small orange juice. And could I get the fries with ketchup on the
side?"
]
},
{
"speaker": "Restaurant Employee",
"utterances": [
"No problem, one cheeseburger, one large fries with ketchup on the side, and a
small orange juice. That'll be $5.87. Drive through to the next window please."
]
}
]
}
Extract the items from this transcript in JSON and separate drinks from food.
Transcript:
Speaker 1 (Customer): Hi, can I get a cheeseburger and large fries, please?
Speaker 2 (Restaurant employee): Coming right up! Anything else you'd like to add to your order?
Speaker 1: Hmmm, maybe a small orange juice. And could I get the fries with ketchup on the side?
Speaker 2: No problem, one cheeseburger, one large fries with ketchup on the side, and a small
orange juice. That'll be $5.87. Drive through to the next window please.
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Give clear and specific instructions\n\nGiving the model instructions on what to do is an effective and efficient way to customize model\nbehavior. Be clear, concise, and direct in the instructions, providing the needed context and\noutlining the desired output. Instructions can be as simple as a list of step-by-step instructions\nor as complex as mapping out a user's experience and mindset.\n\nHow to write effective instructions\n-----------------------------------\n\nEffective instructions apply the following principles:\n\n- Tell the model what to do.\n- Be clear and specific.\n- Specify any constraints or formatting requirements for the output.\n\n### Example\n\nFor example, suppose you own a cheeseburger restaurant and you want to use a model to help you\nlearn about which menu items are the most popular. You want the model to format transcripts of\ncustomer orders in JSON so that you can quickly identify menu items. The following tables\ndemonstrate the different responses the model provides when given generic instructions and specific\ninstructions that follow the instruction principles:\n\nIn the example, generic instructions lead to a response with more JSON fields than what you need to identify the menu items customers are ordering. Improve the instructions by making more specific output constraints, as demonstrated in the following table:\n\nBy applying the instruction principles, this example went from a response that contained too\nmuch data to one that contained exactly the data required for this use case. Instructions that use\nthe instruction princples can help you guide the model to deliver the most helpful response for\nyour use case.\n\nWhat's next\n-----------\n\n- Explore more examples of prompts in the [Prompt gallery](/vertex-ai/generative-ai/docs/prompt-gallery)."]]