AI Briefing
KO

Prompt Design

·2023.06.11 09:00

Key point

It argues that prompts are closer to **design**, like web design, than to writing.

1 / 2

Details

Prompts are not simply writing but a design problem that must clearly convey dynamic input. That's why the author thinks it's more accurate to call this prompt design rather than prompt engineering.

The commonalities with web design are clear as well.

  • Both hinge on clarity of delivery.
  • Both must handle dynamic content rather than fixed sentences.
  • Both must adjust content to fit a size—web design to screen size, prompts to the context window.

In practice, too, the two fields are similar. You have to actually render the prompt to catch problems, and a template that looks fine at first glance, like "Hi ${username} ${message}", can end up with the name and message running together once rendered. The author also says that composable components, a declarative style, and, on less capable models like GPT-3.5, fine-grained format management close to pixel perfection are all important.

Agent prompts go a step further and can be seen as interactive websites where buttons can be pressed via function calls. Every time a call happens, the prompt is re-rendered, so you need to be cache-conscious, changing only the subsequent section to reduce re-render costs.

Built on this perspective is Priompt, a React-like JSX-based prompt design library used internally at Cursor. It's far easier to work with than string templates and makes commenting out sections simple. It also stores the serialized props from actual incoming requests, so you can reproduce the prompt with the same props in a preview screen and watch it update live as you edit the source code.

There are limits, though. Models are changing fast, and pixel-level precision may matter less on models better than GPT-4. It's also unclear how much room will be left for prompts themselves going forward, given longer context windows, less control over prompts, function calling, and higher-level abstractions like LangChain. Even so, the judgment is that, for now, it's still better to work as close to the raw model as possible.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.