Module 2 (Gemini) - Lesson 2: Gemini Prompts Overview
Prompting with Google Gemini: patterns, navigation, and key differences.
Published: 1/15/2026
Gemini Prompting: From Basic to Advanced
This lesson maps the Gemini lessons you will complete in this module and highlights the key API differences versus OpenAI and Anthropic.
Lesson Map
- Lesson 2a: Basic Prompt
- Lesson 2b: System Prompt
- Lesson 2c: Temperature Control
- Lesson 2d: Extended Prompts
- Lesson 2e: Streaming Responses
- Lesson 2f: Structured Output
- Lesson 2g: Tools and Function Calling
Gemini vs Other Providers
- Method:
gemini.models.generateContentinstead ofanthropic.messages.createoropenai.responses.create - Request body:
contentscan be a string or{ role, parts }object - System behavior:
config.systemInstructionreplaces Anthropicsystem - Streaming:
generateContentStreamreturns an async iterator of chunks withtextandusageMetadata - Structured output:
config.responseMimeType: "application/json"plusresponseJsonSchemafor light validation - Tools: Declare
toolswithfunctionDeclarations; function calls arrive incandidates[0].content.parts
Quick Start Checklist
- ✅ Add
GEMINI_API_KEYto your.env - ✅ Install the SDK:
pnpm add @google/genai - ✅ Run the first example:
pnpm tsx src/gemini/basic-prompt.ts
Continue to Lesson 2a to send your first Gemini prompt.