🌐
Pinecone
pinecone.io › learn › series › langchain › langchain-prompt-templates
Prompt Engineering and LLMs with Langchain | Pinecone
The prompt template classes in Langchain are built to make constructing prompts with dynamic inputs easier. Of these classes, the simplest is the PromptTemplate.
Discussions

16 prompt patterns and templates
thanks bud 💪 More on reddit.com
🌐 r/ChatGPTPromptGenius
5
41
May 29, 2024
prompt templates and methods for content generation
I don't see the link. More on reddit.com
🌐 r/PromptDesign
2
9
June 12, 2024
Just tested my v0 prompt templates, and it works. (link to templates included, too lengthy to include) : LLMDevs
🌐 r/LLMDevs
Prompt templates for stable diffusion
Thanks! Will give them a shot and go from there. More on reddit.com
🌐 r/StableDiffusion
11
46
July 21, 2022
🌐
LangChain
python.langchain.com › docs › concepts › prompt_templates
Prompt Templates | 🦜️🔗 LangChain
# pip install -qU langchain "langchain[anthropic]" from langchain.agents import create_agent def get_weather(city: str) -> str: """Get weather for a given city.""" return f"It's always sunny in {city}!" agent = create_agent( model="claude-sonnet-4-5-20250929", tools=[get_weather], system_prompt="You are a helpful assistant", ) # Run the agent agent.invoke( {"messages": [{"role": "user", "content": "what is the weather in sf"}]} )
🌐
Notion
ignacio-velasquez.notion.site › 2-500-ChatGPT-Prompt-Templates-d9541e901b2b4e8f800e819bdc0256da
2500+ ChatGPT Prompt Templates
A tool that connects everyday work into one space. It gives you and your teams AI tools—search, writing, note-taking—inside an all-in-one, flexible workspace.
🌐
Comet
comet.com › home › llmops › introduction to prompt templates in langchain
Introduction to Prompt Templates in LangChain - Comet
April 24, 2025 - Prompt templates allow you to define a template once and reuse it in multiple places. This avoids duplicating the same prompt logic over and over. For example, you could create a “summarize article” template and reuse it anytime you want ...
🌐
Medium
medium.com › @princekrampah › prompt-templates-in-langchain-248c015be3e0
Prompt Templates In LangChain. In the last article, we went over the… | by Prince Krampah | Medium
July 4, 2023 - from langchain.llms import OpenAI # decouple to read .env variables(OpenAI Key) from decouple import config # import openAI from langChain from langchain.llms import OpenAI # import prompt template from langchain import PromptTemplate # create the prompt prompt_template: str = """/ You are a vehicle mechanic, give responses to the following/ question: {question}. Do not use technical words, give easy/ to understand responses.
🌐
Medium
medium.com › @shravankoninti › different-prompt-templates-using-langchain-3c8dd3aca3be
Different Prompt Templates using LangChain | by Shravan Kumar | Medium
August 12, 2024 - Different Prompt Templates using LangChain In LangChain, a Prompt Template is a structured way to define prompts that are sent to language models. Prompt Templates allow you to create dynamic and …
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-us › semantic-kernel › concepts › prompts › prompt-template-syntax
Using the out-of-the-box prompt template language | Microsoft Learn
November 18, 2024 - The Semantic Kernel prompt template language is a simple way to define and compose AI functions using plain text.
🌐
Reddit
reddit.com › r/chatgptpromptgenius › 16 prompt patterns and templates
r/ChatGPTPromptGenius on Reddit: 16 prompt patterns and templates
May 29, 2024 -

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.”


🌐
Reddit
reddit.com › r/promptdesign › prompt templates and methods for content generation
r/PromptDesign on Reddit: prompt templates and methods for content generation
June 12, 2024 -

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!

🌐
Mirascope
mirascope.com › blog › langchain-prompt-template
A Guide to Prompt Templates in LangChain | Mirascope
June 30, 2025 - This is handy because you don’t need to manually construct message objects — the template handles it for you. When you’re working with chat-based models, you often want to include conversation history (or some sequence of messages). MessagesPlaceholder acts as a stand-in for a dynamic list of messages you’ll provide at runtime. Imagine we’re building a career coach bot that remembers previous questions and answers: from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder from langchain_core.messages import HumanMessage, AIMessage chat_prompt = ChatPromptTemplate.fro
🌐
AWS
docs.aws.amazon.com › amazon bedrock › user guide › automate tasks in your application using ai agents › customize agent for your use case › customize agent orchestration strategy › enhance agent's accuracy using advanced prompt templates in amazon bedrock › advanced prompt templates
Advanced prompt templates - Amazon Bedrock
Prompt template placeholders – Pre-defined variables in Amazon Bedrock Agents that are dynamically filled in at runtime during agent invocation. In the prompt templates, you'll see these placeholders surrounded by $ (for example, $instructions$).
🌐
Salesforce
trailhead.salesforce.com › learn › quick start: prompt builder › get started with prompt builder
Maximize Generative AI with Prompt Templates
Learn how to create custom AI prompt templates to personalize and streamline your content generation for customer support cases.
🌐
Google Cloud
cloud.google.com › generative ai on vertex ai › documentation › use prompt templates
Use prompt templates | Generative AI on Vertex AI | Google Cloud
This document describes how to use prompt templates. A prompt template is a prompt that includes replaceable variables.
🌐
Prompt Engineering Guide
promptingguide.ai › introduction › examples
Examples of Prompts | Prompt Engineering Guide
October 30, 2025 - The "A:" is an explicit prompt format that you use in question answering. You used it here to tell the model that there is an answer expected further. In this example, it's not clear how this is useful vs not using it but we will leave it that for later examples.