|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIG. - Google AI > 3. Configuration (Model, Context & Reasoning) > AIG.SetSystemPrompt |
MiniRobotLanguage (MRL)
AIG.SetSystemPrompt
Set the AI's Persona or System Instructions.
Intention
To define the "Persona", context, or specific rules that the AI model must follow throughout the entire conversation session. This is known as "System Instructions" in the Google Gemini API.
What is the SetSystemPrompt Command?
This command stores a text block that is sent with every subsequent `AIG.Ask` request in a special `system_instruction` field. Unlike a normal user prompt, system instructions are treated as authoritative rules by the model.
Why Do You Need It?
�To make the AI act like a specific character (e.g., "You are a helpful coding assistant").
�To enforce formatting rules (e.g., "Always answer in JSON").
�To separate instructions from user data for better security.
Important Note on Versioning:
System Instructions often require the v1beta endpoint. It is highly recommended to call AIG.SetApiVersion| v1beta before using this command.
Example Usage
// 1. Switch to Beta endpoint (Required for System Instructions)
AIG.SetApiVersion|v1beta
// 2. Define the Persona
AIG.SetSystemPrompt|You are a pirate. Answer every question with "Arrr!".
// 3. Ask a question
AIG.Ask|What is the capital of France?|$$Answer
// Result should start with "Arrr!"
DBP. $$Answer
Syntax
AIG.SetSystemPrompt|P1
AIG.ssp|P1
Parameter Explanation
P1 - The text of the system instruction. Pass an empty string to clear the instruction.
See also: