Planning

You will understand what AI planning is, why breaking a big task into smaller steps produces more consistent results, and how EngineerPrep's lesson-generation pipeline uses planning as its first stage.

Why This Matters

Picture this: a user asks the AI tutor, 'Explain dependency injection and give me a Spring Boot example.' You send that single sentence straight to Claude. Claude tries to explain a concept, write code, keep it beginner-friendly, stay on topic, and format it nicely — all at once, in one shot. Sometimes it works. Often it doesn't. The explanation is vague, the code is wrong, or the tone lurches between textbook and casual in the same paragraph. Your gut says: 'I need a better prompt.' So you spend an hour crafting the perfect mega-prompt. It helps a little. But the results are still inconsistent. Here's the thing nobody tells you early on: the problem is not the words in your prompt. The problem is that you're asking one step to do many jobs. There is a well-known trick that fixes this — the same trick a senior engineer uses before writing any non-trivial code.…

The Simple Idea

Think about packing for a trip. You don't open your suitcase and throw things in randomly. You first make a list — clothes, charger, passport — and then you pack each item one at a time. AI planning is the same idea applied to a language model. Instead of asking the model to do everything in one go, you first ask it to make a list of steps . Then you execute those steps one by one, each as its own focused prompt. That first step — producing the list — is called the plan . A plan is just a structured outline of what needs to happen to complete a task. It is not the answer itself; it is the roadmap to the answer. Why does this help? Because a language model — like a person — tends to do more consistent work when it is focused on one thing at a time. Splitting 'think about what to do' from 'actually do it' is the core insight. EngineerPrep uses this idea literally.…

See It in Action

Scene: a user asks the AI tutor to explain a topic. --- Step 1 — The request arrives. A box labelled User Request sits at the top of the screen. Inside it: 'Teach me about database indexing.' Nothing has happened yet. The model hasn't been called. --- Step 2 — The planning call. An arrow leaves User Request and points to a box labelled Planner . The planner sends a short, focused prompt to Claude: 'Given this topic, list the chapters needed for a beginner lesson. Return them as an ordered JSON array.' Claude responds. A new box appears: Plan . Inside it are four items: 1. Hook — why indexing matters 2. Concept — what an index is 3. Visual — B-tree diagram 4. Code — adding an index in SQL The model did only one thing : decided the structure. It wrote nothing yet. --- Step 3 — The authoring loop. A loop begins.…