

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# Utilizzare le variabili segnaposto nei modelli di prompt di Agent per Amazon Bedrock
<a name="prompt-placeholders"></a>

Nei modelli di prompt di agenti è possibile utilizzare variabili segnaposto. Quando viene chiamato il modello di prompt, le variabili vengono popolate da configurazioni preesistenti. Selezionare una scheda per visualizzare le variabili utilizzabili per ogni modello di prompt.

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


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

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


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

**Testo predefinito utilizzato per sostituire la variabile `$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>
```

**Testo predefinito utilizzato per sostituire la variabile `$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>
```

**Utilizzo delle variabili segnaposto per chiedere all’utente ulteriori informazioni**

È possibile utilizzare le seguenti variabili segnaposto se si consente all’agente di chiedere ulteriori informazioni all’utente eseguendo una delle seguenti azioni:
+ Nella console, impostare l’**Input utente** nei dettagli dell’agente.
+ Imposta la `parentActionGroupSignature` su `AMAZON.UserInput` con una richiesta [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html) o [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html).


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

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


****  

| Variabile | Modello | Sostituita da | 
| --- | --- | --- | 
| \$1query\$1 | Tutti ad eccezione di Llama 3.1 e Llama 3.2 | La query generata dalla risposta del modello di prompt di orchestrazione quando determina che il passo successivo consiste nell’interrogare la knowledge base. | 
| \$1search\$1results\$1 | Tutti ad eccezione di Llama 3.1 e Llama 3.2 | I risultati recuperati per la query dell’utente. | 

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


****  

| Variabile | Modello | Sostituita da | 
| --- | --- | --- | 
| \$1latest\$1response\$1 | Tutti | L’ultima risposta del modello di prompt di orchestrazione. | 
| \$1bot\$1response\$1 | Modelli Amazon Titan Text | Gli output del gruppo di azioni e della knowledge base nel turno corrente. | 
| \$1question\$1 | Tutti | Input dell’utente per la chiamata InvokeAgent corrente nella sessione. | 
| Risposte | Tutti | Gli output del gruppo di azioni e della knowledge base nel turno corrente. | 

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


****  

| Variabile | Modelli supportati | Sostituita da | 
| --- | --- | --- | 
| \$1past\$1conversation\$1summary\$1 | Tutti | Elenco dei riepiloghi generati in precedenza | 
| \$1conversation\$1 | Tutti | Conversazione attuale tra l’utente e l’agente | 

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


****  

| Variabile | Modelli supportati | Sostituita da | 
| --- | --- | --- | 
| \$1agent\$1collaborators\$1 | Tutti i [modelli supportati](multi-agents-supported.md) per la collaborazione multiagente | Associazioni di agenti dei collaboratori | 
| \$1multi\$1agent\$1payload\$1reference\$1guideline\$1 | Tutti i [modelli supportati](multi-agents-supported.md) per la collaborazione multiagente | Contenuti condivisi tra diversi agenti. Il messaggio di un agente può contenere un payload nel formato: <br:payload id="\$1PAYLOAD\$1ID"> \$1PAYLOAD\$1CONTENT </br:payload>  | 

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


****  

| Variabile | Modelli supportati | Sostituita da | 
| --- | --- | --- | 
| \$1knowledge\$1base\$1routing\$1 | Tutti i [modelli supportati](multi-agents-supported.md) per la collaborazione multiagente | Descrizioni di tutte le knowledge base collegate | 
| \$1action\$1routing\$1 | Tutti i [modelli supportati](multi-agents-supported.md) per la collaborazione multiagente | Descrizioni di tutti gli strumenti collegati | 
| \$1knowledge\$1base\$1routing\$1guideline\$1 | Tutti i [modelli supportati](multi-agents-supported.md) per la collaborazione multiagente | Istruzioni per consentire al modello di instradare l’output con citazioni, se i risultati contengono informazioni recuperate da una knowledge base. Queste istruzioni vengono aggiunte solo se all’agente supervisore è associata una knowledge base. | 
| \$1action\$1routing\$1guideline\$1 | Tutti i [modelli supportati](multi-agents-supported.md) per la collaborazione multiagente | Istruzioni per consentire al modello di restituire l’utilizzo di uno strumento se sono collegati strumenti e la richiesta dell’utente è pertinente a uno qualsiasi degli strumenti. | 
| \$1last\$1most\$1specialized\$1agent\$1guideline\$1 | Tutti i [modelli supportati](multi-agents-supported.md) per la collaborazione multiagente | Istruzioni per indirizzare a questo agente utilizzando keep\$1previous\$1agent se l’ultimo messaggio utente riguarda un follow-up proveniente da quell’agente e che l’agente richieda informazioni dal messaggio per procedere. | 
| \$1prompt\$1session\$1attributes\$1 | Tutti i [modelli supportati](multi-agents-supported.md) per la collaborazione multiagente | Variabile di input in Classificatore di instradamento  | 

------

**Utilizzo delle variabili segnaposto per chiedere all’utente ulteriori informazioni**

È possibile utilizzare le seguenti variabili segnaposto se si consente all’agente di chiedere ulteriori informazioni all’utente eseguendo una delle seguenti azioni:
+ Nella console, impostare l’**Input utente** nei dettagli dell’agente.
+ Imposta la `parentActionGroupSignature` su `AMAZON.UserInput` con una richiesta [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html) o [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html).


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