Prompt Engineering Tutorial 0/120 lessons ~6 min read Lesson 61
ChatGPT Prompting
ChatGPT (GPT-4o, GPT-5) responds best to clear instructions, markdown formatting, and JSON mode for structured output.
Course progress0%
Focus
6 guided sections
Practice signal
Examples included
Career prep
Foundation builder
Introduction
ChatGPT (GPT-4o, GPT-5) responds best to clear instructions, markdown formatting, and JSON mode for structured output. It's also the most popular LLM, so prompts here ship to billions.
Beginner analogy: ChatGPT is the friendly generalist — clear instructions go a long way; it's chatty by default.
Understanding the topic
Core concepts to understand:
- Use the system message for persistent instructions.
- Enable JSON mode when you need structured output.
- Use tools (function calling) for actions.
- Temperature 0–0.3 for factual; 0.7+ for creative.
- Markdown renders beautifully in ChatGPT UI.
Syntax reference
Visual workflow / architecture:
bash
messages = [{ role: "system", content: "You are a senior dev reviewer." },{ role: "user", content: "Review this PR: ..." }]response_format = { type: "json_object" }
Real-world use
OpenAI's own Custom GPTs are just elaborate system prompts. 5M+ have been published.
Best practices
- Front-load critical instructions; ChatGPT respects early system content.
- Use JSON mode when downstream parses output.
- Keep system < 500 tokens for cost.
Hands-on exercise
Interview preparation — practice these questions:
- Q1. How get reliable JSON from ChatGPT?
- Q2. System vs user — what goes where?
- Q3. Function calling in 1 sentence?
- Q4. Temperature defaults?
Ready to mark this lesson complete?Track your journey across the entire course.