이 문서에서는 프롬프트 템플릿을 사용하는 방법을 설명합니다. 프롬프트 템플릿은 교체할 수 있는 변수가 포함된 프롬프트입니다. 프롬프트 템플릿을 사용하면 개별 프롬프트를 여러 개 작성하지 않고도 다양한 프롬프트 형식이 다양한 프롬프트 데이터에서 수행되는 방식을 테스트할 수 있습니다.
예를 들어 다음 프롬프트와 해당 시스템 안내를 고려해 보세요.
시스템 안내: 질문에 간결하게 응답합니다.
프롬프트:
코요테는 산딸기를 먹나요?
독수리는 헤엄칠 수 있나요?
다람쥐는 구멍을 파나요?
해당 프롬프트 템플릿은 다음과 유사합니다.
프롬프트 템플릿: Do {animal_name} {animal_activity}?
변수 대체:
animal_name 대체
animal_activity 대체
코요테
산딸기 먹음
독수리
수영
다람쥐
구멍을 팜
제한사항
시스템 안내는 프롬프트 템플릿에서 교체할 수 있는 변수로 지원되지 않습니다.
프롬프트 템플릿은 멀티모달 프롬프트를 지원하지 않습니다.
프롬프트 템플릿 만들기
프롬프트 템플릿은 교체 가능한 변수를 통해 모든 프롬프트 형식을 정의합니다. 프롬프트 템플릿 변수는 다음 요구사항을 충족해야 합니다.
[[["이해하기 쉬움","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-07-24(UTC)"],[],[],null,["# Use prompt templates\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis document describes how to use prompt templates. A prompt template is a\nprompt that includes replaceable variables. Prompt templates enable you to test\nhow different prompt formats perform with different prompt data, without\nrequiring you to write multiple individual prompts.\n\nFor example, consider the following prompts and their corresponding system\ninstructions:\n\n- **System instructions**: Respond to the question concisely.\n- **Prompts** :\n - Do coyotes eat berries?\n - Do eagles swim?\n - Do squirrels dig holes?\n\nThe corresponding prompt template would be similar to the following:\n\n- **Prompt template** : `Do {animal_name} {animal_activity}?`\n- **Variable replacements**:\n\nLimitations\n-----------\n\n- System instructions are not supported as a replaceable variable in prompt templates.\n- Prompt templates don't support multimodal prompts.\n\nCreate a prompt template\n------------------------\n\nPrompt templates define the format of all of your prompts through replaceable\nvariables. Prompt template variables must meet the following requirements:\n\n- Variables must be wrapped in curly-braces.\n- Variable names must not contain spaces.\n\nUse the following instructions to create a prompt template. \n\n### Console\n\nTo create a prompt template by using Vertex AI Studio in the\nGoogle Cloud console, follow these steps:\n\n1. In the Google Cloud console, go to the **Language** page.\n\n [Go to\n Vertex AI Studio](https://console.cloud.google.com/vertex-ai/generative/language/create/text)\n2. In the **System instructions** field, enter system instructions for the prompt. For example, \"Respond to the question concisely\".\n3. In the **Prompt** field, enter a prompt that includes\n prompt variables. Prompt variables must be wrapped in curly-braces and must\n not contain spaces. For example, `Do {animal_name} {animal_activity}?`.\n\n As you add variables, columns appear in the **Test**\n section. Each column represents the text that you want to replace the\n variables with when you run the prompt.\n4. In the **Test** section, replace the variables with the text that you want to test. For example, enter the following:\n - In the `animal_name` column, enter \"Coyotes\".\n - In the `animal_activity` column, enter \"eat berries\".\n5. Click send **Submit**.\n6. To test how the prompt performs with other variables, adjust the variables, then run the prompt again. For example, enter the following and click **Submit** :\n - In the `animal_name` column, enter \"Eagles\".\n - In the `animal_activity` column, enter \"swim\".\n7. Optional: To view different results, adjust the prompt, model, or parameters, and click **Submit**.\n\n\u003cbr /\u003e\n\nWhat's next\n-----------\n\n- Learn more about [prompting strategies](/vertex-ai/generative-ai/docs/learn/prompts/prompt-design-strategies).\n- Learn about [responsible AI best practices and Vertex AI's safety filters](/vertex-ai/generative-ai/docs/learn/responsible-ai)."]]