AI default prompts¶
Default prompts define how AI behaves when a user opens a conversation from a specific model in Odoo. They allow users to:
Automatically call a specific AI agent
Apply contextual instructions
Display predefined action buttons
Adapt AI behavior depending on the model
Default prompts are model-specific, though they can be applied to all models. This means the AI can behave differently depending on where it is launched in the system.
When a user opens an AI conversation from a record, Odoo provides the full context of that record to the AI agent. This includes field values and relevant metadata.
Each conversation is context-bound. When opened from a lead, the AI receives information about that Lead. When opened from an invoice, the AI receives accounting context. The conversation is isolated and reset once closed.
Configuración¶
Before configuring a default prompt, create or configure the AI agent in the AI application.
Nota
The AI application comes with pre-configured agents, and default prompts. These vary based on the other applications installed on the database.
Navigate to and click New. Create a Rule Name, then select an action in the When users need to field.
Next, select a model in the On the Model field. This controls what records this rule applies to. For example, if the rule is specific to Helpdesk tickets, select Helpdesk Tickets from the drop-down menu. Multiple selections can be made in this field. To allow this rule to be used by any model, leave the field blank.
In the Call the Agent field, select which agent this rule should apply to. Next, add the Instructions for the rule.
Nota
While the agent may already have an existing prompt that defines their behavior, the instructions in the default prompt define the actions in the context of the current model. See Understanding AI prompt structure below for additional information.
Understanding AI prompt structure¶
AI conversations in Odoo are structured using multiple configuration layers.
Each agent has a prompt that defines the global identity and behavior of an AI agent. It is configured directly on the AI agent record and applies wherever the agent is used. The Agent Prompt defines who the AI is.
A default prompt configures how an AI agent behaves when launched from a specific model. Default prompt instructions adapt the agent’s behavior to the functional context of the model. The default prompt defines how the AI should behave in this specific context.
Button prompts represent predefined user requests within an AI chat window. They appear as clickable buttons when a conversation is opened. Button prompts do not redefine the agent’s identity or contextual behavior. Instead, they specify what the AI should do at that moment.
Consulta