Intention Is All You Need · loose leaf
Skip to content
ContentsIntention<br>1. What Do You Want?<br>Mapping Prompts<br>Enough Information<br>A Perfect Fit<br>Read My Mind?<br>Should I Just Write Code Then?<br>2. Communication is Hard<br>You Don't Know What You Want<br>Minimizing Miscommunication<br>Thread the Needle<br>3. Encapsulate Ambiguity<br>Make Tools<br>Ask Questions<br>Get Data Not Conclusions<br>4. Space to Think<br>Accuracy Not Velocity<br>Iteration as Instruction<br>Just Be Intentional<br>Looking Forward
"How do you use AI effectively for coding?" Many discussions on this topic focus on how to generate higher quality code, understand more complex bugs, or generate more code faster. In my opinion, that's not the important problem to solve.
Modern models are "good enough" to produce high quality products. And they continue to get incrementally better. They are so fast, and they write functional code.
These patterns attempt to optimize how the user spends their time. That's the right idea. You can spin up more LLMs but you can't buy yourself more time. But the problems that cost you the most time aren't because the models couldn't write enough code. The worst problems happen when the model didn't understand you.
The most impactful issues start with misunderstanding intention . No matter how good an LLM[1] gets it will never be able to read your mind.
Therefore, working efficiently with an LLM is all about how you transfer your intention into the tool as quickly and accurately as possible.
Intention
What is intention?
Intention is: "what you want to do" and "how you want to do it". Intention includes all your assumptions. It includes your preferences and idiosyncrasies. Your style. Your taste.
Intention isn't static. It includes the half-formed ideas that exist solely as outlines in your mind. Outlines that you'll fill in without thought when it's time. Because it's obvious what they should be. Obvious to you.
Intention includes the way that you break down problems and the way you build solutions. It includes the decisions that you make and the patterns and values behind those choices.
This probably seems obvious. But it's also subtle, and easy to get wrong. And, even if it's obvious, looking at working with LLMs through the lens of "Intention" helps optimize our workflow.
Now, because we are communicating our intention to the LLM, we can't have those outlines and half formed ideas. We need to sharpen our intention before we express it. Building quickly and iterating until our intention is clear is necessary to express it accurately.
I'm going to start by explaining why this is more important than other metrics you can optimize LLM usage against. And why this problem will not go away. Then I'll explain some patterns that are helpful for efficiently expressing intention.
If you just want the summary, here are my recommendations:
Be specific enough
Communicate clearly
Break problems down
Think deeply
1. What Do You Want?
When asking someone else to do something you need to be specific .
Let's imagine that you have a task for an LLM to implement.
There is some "perfect", "ideal" answer to this task. Maybe the perfect answer is what you would produce yourself with infinite time. Maybe the perfect solution is provable with some objective test.
For our experiment we have something special: a "perfect" LLM. By whatever metric you'd like it's perfect. It's not "really good", it cannot be better. For any prompt it will produce an output that is perfect, and it will always produce an output. It functions in the same way current LLMs do, it's stochastic, its inputs and outputs are tokens, and it predicts its output tokens with "existing math".
Mapping Prompts
Let's give our perfect LLM a task. We will give it this task by writing a prompt. The ideal solution our perfect LLM will produce for this task is a series of tokens (text, or code in this case). I find it useful to visualize this ideal solution as a "shape" in the embedding space of the model.
There is some minimal, mathematical function[2] that represents that solution. The size of that function is the amount of information in the solution. We cannot "identify" or "compress" that series of tokens any further. In order to generate the ideal solution we need at least that amount of information.
Our prompt only has so much information in it. Is there only one solution in the entire universe that satisfies that prompt? Probably not, and we'll explore that more later. For now think of this: the ideal solution is surrounded by a region of "valid" solutions. I picture a larger, less defined shape, surrounding the shape of the ideal solution.
That region defines the possible valid solutions to our prompt. There are a few cases worth listing:
The ideal solution is within the valid region, but the valid region is larger than the ideal solution. The prompt is ambiguous .
The ideal solution is not within the valid region. The prompt is inaccurate .
The ideal solution and the valid region...