Vanderbilt Researchers Create Prompt Catalog
Drawing parallels to software engineering, Vanderbilt researchers create a framework for documenting prompts, as well as a catalog of several prompt patterns!
Created on June 7|Last edited on June 7
Comment
Researchers from the University of Vanderbilt have been working on a new framework and catalog for prompt engineering. Drawing inspiration from software engineering, this article introduces a catalog of prompt engineering techniques in the form of patterns reminiscent of the tried and tested software patterns. Software patterns, an integral part of the software engineering lexicon, represent a methodical approach to solving recurring problems within a specific context.
Software Patterns
Each software pattern comprises several key components:
1. Name and Classification: A distinct name to identify the pattern and a classification that groups it into broad categories, such as creational, structural, or behavioral.
2. Intent: A concise statement that delineates the pattern's purpose.
3. Motivation: A clear explanation of the problem the pattern aims to solve and the importance of solving it.
4. Structure and Participants: This details the different pattern participants (like classes and objects) and how they collaborate to form a generalized solution.
5. Example Code: A concrete mapping of the pattern to an underlying programming language, aiding developers in understanding its effective application.
6. Consequences: A summary of the pros and cons of applying the pattern in practice.
Prompt Patterns
In much the same vein, the researchers formulate a specific format for prompts. Although similar to software patterns, prompt patterns bear certain unique characteristics that align them with the task of output generation from LLMs:
1. Name and Classification: Like software patterns, prompt patterns carry unique identifiers, indicating the problem being addressed. Classifications have been developed for categories such as Output Customization, Error Identification, Prompt Improvement, Interaction, and Context Control.
2. Intent and Context: This describes the specific problem that the prompt pattern solves and the goals it achieves, preferably independent of any domain.
3. Motivation: This section rationalizes the problem and underscores why its solution is crucial, specifically in the context of users interacting with an LLM.
4. Structure and Key Ideas: Rather than outlining participants as in software patterns, this element of prompt patterns describes fundamental contextual information. This is a series of key ideas that the prompt pattern communicates to the LLM, forming a core element of the pattern.
5. Example Implementation: A practical demonstration of how the prompt pattern is worded.
6. Consequences: A summary of the pros and cons of applying the pattern, potentially including guidance on adapting the prompt to different contexts.
The Catalog
In essence, just as software patterns have streamlined the process of software development, prompt patterns hold the potential to revolutionize the utilization of LLMs, providing a standardized approach to prompt engineering that maximizes the utility of these powerful models. In addition, the researchers also provide an extensive list of prompts that are helpful for everyday tasks. Here are a few that are quite interesting and could be leveraged to gain more from LLM’s.
The Meta Language Creation Pattern
The motivation behind this is to enhance the way ideas are communicated through prompts to Large Language Models (LLMs). The researchers suggest that some concepts might be better expressed in a language other than conventional human language used for LLM interaction.

The Flipped Interaction Pattern
It enables the LLM to actively ask questions to the user to attain a specific goal. This method allows the LLM to utilize its knowledge base to gather information, facilitating a more efficient and accurate conversation accurately.


The Persona Pattern
The "Persona" pattern allows users to prompt the LLM as if it's a specific figure, like a teacher or security expert, guiding the AI to provide responses fitting that persona.

The Alternative Approaches Pattern
The "Alternative Approaches" pattern encourages the LLM to provide users with different ways of solving a task, aiming to challenge their cognitive biases and broaden their knowledge. It offers varied solutions within defined boundaries, potentially comparing pros and cons of each.

Prompt Standardization
Overall, the team did a great job aggregating lots of useful prompts and providing a potential standardization for using and sharing prompts, and if you are interested in seeing the full catalog, check out the paper linked below!
Add a comment
Tags: ML News
Iterate on AI agents and models faster. Try Weights & Biases today.