Part 3: Prompting tips

Keep iterating and learn from your mistakes

The first thing to know about prompt-writing is this: it's a process. Don't feel discouraged if you make some duds. You're not going to get perfect results every time you press the generate button (or hit enter in websim's case), especially at the beginning, when you're first getting to know the medium. The more you play around with your prompts, the better your results will become and the easier it will be to “steer” your instructions toward something desirable, especially as you get a feel for what you're doing. This kind of iterative process is a hallmark of generative art as well as many other creation processes.

I find it helpful to "search the space" of a particular prompt, which can be done by continually re-running the same prompt over and over again, sometimes with minuscule tweaks, just to see how the LLM reacts. I don’t need to understand precisely why a prompt works or doesn’t work; it’s often enough just to have a sense of whether I’m getting "hot" or "cold" in terms of the relative distributions of my outputs.

If one of your prompts doesn't work out, or if it only works partially, look back on it and see if there are any insights to glean from what you've done. For example, if I find that a particular adjustment consistently breaks my code, I'll avoid using it again, at least for the time being.

Sometimes, I learn about how Claude’s art generators work by visually studying what happens when they don't work in quite the way I expected. For example, at one point while building an art generator, I thought that the controls weren't being generated at all even though I'd asked for them, but by messing around with different prompts, I realized that they were actually just being rendered behind another layer of graphics, and that guided how I prompted Claude to make the controls appear. When you bestow the responsibility of programming your art generator on an LLM, these kinds of surprises are to be expected.

All that being said, at some point it will become clear that adding more time or effort into your prompts won't get much better results, so don't get stuck in analysis paralysis either! Just iterate, share, and move on to the next thing. Sometimes, when I put something down for a while, and come back to it later, new doors will open up for me that I didn't notice before, especially if I've gained new skills since then.



Next page: Prompt with natural language descriptions