Good instructions make good Gems
Ever set up a Gem with a specific role, only to get generic AI responses with zero personality? Or maybe the format is all over the place — sometimes the answer is a wall of text, sometimes it's just one sentence?
The problem is usually the instructions.
Your Gem's instructions are basically a job description for the AI. The clearer you write them, the better the AI performs. Leave things vague, and the AI has to guess — and guessing rarely gets you what you want.
Here are 7 practical tips from real-world experience. Whether you're writing your first Gem or tuning an existing one, these will help right away.
The basic structure of good instructions
A solid Gem instruction typically has four sections:
Role definition: Tell the AI who it is. Not just "you're an expert" — specify the domain, communication style, and core mission.
Core behavior: How should the AI work? What's the workflow? How many steps?
Format rules: How long should responses be? Bullet points? Tables? Headings?
Restrictions: What should it never do? How should it handle out-of-scope questions?
The order of these sections matters too — that's what the first tip is about.
Tip 1: Put the important stuff first
When AI reads instructions, attention isn't evenly distributed — the beginning has the most influence, and it fades toward the end.
Put your most critical settings at the very top. Recommended order:
- Role identity
- Safety rules (what not to do)
- Core behavior guidelines
- Response format
- Additional notes
Many people write a brief role description and then spend paragraphs on supplementary details — that's backwards. Role and rules are the skeleton; everything else is flesh.
Tip 2: Use numbers instead of adjectives
"Keep it brief" — what does that mean? 50 words? 200? 500?
Your definition of "brief" and the AI's might not match. Use specific numbers instead:
❌ Please respond concisely
✅ Keep each response under 200 words
❌ Provide appropriate examples
✅ Include 1-2 examples per concept
❌ Search for information when necessary
✅ Search at least 2 sources per response
With numbers, the AI doesn't have to guess your standards.
Tip 3: Say what TO do AND what NOT to do
Telling the AI what to do isn't enough. AI has learned many "default behaviors" during training, and without explicit prohibitions, it'll fall back on them.
For example, if you want a Gem that only answers finance questions:
❌ You are a financial analyst. Please answer the user's finance questions.
✅ You are a financial analyst. Please answer the user's finance questions. If the user asks about something unrelated to finance, politely explain that you only handle finance topics and do not attempt to answer.
Adding "don't do X" and "when Y happens, do Z" is what actually controls the Gem's behavior. Our RayStock AI Stock Analysis is designed this way — ask it about cooking, and it'll clearly tell you that's outside its scope instead of making something up.
Tip 4: List things explicitly — don't say "various formats"
"Supports various formats" — how many? Which ones?
When the AI sees vague descriptions, it fills in the gaps. Sometimes it guesses right, sometimes it's way off.
❌ Can handle various types of questions
✅ Can handle the following types of questions: individual stock analysis, sector comparison, technical analysis, institutional flow analysis
❌ Present in an appropriate format
✅ Response format: start with a one-sentence conclusion, then explain the reasoning in bullet points, and end with a recommendation
The more specific you are, the less the AI drifts from your expectations.
Tip 5: Plan for failures
Most people only think about the "happy path" when writing instructions. What happens when the AI hits a question it can't answer?
If a user asks something that's not in your knowledge files, what should the AI do? Say "I don't know"? Try to answer with general knowledge? Suggest where to look?
Define these scenarios in your instructions:
✅ If the question falls outside the knowledge base, clearly state "This question is currently outside my reference materials" and suggest the user check official documentation.
✅ If search results are insufficient to answer the question, inform the user that data is limited and label which parts are based on search results versus inference.
This way the AI has a plan when it gets stuck, instead of making things up.
Tip 6: Remind the AI to use your knowledge files
If your Gem has uploaded reference files (knowledge base), add a reminder at the end of your instructions:
✅ When answering, prioritize information from the attached reference files and ensure responses are consistent with the documents.
This simple line makes a big difference. Without it, the AI sometimes "forgets" to read your uploaded files and defaults to general knowledge. The reminder is like a final nudge: "don't forget to check the materials."
For multiple reference files, be more specific:
✅ When answering, strictly follow these reference files: use "Product Specs" for product feature questions and "FAQ Document" for common questions. If there's a conflict between files, "Product Specs" takes priority.
Tip 7: Give the AI room to try
AI can be overly cautious — sometimes it says "I'm not sure" or "please consult a professional" for questions it could actually answer.
This happens because AI has learned a massive number of "safe responses" during training. Encouraging it to try can lead to much more helpful answers:
✅ For uncertain questions, attempt an answer but label your confidence level (high / medium / low) so the user can judge accordingly.
✅ If data is incomplete, provide a preliminary analysis based on available information and note which parts need further confirmation.
This doesn't mean letting the AI make things up — combine this with Tip 5's failure handling to balance between "trying" and "declining."
Use Gemini's magic wand to refine your draft
Not sure if your instructions are good enough? Gemini's Gem creation interface has a "magic wand" button — after writing your first draft, click it to automatically rewrite, expand, and restructure your instructions.

The result isn't always perfect, but it's a great starting point. See what it added or changed, then fine-tune based on your needs.
A complete example
Putting all 7 tips together, a complete Gem instruction looks something like this:
Role Definition You are a legal consultant specializing in Taiwan labor law. You explain regulations in plain, easy-to-understand language. Your tone is friendly but professional, and you cite specific article numbers in your answers.
Core Behavior
- When receiving a question, first determine if it falls within labor law
- Search for the latest legal provisions
- Summarize the conclusion in one sentence
- Explain the legal basis in bullet points (cite article numbers)
- Provide practical advice
Format Rules
- Keep each response under 300 words
- Citation format: "Labor Standards Act, Article X"
- End with a reminder: "This is for reference only. For specific cases, please consult a professional lawyer."
Restrictions
- Do not answer legal questions outside labor law
- Do not provide specific litigation strategy advice
- If a question involves recent amendments and search results are insufficient, clearly inform the user that regulations may have been updated
When answering, prioritize the attached reference files.
This example uses all 7 tips. You can compare it with our RayLabor Labor Law Expert — its instructions follow a similar structure.
FAQ
Is there a character limit for instructions?
Yes, but Google hasn't published an exact number and community-reported limits vary. The safe approach: put detailed knowledge in the knowledge base (reference files), and keep only core structure and behavior rules in the instructions — that way you won't hit the cap regardless of where it actually sits.
How do I test my instructions?
After creating the Gem, just start chatting with it. Prepare 5-10 test questions covering: normal questions, edge cases (semi-related topics), and out-of-scope questions. Check whether the Gem's response matches your expectations in each scenario.
Should I write instructions in English or my native language?
If your Gem only serves users in one language, write in that language. For multilingual scenarios, English instructions can sometimes produce more consistent results. The key is clarity, not language choice.
Can I ask AI to write the instructions for me?
Yes, but treat the AI-generated result as a first draft and review it using the tips in this article. AI-written instructions tend to be too generic — they lack your domain knowledge and specific constraints.
Further reading
- What Are Gemini Gems? A Complete Beginner's Guide — New to Gems? Start here
- Gemini Gems vs ChatGPT GPTs: Full Comparison — How they stack up against ChatGPT's GPTs
- Browse all featured Gems →