01 — The framework
Prompt engineering — the real skill
Prompt engineering is clear communication with a pattern-matching machine. There are no magic phrases. The better you describe what you want, the better the output, and a vague prompt like "write about dogs" gets a vague encyclopedia entry while a specific one gets a checklist you can actually use.
The CRIC Framework: every good prompt has four components. You don't always need all four, but the more you include, the better the result. Hover a card:
C
Context
Background information the model needs.
"You're reviewing code for a Python web scraper that runs daily."
R
Role
Who the model should be.
"You are a senior security engineer."
I
Instruction
What you want the model to do.
"Review this code for security vulnerabilities and suggest fixes."
C
Constraints
Boundaries and format.
"Focus only on critical issues. Numbered list with severity, description, fix."
Example: without vs with CRIC.
✗ Without
"Check my code"
→ Generic, useless response
✓ With CRIC
"You are a senior security engineer. I have a Python web scraper that runs daily on a VPS, stores data in PostgreSQL, and sends results to a Telegram bot. Review this code for security vulnerabilities. Focus on authentication, data handling, and injection risks. Output as a numbered list with severity, description, and suggested fix."
→ Targeted, actionable, useful
02 — Techniques
Advanced techniques
Few-shot prompting: show the model examples of what you want. The model learns the pattern from your examples and applies it, which is often more effective than describing the format in words.
few-shot
# Convert sentences to JSON:
Input: 'John, 25, engineer' → Output: {'name': 'John', 'age': 25, 'job': 'engineer'}
Input: 'Sarah, 30, designer' → Output: {'name': 'Sarah', 'age': 30, 'job': 'designer'}
Now convert: 'Mike, 28, developer'
Chain of thought: ask the model to think step by step. Adding "think step by step" dramatically improves accuracy on reasoning tasks, because the model shows its work and that visibility cuts down on errors.
chain of thought
"Think step by step: If a train leaves at 3 PM
traveling 60 mph, and another leaves at 4 PM traveling
80 mph in the same direction, when does the second
train catch the first?"
Negative instructions: tell the model what NOT to do. Surprisingly effective at shaping output.
negative instructions
"Explain machine learning.
Do NOT use jargon without defining it.
Do NOT use analogies to the human brain.
Do NOT start with 'Machine learning is a subset of AI.'"
⚡ Try this now
Send two prompts to ChatGPT and compare them side by side.
Prompt A: Check my code
Prompt B: You are a senior security engineer. I have a Python web scraper that runs daily on a VPS, stores data in PostgreSQL, and sends results to a Telegram bot. Review this code for security vulnerabilities. Focus on authentication, data handling, and injection risks. Output as a numbered list with severity, description, and suggested fix.
The gap between the two outputs is CRIC doing its job.
03 — Agency
Tool calling — from talking to doing
By default, an LLM can only generate text. It can't open the internet, run code, or read files. You ask it for Bitcoin's current price and you get an answer from training data that's months out of date. Tool calling fixes that: it lets the model ask an external system to check something, then fold the result into its answer.
Example flow:
"Weather in Tokyo?"
→
Model: get_weather(city="Tokyo")
→
System runs it
→
"22°C, partly cloudy"
→
Injected into reply
The model never touched the internet. It requested an action, the system performed it, and the model used the result.
Without tool calling: AI is a text generator. Smart, but isolated.
With tool calling: AI can read files, search the web, run code, query databases, send messages, control devices. This is the difference between "a chatbot" and "an agent."
Common tools:
- Web search (access current information)
- Code execution (run and test code)
- File operations (read, write, edit files)
- Database queries (access structured data)
- API calls (interact with external services)
- Calculations (precise math, not token prediction)
How to leverage this:
- When AI has access to tools, ask it to USE them rather than rely on training data
- "Search the web for current BTC price" beats "What's the BTC price?"
- "Run this code and show me the output" beats "Will this code work?"
- Tools make AI reliable because they provide real data, not predictions
⚡ Try this now
If you have ChatGPT with web search, try:
Search for the latest news about [a topic you know well]. Give me 3 headlines plus sources.
Open each source. Are they real? Do the headlines actually match? Tool output is only as trustworthy as you make it.
04 — Continuity
Memory & context management
The biggest limitation you'll hit with AI is memory. You can spend 30 minutes teaching it your project, your preferences, your codebase, and the next day it answers "Who are you? What project?" Every conversation starts from zero. That's infuriating, and it's not a bug that will get fixed. It's how LLMs work by design.
Session 1
You spend 30 minutes teaching AI about your project, your preferences, your codebase.
Session 2
"Who are you? What project?"
Incredibly frustrating. And a fundamental limitation of how LLMs work.
Strategies to manage this:
- Save context externally. Don't rely on the AI to remember. Save important facts in files, notes, or documentation. Re-inject them when starting a new session.
- Use system prompts for persistent context. If the platform allows it (ChatGPT Custom Instructions, Claude Projects, etc.), put your core context in the system prompt. It gets injected every conversation automatically.
- Summarize before switching. At the end of a long session, ask the AI: "Summarize everything we discussed and decided in a format I can paste into a new session."
- Structure your conversations. One topic per conversation. Don't mix unrelated tasks. This keeps the context window focused on what matters.
- Build a "context file." Maintain a document with your key information (project details, preferences, decisions made). Paste it at the start of new sessions.
AI memory management is YOUR responsibility, not the AI's. The people who get the most out of AI are the ones who build systems to maintain context across sessions, not the ones who complain that the AI forgot.
05 — Your data
RAG — give AI your own data
RAG (Retrieval Augmented Generation) solves a fundamental problem: AI only knows what it was trained on. It doesn't know your files, your data, or your specific situation.
The concept: instead of asking AI to answer from memory alone.
Your question
→
Search your data
→
Inject into prompt
→
AI answers w/ your data
Without RAG
"Which of my clients haven't paid this month?"
AI: "I don't have access to your client data."
With RAG
[System searches your invoice database, finds 5 unpaid invoices, injects them into the prompt]
AI: "Based on your records, these 5 clients haven't paid: [list with amounts and dates]"
Why this matters:
- AI becomes useful for YOUR specific data, not just general knowledge
- No need to fine-tune (expensive). Just retrieve relevant docs.
- Data stays under your control (it's injected at query time, not trained on)
- You can update your data anytime without retraining
Simplified RAG flow: Your question → Search your database → Get relevant chunks → Combine with question → Send to AI → Get answer grounded in YOUR data. We'll go deeper into the technical implementation in Level 4.
06 — Strategy
Multi-model strategy
Don't be loyal to one model. Be strategic. Different models have different strengths. Using the right model for the right task saves money, improves quality, and speeds up your workflow.
Think of AI models like tools in a workshop. You wouldn't use a hammer for every job just because it's your favorite hammer. Sometimes you need a screwdriver. Sometimes you need a wrench.
Practical model selection:
| Task | Best Choice | Why |
| Quick questions | Fast/cheap (GPT-4o-mini, Claude Haiku) | Speed matters more than depth |
| Complex reasoning | Frontier (Claude Opus, GPT-4o) | Need deep thinking |
| Long documents | Claude Sonnet 4 (200K context) | Largest effective context window |
| Code generation | Claude or GPT-4o | Both strong at code |
| Creative writing | Claude or GPT-4o | Better at nuance and voice |
| Data extraction | Fast model, low temperature | Speed + consistency |
| Research | Gemini or model w/ web search | Access to current info |
| Image analysis | GPT-4o or Claude | Both have vision capabilities |
Cost optimization:
- Use cheap models for bulk/simple tasks
- Reserve expensive models for complex reasoning
- Start with a cheap model, escalate to expensive if needed
- Batch similar tasks to one model session
A user who picks the right model for each task gets better results AND spends less money than someone who uses one expensive model for everything. One of the most practical advantages of understanding how AI works.
07 — Watch out
What can go wrong at this level
Power-user habits have their own failure modes. Here are the four most common ones.
1. Overloading the prompt
You know CRIC, so you pile on context, role, instruction, and a wall of constraints all at once. The output gets weird. Too many constraints at once make the model try to satisfy everything simultaneously, and nothing comes out clean.
How to avoid: Start with one instruction. If the result misses, add one constraint. Iterate. Never dump the whole framework on the first try.
2. Not knowing when to use few-shot vs zero-shot
You always include examples. But sometimes examples make the model copy the surface instead of understanding the task. Few-shot is good for locking in a format. Zero-shot is good for tasks the model already knows.
How to avoid: Try zero-shot first. Only add examples if the format is wrong. Don't assume you need examples.
3. Trusting tool output without verifying
You ask the AI to search the web, it returns results, and you trust them. But the model can misread search results, or search with the wrong keywords and then confidently summarize the wrong page.
How to avoid: When the AI returns search or code-execution results, open the links yourself. Check the source. Never trust tool output unverified.
4. Mismanaging memory
You save everything to memory. It fills up, the model gets heavy and unfocused. Or you save the wrong kind of thing, like task progress instead of stable facts, and the context gets noisy.
How to avoid: Memory is for stable facts (preferences, environment, conventions), not task progress. Ask of anything you'd save: "Will this still matter in a month?" If not, don't store it.
08 — What you now know
What you should know after Level 2
You now have the skills of a power user. Tap each as it clicks:
You're no longer just using AI, you're engineering your interactions with it. The gap between a casual user and a power user comes down to understanding the mechanics and deliberately optimizing for them, not how many models or tools you've memorized.