Back to blog
Prompting
Claude Code

Adding Context and Breaking Down Complex Prompts

Thắng Đoàn
Thắng Đoàn

Ask "How do I fix my WiFi?" and you get generic steps that never match your router. The model is not broken; it lacks your context and it cannot hold one giant task. Two fixes cover both failure modes.

Add the context that matters

Never assume the model knows what you know. "My Google Wifi router has a slowly blinking yellow light" plus the pasted troubleshooting guide gets you the exact fix. Documents, manuals, code snippets, prior messages: if specific information matters, paste it in.

Three ways to break down a big prompt

One prompt with ten instructions gives messy results. Split it instead. Break down instructions: one prompt per instruction, run whichever fits the situation, like separate tools instead of a Swiss Army knife. Chain prompts: each step is its own prompt, output of step 1 feeds step 2, an assembly line. Aggregate responses: run separate prompts in parallel on parts needing different treatment, then merge the results.

The trade-off

Every split costs something. Chained prompts add latency and lose the big picture: step 3 cannot see what step 1 threw away. Aggregation duplicates setup work across parallel runs. One big prompt keeps everything in view but produces the mess you started with. Chain for sequential dependencies, aggregate for independent parts, and stop splitting when each piece fits in one clear instruction.

The smallest test

Take your messiest recent prompt and split it into two. If the outputs get cleaner, keep splitting.

Based on: Gemini API Prompting Strategies (ai.google.dev)

Share:

Recommended for you

Enjoyed this article?

Subscribe for new articles. No spam. Unsubscribe anytime.

By subscribing you agree to receive the newsletter. No spam, and you can unsubscribe anytime.