Madlibs are an input type behind templates and workflows, letting users define the relationship between items or the format of a prompt once and then repeat it forever. This is especially helpful to avoid unnecessary and sloppy mistakes when performing other tasks, such as asking the AI to draft an email only to have the AI get the person's name wrong.

The Madlibs pattern should be used when the general parameters of a task are known, the data that will feed into that input is somewhat structured, and the task is likely to be repeated multiple times.

For example, take the creation of a document like a Product Requirements Doc. The format is generally fixed, the source or type of input is clear, and it repeats relatively often. Would we want AI creating our PRDs for us? Probably not - BUT we could use the madlibs input type to aggregate information from multiple sources in one place for easy retrieval.

Madlibs as an input type combines multiple patterns:

  • They can be incorporated into templates or workflows to be retrieved when needed or run automatically
  • They may synthesize and summarize information from other places
  • They should include footprints of their work in their outputs, including demonstrating their sources and citations
  • They may be broken into multiple steps, such that information captured in the first first can be used later on

Setting them up

Madlabs are formatted as a collection of inputs and variables. Users specify their prompt but leave some inputs open ended that the prompt user will fill out. For example, a PRD template may include a link to a collection of insights by customers about a specific product area. Madlibs can be as simple as including a single reference link, or they can use multiple sources built via integration.

Putting them to work

Madlibs are commonly seen in workflows. The user may enter a trigger (or it may be automated), and the rest of the workflow fires off seamlessly. Examples could include syncing notes from a meeting captured in Gong in Salesforce notes.

Workflows are set up to run off of information integrated from other sources as well as AI-generated information

These are used in templates to unblock users getting started with content generation. and are good examples of how this can be used to build a prompt library within your company. Details like tone of voice, audience, and so on only need to be captured once and put into the prompt template.

Details and variations

  • The initial prompt is defined as a template
  • Variables are used to indicate the areas of the prompt that can be edited by subsequent users
  • Future users enter the variable without impacting the underlying prompt
  • The users can then regenerate and iterate upon the response as they would awith anything else



Standardize and automate

When you need to standardize the output of work across a group of people, madlibs can help you build a library of shared prompts so users only have to adjust the variables. As a result, reference links and sources, formatting instructions, and other fixed details can be built directly into the prompt instead of relying on individuals to re-set them every time.

AI eats mundane work

Work is fragmented across multiple systems, leading many people to spend hours of their work day just moving information around. AI madlibs, and their related patterns, help to streamline these tasks, saving bandwidth in people's day for more meaningful, creative time (or a long lunch!)

Potential risks


While Madlibs can be a useful pattern for internal notes or for external drafts, they run the risk of creating overly formulaic content when used repeatedly. Consider using them for brainstorming things like social posts, but ensure you give your content a human touch (literally).

Use when:
Multiple downstream users need to work off the same prompt without re-writing or adjusting it


No items found.