prompt templates and methods for content generation
16 prompt patterns and templates
Just tested my v0 prompt templates, and it works. (link to templates included, too lengthy to include)
Prompt Templates for creating documentation, fast & effective. (PRD, MVP & Testing)
Videos
I think the first thing I tried to get ChatGPT to do was generate some content (an article/tweets/etc.)
Fast forward 18 months and a lot has changed, but a lot of the challenges are the same. Even with better models, it’s hard to generate content that is concise, coherent, and doesn’t “sound like AI.”
We decided to put everything we know about prompt engineering for content creation into a guide so that we can help others overcome some of the most common problems like:-Content "sounds like AI"-Content is too generic-Content has hallucinations
We also called in some opinions from people who are actually working with LLMs in production use cases and know what they're talking about (prompt engineers, CTOs at AI startups etc).
The full guide is available for free here if you wanna check it out, hope it's helpful!
Recently stumbled upon a really cool paper from Vanderbilt University: A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT.
Sent me down the rabbit hole of prompt patterns (like, what they even are etc), which lead me to putting together this post with 16 free templates and a Gsheet.
Generally, prompt patterns are high-level solutions to recurring problems.
I copied the first 6 below, but the other 10 are in the post above.
I've found these to be super helpful to visit whenever running into a prompting problem. Hope they help!
Prompt pattern #1: Meta language creation
Intent: Define a custom language for interacting with the LLM.
Key Idea: Describe the semantics of the alternative language (e.g., "X means Y").
Example Implementation: “Whenever I type a phrase in brackets, interpret it as a task. For example, '[buy groceries]' means create a shopping list."
Prompt pattern #2: Template
Intent: Direct the LLM to follow a precise template or format.
Key Idea: Provide a template with placeholders for the LLM to fill in.
Example Implementation: “I am going to provide a template for your output. Use the format: 'Dear [CUSTOMER_NAME], thank you for your purchase of [PRODUCT_NAME] on [DATE]. Your order number is [ORDER_NUMBER]'."
Prompt pattern #3: Persona
Intent: Provide the LLM with a specific role.
Key Idea: Act as persona X and provide outputs that they would create.
Example Implementation: “From now on, act as a medical doctor. Provide detailed health advice based on the symptoms described."
Prompt pattern #4: Visualization generator
Intent: Generate text-based descriptions (or prompts) that can be used to create visualizations.
Key Idea: Create descriptions for tools that generate visuals (e.g., DALL-E).
Example Implementation: “Create a Graphviz DOT file to visualize a decision tree: 'digraph G { node1 -> node2; node1 -> node3; }'."
Prompt pattern #5: Recipe
Intent: Provide a specific set of steps/actions to achieve a specific result.
Example Implementation: “Provide a step-by-step recipe to bake a chocolate cake: 1. Preheat oven to 350°F, 2. Mix dry ingredients, 3. Add wet ingredients, 4. Pour batter into a pan, 5. Bake for 30 minutes."
Prompt pattern #6: Output automater
Intent: Direct the LLM to generate outputs that contain scripts or automations.
Key Idea: Generate executable functions/code that can automate the steps suggested by the LLM.
Example Implementation: “Whenever you generate SQL queries, create a bash script that can be run to execute these queries on the specified database.”