Lompat ke konten

Pelajaran 26 ยท Projects and Reference

Gemini Glossary and Cheat Sheet

A quick Google Gemini reference: key terms, a prompt template, a tool chooser, an API snippet, error handling and a safety checklist for daily use.

This page collects the main ideas of the course in one place. Use it as a quick reference while you work.

Product details are dated December 2026, so confirm names, limits and prices on Google's official pages.

Which tool should you use?

Need Start with
A quick question or draft Gemini app chat
Standing preferences Instructions for Gemini
A repeatable task A skill
Many sources over time A notebook
A report from web sources Deep Research
A document or small app to refine Canvas
A prompt that runs at set times A schedule
Help in mail, documents, sheets or meetings Gemini in Workspace
Testing prompts and settings Google AI Studio
Your own software Gemini API

Prompt template

TEXT
Goal: what you need.
Context: the facts the model needs.
Audience: who will read it.
Constraints: length, tone, what to avoid.
Format: headings, table, bullets or JSON.
Missing information: what to do instead of guessing.

For long material, place it first and your question last.

API snippet

Python
# Read-only.
from google import genai

client = genai.Client()          # reads the key from the environment
interaction = client.interactions.create(
    model="gemini-4-hydrogen",
    system_instruction="Be concise.",
    input="Hello!",
)
print(interaction.output_text)
Task Interactions API idea
Continue a chat previous_interaction_id (send settings again)
Do not store store=False (send the history yourself)
Stream stream=True
Reasoning effort generation_config={"thinking_level": ...}
JSON output response_format with a schema
Your functions tools entries with "type": "function"
Search grounding tools=[{"type": "google_search"}]
Run Python tools=[{"type": "code_execution"}]

Errors

  • Retry with backoff: 408, 429 and 5xx.
  • Fix the cause first: 400, 402 and 403.
  • On Gemini 4, and on Gemini 3.6 and later, remove temperature, top_p and top_k.

Safety checklist

Before you... Check
Type or upload Right account? Allowed to share this? Sensitive parts removed?
Use an answer Important facts, numbers, links and code verified?
Approve an action Right recipient, content and amount?
Ship an app Key on the server only? Budget and usage limits in place?

Glossary

Term Meaning
AI Studio Google's web workspace for trying Gemini models and building prototypes
Batch API Processing of requests that can wait, at a lower price
Canvas A work area in the app for documents, slides, apps and code
Connected app A service that you allow Gemini to use
Context window How much content a model can consider at once
Deep Research A feature that plans research and writes a longer report
Few-shot prompt A prompt that includes worked examples
Files API The upload service for files used in API requests
Function calling The model asks your code to run a function
Gem An earlier saved-assistant feature that is being replaced by skills
Grounding Basing answers on provided or retrieved sources
Hallucination Confident content that facts or sources do not support
Interaction A unit of work in the Interactions API, made of steps
Multimodal Able to work with several kinds of data, such as text and images
Prompt injection Text that tries to override an AI system's instructions
Rate limit A cap on requests or tokens over a period of time
Skill Reusable instructions, with optional files, for a kind of task
Structured output A reply as JSON that follows a schema
SynthID Google's watermark for content made with its AI tools
System instruction Standing rules sent with an API request or set in a tool
Thinking level A setting for how much reasoning the model does
Token A small piece of text used to measure size and cost

Quick self-test

This small program quizzes you on a few terms. Add your own to the dictionary.

Python Glossary self-test

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Cover the answer lines with your hand or remove that print call and write your answers first.

Keep your knowledge current

Products can change faster than tutorials. From time to time:

  1. Check the Gemini Apps help pages for feature and privacy changes.
  2. Check the developer documentation for model deprecations and API changes.
  3. Check the pricing and rate limit pages before you budget.
  4. Run your prompt test sets again.

Where to go next

Strengthen your general skills with Prompt Engineering, Large Language Models, Generative AI and AI Agents. For code, practice Python and SQL.

Three habits to keep

  1. Say what you need. Goal, context and format beat clever wording.
  2. Check what matters. Match the effort to the cost of a mistake, and go to the primary source.
  3. Control what you share and what can act. Choose the right account, send less data and approve actions yourself.

These habits do not depend on a particular model or menu. They will still be useful after the product names on this page have changed.

Common mistake: copying an old code sample and assuming that it matches today's API. Check the model ID and the API style first.

Check your understanding

Quick check ยท 3 questions

of 3 answered You scored / 3 ยท perfect!

  1. 1. Which tool suits a long report based on many web sources?

    Deep Research plans, searches and writes a longer report.
  2. 2. Which error should you fix instead of simply retrying?

    A bad request will fail again until you change it.
  3. 3. What is a thinking level?

    Higher levels use more reasoning, which usually takes more time and tokens.

Summary

  • Pick the tool that fits the job.
  • Use a clear prompt structure, and check what matters.
  • Retry only temporary errors, and keep keys and data safe.
  • Check Google's documentation again from time to time.

Next: Back to the Google Gemini tutorial

Progres Anda disimpan di browser ini. Tidak perlu akun.