Las instructions del agente definen el proceso que debe seguirse para lograr su objetivo.
Cada paso contiene una instrucción en lenguaje natural que puede incluir cualquiera de los siguientes elementos:
- Instrucción básica que el LLM puede comprender.
- Una instrucción para dirigir al usuario a otro agente.
Se hace referencia a los agentes con el formato
${AGENT: agent_name}
. - Instrucción para usar una herramienta específica.
Para hacer referencia a las herramientas, se usa el formato
${TOOL: tool_name}
. Instrucción para enrutar al usuario a un flujo de Dialogflow CX. Se hace referencia a los flujos con el formato
${FLOW: flow_name}
.
La descripción de cada paso comienza con -
, y puedes definir subinstrucciones con la sangría.
Por ejemplo:
- greet the customer and ask them how you can help.
- If the customer wants to book flights, route them to ${AGENT: flight_booking}.
- If the customer wants to book hotels, route them to ${AGENT: hotel_booking}.
- If the customer wants to know trending attractions, use the ${TOOL: attraction_tool} to show them the list.
- help the customer to pay for their booking by routing them to ${FLOW: make_payment}.