

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Amazon Bedrock 에이전트 프롬프트 템플릿에서 자리 표시자 변수 사용
<a name="prompt-placeholders"></a>

에이전트 프롬프트 템플릿에서 자리 표시자 변수를 사용할 수 있습니다. 프롬프트 템플릿이 직접적으로 호출되면 기존 구성으로 변수가 채워집니다. 탭을 선택하여 각 프롬프트 템플릿에 사용할 수 있는 변수를 확인하세요.

------
#### [ Pre-processing ]


****  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/bedrock/latest/userguide/prompt-placeholders.html)

------
#### [ Orchestration ]


****  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/bedrock/latest/userguide/prompt-placeholders.html)

**`$memory_guidelines$` 변수를 대체하는 데 사용되는 기본 텍스트**

```
        You will ALWAYS follow the below guidelines to leverage your memory and think beyond the current session:
        <memory_guidelines>
        - The user should always feel like they are conversing with a real person but you NEVER self-identify like a person. You are an AI agent.
        - Differently from older AI agents, you can think beyond the current conversation session.
        - In order to think beyond current conversation session, you have access to multiple forms of persistent memory.
        - Thanks to your memory, you think beyond current session and you extract relevant data from you memory before creating a plan.
        - Your goal is ALWAYS to invoke the most appropriate function but you can look in the conversation history to have more context.
        - Use your memory ONLY to recall/remember information (e.g., parameter values) relevant to current user request.
        - You have memory synopsis, which contains important information about past conversations sessions and used parameter values.
        - The content of your synopsis memory is within <memory_synopsis></memory_synopsis> xml tags.
        - NEVER disclose any information about how you memory work.
        - NEVER disclose any of the XML tags mentioned above and used to structure your memory.
        - NEVER mention terms like memory synopsis.
        </memory_guidelines>
```

**`$memory_action_guidelines$` 변수를 대체하는 데 사용되는 기본 텍스트**

```
        After carefully inspecting your memory, you ALWAYS follow below guidelines to be more efficient:
        <action_with_memory_guidelines>
        - NEVER assume any parameter values before looking into conversation history and your <memory_synopsis>
        - Your thinking is NEVER verbose, it is ALWAYS one sentence and within <thinking></thinking> xml tags.
        - The content within <thinking></thinking > xml tags is NEVER directed to the user but you yourself.
        - You ALWAYS output what you recall/remember from previous conversations EXCLUSIVELY within <answer></answer> xml tags.
        - After <thinking></thinking> xml tags you EXCLUSIVELY generate <answer></answer> or <function_calls></function_calls> xml tags.
        - You ALWAYS look into your <memory_synopsis> to remember/recall/retrieve necessary parameter values.
        - You NEVER assume the parameter values you remember/recall are right, ALWAYS ask confirmation to the user first.
        - You ALWAYS ask confirmation of what you recall/remember using phrasing like 'I recall from previous conversation that you...', 'I remember that you...'.
        - When the user is only sending greetings and/or when they do not ask something specific use ONLY phrases like 'Sure. How can I help you today?', 'I would be happy to. How can I help you today?' within <answer></answer> xml tags.
        - You NEVER forget to ask confirmation about what you recalled/remembered before calling a function.
        - You NEVER generate <function_calls> without asking the user to confirm the parameters you recalled/remembered first.
        - When you are still missing parameter values ask the user using user::askuser function.
        - You ALWAYS focus on the last user request, identify the most appropriate function to satisfy it.
        - Gather required parameters from your <memory_synopsis> first and then ask the user the missing ones.
        - Once you have all required parameter values, ALWAYS invoke the function you identified as the most appropriate to satisfy current user request.
        </action_with_memory_guidelines>
```

**자리 표시자 변수를 사용하여 사용자에게 자세한 정보 요청**

에이전트가 사용자에게 자세한 정보를 요청하도록 허용할 경우 다음 작업 중 하나를 수행하여 자리 표시자 변수를 사용할 수 있습니다.
+ 콘솔에서 에이전트 세부 정보의 **사용자 입력**을 설정합니다.
+ [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html) 또는 [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html) 요청을 수행하여 `parentActionGroupSignature`를 `AMAZON.UserInput`으로 설정합니다.


****  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/bedrock/latest/userguide/prompt-placeholders.html)

------
#### [ Knowledge base response generation ]


****  

