Skip to content
Courses/Claude Code + Local AI/Writing good prompts for local AI

Writing good prompts for local AI

In this book you don't program—you tell Claude Code what you want. The quality of what you get back depends mainly on how you write that prompt. This chapter teaches you how to ask well so you get results that work on the first try.

  • What a prompt is and why it's the most important tool in the book.
  • The four-part recipe for a good prompt.
  • How to course-correct when the result isn't what you expected.

What is a prompt

The recipe for a good prompt

A solid prompt has four parts. You've already seen them in every chapter:

  • What you want to build (the goal). "Create a web chat app with my PDFs."
  • Which tools to use (the context). "Use Ollama with qwen3:4b and nomic-embed-text."
  • How it should behave (the details that matter). "It must cite the file and page; minimal interface."
  • What you expect back (the format). "Do it step by step and write me a README."

Tips that make the difference

  • Ask for it step by step and have it explain what it creates. You learn and stay in control.
  • Give examples of what you want ("the invoice should look like this...").
  • Set limits: "don't use paid services", "make it work offline".
  • Ask for one thing at a time. It's better to build in parts than to drop one giant prompt.
  • Ask it to question you if something isn't clear: "if you're missing information, ask me before starting".

When the result isn't what you wanted

No problem—you fix it by talking. Instead of starting from scratch, adjust:

Terminal
That's not what I wanted: the button should be at the top and blue. Change that and leave everything else the same.
Terminal
I get this error when starting up: [paste the error here exactly as it appears]. What is it and how do I fix it?

Practice challenge

Pick any project from this book and, before looking at the prompt we suggest, write your own using the four-part recipe. Then compare them—you'll see what details to add next time.

Complete Aulafy mapSee how this lesson fits without leaving your path.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue