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.
These are used in templates to unblock users getting started with content generation. Writer.com and Copy.ai 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.