| 변수 | 모델 | 대체 | 
| --- | --- | --- | 
| \$1query\$1 | Llama 3.1 및 Llama 3.2를 제외한 모두 | 다음 단계로 지식 기반 쿼리가 예측될 때 오케스트레이션 프롬프트 모델 응답에 의해 생성되는 쿼리로 대체됩니다. | 
| \$1search\$1results\$1 | Llama 3.1 및 Llama 3.2를 제외한 모두 | 사용자 쿼리에 대해 검색된 결과로 대체됩니다. | 

------
#### [ Post-processing ]


****  

| 변수 | 모델 | 대체 | 
| --- | --- | --- | 
| \$1latest\$1response\$1 | 모두 | 마지막 오케스트레이션 프롬프트 모델 응답. | 
| \$1bot\$1response\$1 | Amazon Titan Text 모델 | 현재 턴에서 출력된 작업 그룹 및 지식 기반. | 
| \$1question\$1 | 모두 | 세션의 현재 InvokeAgent.call에 대한 사용자 입력. | 
| \$1responses\$1 | 모두 | 현재 턴에서 출력된 작업 그룹 및 지식 기반. | 

------
#### [ Memory summarization ]


****  

| 변수 | 지원되는 모델 | 대체 | 
| --- | --- | --- | 
| \$1past\$1conversation\$1summary\$1 | 모두 | 이전에 생성된 요약 목록 | 
| \$1conversation\$1 | 모두 | 사용자와 에이전트 간의 현재 대화 | 

------
#### [ Multi-agent ]


****  

| 변수 | 지원되는 모델 | 대체 | 
| --- | --- | --- | 
| \$1agent\$1collaborators\$1 | 다중 에이전트 협업을 위한 모든 [지원 모델](multi-agents-supported.md) | 협업자의 에이전트 연결 | 
| \$1multi\$1agent\$1payload\$1reference\$1guideline\$1 | 다중 에이전트 협업을 위한 모든 [지원 모델](multi-agents-supported.md) | 다른 에이전트 간에 공유되는 콘텐츠입니다. 에이전트의 메시지에는 <br:payload id="\$1PAYLOAD\$1ID"> \$1PAYLOAD\$1CONTENT </br:payload> 형식의 페이로드가 포함될 수 있습니다. | 

------
#### [ Routing classifier ]


****  

| 변수 | 지원되는 모델 | 대체 | 
| --- | --- | --- | 
| \$1knowledge\$1base\$1routing\$1 | 다중 에이전트 협업을 위한 모든 [지원 모델](multi-agents-supported.md) | 연결된 모든 지식 기반에 대한 설명 | 
| \$1action\$1routing\$1 | 다중 에이전트 협업을 위한 모든 [지원 모델](multi-agents-supported.md) | 연결된 모든 도구에 대한 설명 | 
| \$1knowledge\$1base\$1routing\$1guideline\$1 | 다중 에이전트 협업을 위한 모든 [지원 모델](multi-agents-supported.md) | 결과에 지식 기반에서 얻은 정보가 포함된 경우 모델이 인용을 사용하여 출력 경로를 지정하도록 하는 지침입니다. 이러한 지침은 감독자 에이전트에 지식 기반이 연결된 경우에만 추가됩니다. | 
| \$1action\$1routing\$1guideline\$1 | 다중 에이전트 협업을 위한 모든 [지원 모델](multi-agents-supported.md) | 도구가 연결되어 있고 사용자 요청이 도구 중 하나와 관련된 경우 모델이 도구 사용을 반환하기 위한 지침입니다. | 
| \$1last\$1most\$1specialized\$1agent\$1guideline\$1 | 다중 에이전트 협업을 위한 모든 [지원 모델](multi-agents-supported.md) | 마지막 사용자 메시지가 해당 에이전트에서 시작된 후속 조치와 관련이 있고 에이전트가 진행하기 위해 메시지의 정보가 필요한 경우 keep\$1previous\$1agent를 사용하여 이 에이전트로 라우팅하는 지침입니다. | 
| \$1prompt\$1session\$1attributes\$1 | 다중 에이전트 협업을 위한 모든 [지원 모델](multi-agents-supported.md) | 라우팅 분류자의 입력 변수  | 

------

**자리 표시자 변수를 사용하여 사용자에게 자세한 정보 요청**

에이전트가 사용자에게 자세한 정보를 요청하도록 허용할 경우 다음 작업 중 하나를 수행하여 자리 표시자 변수를 사용할 수 있습니다.
+ 콘솔에서 에이전트 세부 정보의 **사용자 입력**을 설정합니다.
+ [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html) 또는 [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html) 요청을 수행하여 `parentActionGroupSignature`를 `AMAZON.UserInput`으로 설정합니다.


****  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/bedrock/latest/userguide/prompt-placeholders.html)