프롬프트 개선하기
피드백을 바탕으로 새롭게 개선된 프롬프트 생성하기
프롬프트 도구 API는 비공개 연구 프리뷰 단계에 있습니다. 비공개 연구 프리뷰 참여 신청하기
시작하기 전에
프롬프트 도구는 프롬프트를 생성하고 개선하기 위한 API 세트입니다. 다른 API들과 달리, 이것은 실험적인 API입니다: 접근 권한을 요청해야 하며, 다른 API들과 같은 수준의 장기 지원을 보장하지 않습니다.
이러한 API들은 Anthropic Workbench에서 사용 가능한 것과 유사하며, 다른 프롬프트 엔지니어링 플랫폼과 플레이그라운드에서 사용하도록 설계되었습니다.
프롬프트 개선 도구 시작하기
프롬프트 생성 API를 사용하기 위해서는 다음이 필요합니다:
- 프롬프트 도구 API의 비공개 연구 프리뷰에 참여하고 있어야 합니다
- SDK가 아닌 API를 직접 사용해야 합니다
- 베타 헤더
prompt-tools-2025-04-02
를 추가해야 합니다
이 API는 SDK에서 사용할 수 없습니다
프롬프트 개선하기
Headers
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like beta1,beta2
or specify the header multiple times for each beta.
Body
The prompt to improve, structured as a list of message
objects.
Each message in the messages
array must:
- Contain only text-only content blocks
- Not include tool calls, images, or prompt caching blocks
As a simple text prompt:
[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Concise recipe for {{food}}"
}
]
}
]
With example interactions to guide improvement:
[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Concise for {{food}}.\n\nexample\mandu: Put the mandu in the air fryer at 380F for 7 minutes."
}
]
}
]
Note that only contiguous user messages with text content are allowed. Assistant prefill is permitted, but other content types will cause validation errors.
Feedback for improving the prompt.
Use this parameter to share specific guidance on what aspects of the prompt should be enhanced or modified.
Example:
{
"messages": [...],
"feedback": "Make the recipes shorter"
}
When not set, the API will improve the prompt using general prompt engineering best practices.
The existing system prompt to incorporate, if any.
{
"system": "You are a professional meal prep chef",
[...]
}
Note that while system prompts typically appear as separate parameters in standard API calls, in the improve_prompt
response, the system content will be incorporated directly into the returned user message.
The model this prompt will be used for. This optional parameter helps us understand which models our prompt tools are being used with, but it doesn't currently affect functionality.
Example:
"claude-3-7-sonnet-20250219"
1 - 256
Response
Contains the result of the prompt improvement process in a list of message
objects.
Includes a user
-role message with the improved prompt text and may optionally include an assistant
-role message with a prefill. These messages follow the standard Messages API format and can be used directly in subsequent API calls.
Currently, the system
field is always returned as an empty string (""). In future iterations, this field may contain generated system prompts.
Directions similar to what would normally be included in a system prompt are included in messages
when improving a prompt.
Usage information
Was this page helpful?