Blog
Custom Print on Demand Apparel — Free Storefront for Your Business
Wild & Free Tools

Gemini System Instructions — Setup, Examples, and Free Generator

Last updated: April 20266 min readAI Tools

Gemini calls the system prompt "system instructions" — same concept, different name. If you've been hunting for "Gemini system prompt" and finding nothing useful, that's why. This guide covers exactly how to set system instructions in the Gemini API, in Google AI Studio, and in Vertex AI, with copy-paste examples and a free generator that produces Gemini-ready instructions in two minutes.

Generate a Gemini-ready system instruction in 2 minutes.

Open System Prompt Generator →

System instructions in the Gemini API

In the generateContent API, system instructions go in the system_instruction parameter, separate from the messages array:

{
  "system_instruction": {
    "parts": [
      {"text": "You are a helpful coding assistant. Always explain your reasoning in code comments. Never use deprecated APIs."}
    ]
  },
  "contents": [
    {"role": "user", "parts": [{"text": "Write a Python function to parse JSON."}]}
  ]
}

The structure is similar to Anthropic's Claude API: a top-level system field, separate from the conversation messages. This separation lets the model treat the system instruction with stronger weight than user-turn content.

System instructions in Google AI Studio

Google AI Studio is the fastest way to test Gemini without writing code:

  1. Go to aistudio.google.com
  2. Click Create new promptChat prompt
  3. In the right-hand panel, find the System instructions field
  4. Paste your system instruction
  5. Type a user message and run

This is the easiest place to iterate. Edit the system instruction, re-run the same user message, see the difference. No API key, no code, no deployment cycle.

System instructions in Vertex AI

For enterprise apps, Vertex AI is the production endpoint. The system instructions parameter works the same way:

from vertexai.generative_models import GenerativeModel

model = GenerativeModel(
    model_name="gemini-2.5-pro",
    system_instruction="You are a senior data analyst. Always validate the data type before computing statistics. Always cite the column you're analyzing."
)

response = model.generate_content("Compute the average of the price column.")
print(response.text)

Vertex AI also supports prompt grounding (attaching documents that the model can cite), function calling, and structured outputs — all of which interact with the system instruction.

Recommended structure for Gemini system instructions

Gemini accepts plain prose, but a numbered or bulleted structure works better than dense paragraphs. Suggested template:

You are [ROLE].

Your primary goal is [GOAL].

Capabilities:
1. [Capability 1]
2. [Capability 2]
3. [Capability 3]

Rules:
- [Rule 1]
- [Rule 2]
- [Rule 3]

Output format:
- [Format requirement 1]
- [Format requirement 2]

If you don't know the answer, say "I don't have enough information for that" rather than guessing.

The free system prompt generator produces output in this exact structure when you pick a use case and toggle rules.

Length recommendations

Use caseSystem instruction lengthNotes
Personal assistant100-300 tokensIdentity + 3-5 rules
Customer chatbot300-800 tokensIdentity + capabilities + 8-12 rules + output format
Coding assistant400-1000 tokensAdd code style preferences and stack details
Domain expert800-2000 tokensAdd domain knowledge, terminology, and few-shot examples
Complex agent2000-5000 tokensAdd tool descriptions, planning rules, and handoff logic

Gemini's 1M and 2M token context windows mean you have room to be thorough. Don't compress aggressively if it costs clarity. The system instructions count against your input token budget on every request unless you use context caching.

Gemini-specific tips

Common Gemini system instruction mistakes

Generate Gemini-ready system instructions now.

Open System Prompt Generator →
Launch Your Own Clothing Brand — No Inventory, No Risk