수행할 작업에 대한 요청 사항을 모델에 제공하는 것이 모델 동작을 효과적이고 효율적으로 맞춤설정하는 방법입니다. 명확하고 간결하며 직접적으로 안내하면서 필요한 맥락을 제공하고 원하는 출력을 간략히 설명합니다. 안내는 단계별 안내 목록처럼 간단할 수 있거나 사용자 경험과 사고방식을 매핑하는 것만큼 복잡할 수도 있습니다.
효과적인 안내 작성 방법
효과적인 안내는 다음 원칙을 적용합니다.
모델에 수행할 작업을 말합니다.
명확하고 구체적으로 작성합니다.
출력에 대한 제약조건 또는 형식 요구사항을 지정합니다.
예시
예를 들어 치즈버거 레스토랑을 운영하고 있으며 모델을 사용하여 가장 인기 있는 메뉴 항목을 알아보려고 한다고 가정해 보겠습니다. 메뉴 항목을 빠르게 식별할 수 있도록 모델이 고객 주문 스크립트의 형식을 JSON으로 지정하도록 하려면 어떻게 해야 하나요? 다음 표는 일반적인 안내와 안내 원칙을 따르는 구체적인 안내가 주어질 때 모델이 제공하는 다양한 응답을 보여줍니다.
일반적인 안내
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."
]
}
]
}
이 예시에서 일반적인 안내는 고객이 주문하는 메뉴 항목을 식별하는 데 필요한 것보다 더 많은 JSON 필드가 포함된 응답으로 이어집니다. 다음 표와 같이 더 구체적인 출력 제약 조건을 적용하여 안내를 개선하세요.
구체적인 안내
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(UTC)"],[],[],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)."]]