AI Tools

AI Tools › Guides › Prompt Gemini

How to Write a Good Prompt for Gemini

Google describes six strategies for prompting Gemini better: precise instructions, examples, context, a partial answer, constraints and iteration.

In short

Here is how to apply them.

  1. Write clear, precise instructions.
  2. Add examples.
  3. Bring the context.
  4. Start the answer for it.
  5. State the constraints.
  6. Iterate.

Google's documentation on prompting strategies for Gemini rests on a few simple ideas that you can apply in the app as well as in a developer tool. This page goes through them one by one, with complete prompts. For the basics that apply everywhere, read the general method first.

How to do it

  1. Write clear, precise instructions. Ask an explicit question, or describe the task step by step, rather than leaving Gemini to guess.
  2. Add examples. The documentation distinguishes the prompt with no example (zero-shot) from the prompt with a few examples in the same format (few-shot), which lets the model recognize the pattern to follow.
  3. Bring the context. Provide the document or the useful information, so the answer rests on concrete material rather than generalities.
  4. Start the answer for it. Google calls this partial completion: you write the beginning of the expected result, and Gemini continues in the same format.
  5. State the constraints. What to do, what not to do, the length limit.
  6. Iterate. Rephrase, change the order of the elements, try an analogous task or a multiple-choice question.

Example 1: instructions in steps

You want to organize a year-end party at your fifteen-person company. Rather than “Help me with the party,” give a frame:

I need to organize a year-end lunch for 15 colleagues, total budget [amount], in the [city] area, on a [day of the week] in December.

Proceed in three steps:
1. Suggest three different options (restaurant, caterer at the office, activity followed by a meal) with pros and cons.
2. For the cheapest option, list the questions to ask the provider.
3. Write the invitation message to send to the team, in under 80 words.

If any information is missing to answer, ask me your questions first.

Example 2: give examples of the format you want

The documentation advises examples that are consistent with one another: same structure, same punctuation. Here, you want to turn notes into tasks:

Turn each note into a task in the format “Verb + object | owner | deadline.”

Note: Marc needs to remember to call the caterer back before Friday.
Task: Call the caterer back | Marc | Friday

Note: we'll need to print the menus the week before.
Task: Print the menus | to be decided | previous week

Note: [your note 1]
Task:

The last line, which deliberately stops after “Task:”, also applies the partial-answer technique: Gemini only has to complete it.

Example 3: rely on a supplied context

Without context, the AI answers with generalities. With a reference text, it can stay within your framework:

Here are the house rules of our sports club:
###
[paste the text, without personal data]
###
Answer a member's question using only this text: “[member's question].”
If the rules do not answer it, say so clearly and offer to pass the question on to the board. Tone: friendly, four sentences at most.

Example 4: iterate when the result does not fit

The documentation offers several leads when the answer is disappointing: rephrase, restate the idea in another form, reorder the parts of the prompt. In practice, after a first answer:

The answer is too general. Start over, limiting yourself to a team of [number] people with no extra budget. Present the result as a three-column table: idea, estimated cost, preparation time. Keep only the four most realistic ideas.

What changes in the Gemini app

According to Google's help pages, access to Gemini goes through a Google account, and some features such as Gems (custom assistants), file uploads or image generation require you to be signed in. To write lasting instructions in a Gem, Google's help says you can type a few words and then ask Gemini to expand them; then test in the preview and correct. For what the free plan offers, see our dedicated guide.

Common mistakes

To test a first version, the prompt improvement tool spots what is missing.

Frequently asked questions

What is “few-shot”?

It is a prompt that contains a few examples of what you expect, in the same format. Gemini spots the pattern and reproduces it, which avoids long explanations.

Do I need a Google account to use Gemini?

According to Google's help, you sign in with a Google account. On some devices, simple text features are possible without signing in, but the Android app requires a sign-in.

What if Gemini answers too vaguely?

Add context (the text, the situation), measurable constraints and a response format, then try again. Rephrasing or changing the order of the elements in the prompt also helps.

Sources: Google: prompting strategies for Gemini · Google Help: use Gemini (account, access) · Google Help: create and use Gems. Guide updated on November 23, 2026.

Free tools to go faster

On the same topic

Read next

All guides · All tools