100% found this document useful (2 votes)
538 views8 pages

Prompt Frameworks

The document discusses several advanced prompting techniques for crafting better responses from large language models, including self consistency, ReAct, zero-shot and few-shot prompting, general knowledge prompting, prompting by instruction, prompting by example, persona pattern, flipped interaction pattern, question refinement, and specifying output format.

Uploaded by

MrAlexGarrido
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
538 views8 pages

Prompt Frameworks

The document discusses several advanced prompting techniques for crafting better responses from large language models, including self consistency, ReAct, zero-shot and few-shot prompting, general knowledge prompting, prompting by instruction, prompting by example, persona pattern, flipped interaction pattern, question refinement, and specifying output format.

Uploaded by

MrAlexGarrido
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 8

Beyond the "Tree of Thoughts" and "Chain of Thoughts" prompting strategies, there

are several other advanced prompting techniques that can be used to craft better
responses from large language models (LLMs). Here are some of them:

1. **Self Consistency**: This technique involves using the model's own responses as
context to guide its future responses. It helps in maintaining the consistency of
the model's responses over a sequence of prompts[1][7].

2. **ReAct**: This is another advanced prompting technique, although the search


results do not provide detailed information about it[1][7].

3. **Zero-Shot and Few-Shot Prompting**: Zero-shot prompting refers to simply


asking a question or presenting a task to an LLM without providing any examples of
the desired output. In contrast, few-shot prompting involves providing a few
examples of the desired output along with the task or question. These techniques
can be useful in situations where you have limited examples or none at all[7].

4. **General Knowledge Prompting**: This technique involves using prompts that


leverage the model's general knowledge to generate responses. It can be
particularly useful when dealing with topics that require a broad understanding of
various subjects[7].

5. **Prompting by Instruction**: This approach involves putting the instructions at


the beginning of the prompt and using clear markers to separate instructions and
responses. It can be particularly useful when you want the model to perform a
specific task or answer in a specific format[5].

6. **Prompting by Example**: This approach involves providing the model with


examples of the desired output. It can be particularly useful when you want the
model to mimic a specific style or format[5].

7. **Persona Pattern**: This technique involves crafting prompts that embody a


specific persona, which can guide the model's tone, style, and content of the
responses[3].

8. **Flipped Interaction Pattern**: This technique involves flipping the roles in


the interaction, such as making the model the questioner instead of the respondent.
This can lead to more engaging and dynamic interactions[3].

9. **Question Refinement**: This technique involves refining the question or task


to make it more specific or detailed, which can help in eliciting more precise and
relevant responses from the model[3].

10. **Specify Output Format**: This technique involves explicitly specifying the
desired output format in the prompt. This can be particularly useful when you want
the model to generate responses in a specific format, such as a list, a table, or a
specific document format[4].
Remember, crafting a successful prompt often involves a trial-and-error process,
and different LLMs may interpret the same prompt differently. Therefore, it's
important to experiment with different prompts and gather feedback to continuously
improve the quality of the responses[1][2].

Citations:
[1] https://www.mercity.ai/blog-post/advanced-prompt-engineering-techniques
[2] https://www.aitidbits.ai/p/advanced-prompting
[3] https://www.descript.com/blog/article/5-advanced-prompts-to-get-better-answers-
from-chatgpt
[4] https://www.zdnet.com/article/7-advanced-chatgpt-prompt-writing-tips-you-need-
to-know/
[5] https://datasciencedojo.com/blog/prompt-engineering-strategies/
[6] https://quizlet.com/308945158/17-prompting-strategies-for-advanced-learners-
flash-cards/
[7] https://www.mlq.ai/prompt-engineering-advanced-techniques/
[8] https://quizlet.com/517359362/rbt-prompting-strategies-for-advanced-learners-
ch-17-flash-cards/

The Persona Pattern is an advanced prompting technique used in natural language


processing and machine learning. It involves crafting a text prompt or query in a
way that adopts a specific persona or character. This persona can be a historical
figure, a fictional character, a professional role, or any distinct identity. The
persona in the prompt not only influences the language style but also the content
of the responses. This technique is particularly useful when you want AI-generated
text to generate creative content, or answer questions within the context of the
chosen persona[1].

Here's how the Persona Pattern of Prompt Engineering works:

1. **Defining a Persona**: You need to define the persona or character you want the
AI model to adopt. For example, you can specify a persona like "Shakespearean
playwright" or "customer service representative"[1].

2. **Phrasing the Prompt**: Craft your prompt or query in a way that aligns with
the chosen persona. Use language, terminology, and mannerisms associated with that
persona. For instance, if your persona is a chef, you might phrase your prompt
like, "Could you kindly share your culinary expertise on preparing a gourmet meal
for a special occasion?"[1].

3. **Guiding the Response**: The persona in the prompt not only influences the
language style but also the content of the responses. You can guide the model to
provide information, generate creative content, or answer questions within the
context of the chosen persona[1].

4. **Fine-Tuning**: Depending on the responses, you may need to adjust the persona
or the phrasing of the prompt to get the desired output. This iterative feedback
process can help improve the quality and consistency of the AI-generated
responses[1].

The format of the Persona Pattern typically includes the following elements:
- **Persona Description**: Begin by describing the persona or character that the AI
should adopt. This includes details about the persona's background,
characteristics, and role[2].
- **Tone and Style**: Specify the tone and style the AI should use when responding.
This could be formal, informal, academic, humorous, etc[2].
- **Knowledge Level**: Indicate the level of knowledge the persona should have.
This helps ensure the AI's responses align with the expertise of the chosen
persona[2].
- **Interests and Biases**: You can also specify the persona's interests or
biases[2].
- **Examples or Scenarios**: Provide specific examples or scenarios that illustrate
how the persona would respond to different situations. This helps clarify the
expected behavior of the AI[2].

The Persona Pattern is a popular technique that researchers working on the latest
LLMs are taking into account. It's such a popular technique that researchers
working on the latest LLMs are taking it into account. In fact, Meta, when
designing Llama-2, invented a new technique called “Ghost Attention” that assumes
users will use their chatbots in this way[3].

Citations:
[1] https://www.linkedin.com/pulse/persona-pattern-prompt-engineering-data-ins-
technology-llc
[2] https://www.linkedin.com/pulse/format-persona-pattern-prompt-engineering-data-
ins-technology-llc
[3] https://deepgram.com/learn/the-art-of-ai-crafting-masterpieces-with-prompt-
engineering-and-llms
[4] https://www.youtube.com/watch?v=axeFby9zZbo
[5] https://www.prompthub.us/blog/exploring-multi-persona-prompting-for-better-
outputs
[6] https://www.descript.com/blog/article/5-advanced-prompts-to-get-better-answers-
from-chatgpt
[7] https://analyticahouse.com/blog/a-dive-into-prompt-engineering-2
[8] https://academy.constructor.org/blog/top-chatgpt-prompt-engineering-patterns-
for-life-and-business-productivity

Beyond the "Tree of Thoughts" and "Chain of Thoughts" prompting strategies, there
are several other advanced prompting techniques that can be used to craft better
responses from large language models (LLMs). Here are some of them:

1. **Self Consistency**: This technique involves using the model's own responses as
context to guide its future responses. It helps in maintaining the consistency of
the model's responses over a sequence of prompts[1][7].

2. **ReAct**: This is another advanced prompting technique, although the search


results do not provide detailed information about it[1][7].

3. **Zero-Shot and Few-Shot Prompting**: Zero-shot prompting refers to simply


asking a question or presenting a task to an LLM without providing any examples of
the desired output. In contrast, few-shot prompting involves providing a few
examples of the desired output along with the task or question. These techniques
can be useful in situations where you have limited examples or none at all[7].

4. **General Knowledge Prompting**: This technique involves using prompts that


leverage the model's general knowledge to generate responses. It can be
particularly useful when dealing with topics that require a broad understanding of
various subjects[7].

5. **Prompting by Instruction**: This approach involves putting the instructions at


the beginning of the prompt and using clear markers to separate instructions and
responses. It can be particularly useful when you want the model to perform a
specific task or answer in a specific format[5].

6. **Prompting by Example**: This approach involves providing the model with


examples of the desired output. It can be particularly useful when you want the
model to mimic a specific style or format[5].

7. **Persona Pattern**: This technique involves crafting prompts that embody a


specific persona, which can guide the model's tone, style, and content of the
responses[3].

8. **Flipped Interaction Pattern**: This technique involves flipping the roles in


the interaction, such as making the model the questioner instead of the respondent.
This can lead to more engaging and dynamic interactions[3].

9. **Question Refinement**: This technique involves refining the question or task


to make it more specific or detailed, which can help in eliciting more precise and
relevant responses from the model[3].

10. **Specify Output Format**: This technique involves explicitly specifying the
desired output format in the prompt. This can be particularly useful when you want
the model to generate responses in a specific format, such as a list, a table, or a
specific document format[4].

Remember, crafting a successful prompt often involves a trial-and-error process,


and different LLMs may interpret the same prompt differently. Therefore, it's
important to experiment with different prompts and gather feedback to continuously
improve the quality of the responses[1][2].

Citations:
[1] https://www.hostinger.com/tutorials/ai-prompt-engineering
[2] https://www.mlq.ai/prompt-engineering-advanced-techniques/
[3] https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/advanced-
prompt-engineering
[4]
https://www.reddit.com/r/ArtificialInteligence/comments/18i7v3k/learn_advanced_prom
pt_engineering_techniques/?rdt=61726
[5]
https://www.reddit.com/r/PromptEngineering/comments/141fwmi/awesome_list_of_prompt_
engineering_techniques/?rdt=51685
[6] https://www.mercity.ai/blog-post/advanced-prompt-engineering-techniques
[7] https://www.kdnuggets.com/some-kick-ass-prompt-engineering-techniques-to-boost-
our-llm-models
[8] https://www.promptingguide.ai

Prompt engineering is the practice of designing and refining prompts—questions or


instructions—to elicit specific responses from AI models, particularly large
language models (LLMs) like GPT-3 or GPT-4[2]. The goal is to guide the AI model
towards a specific output, which can be achieved by using different prompt
frameworks[1]. Here are 20 innovative prompt frameworks for advanced prompt
engineering:

1. **APE (Action, Purpose, Expectation)**: This framework guides the AI to generate


a response that includes an action, its purpose, and the expected outcome. For
example, "As a digital marketing expert, suggest a strategy (Action) to increase
our website's organic traffic (Purpose). I expect a detailed plan with specific SEO
techniques (Expectation)"[1].

2. **RTF (Role, Task, Format)**: This framework specifies the role of the AI, the
task it needs to perform, and the format of the expected output. For example, "As a
business analyst (Role), analyze the current market trends (Task) and provide a
detailed report in bullet points (Format)"[9].

3. **Chain of Thought (CoT)**: This technique provides the LLM with a sequence of
prompts, improving its reasoning abilities[5].

4. **RISEN (Role, Input, Settings, Expectation, Nudge)**: This framework is similar


to RTF but includes settings and a nudge to guide the AI's tone and style[6].

5. **RHODES (Role, How, Output, Do, Examples, Settings)**: This framework is an


extension of RISEN, with 'Do' for the task and 'Examples' for providing sample
outputs[6].

6. **Contextual Explanation Framework**: This framework is used when the AI needs


to provide explanations in a specific context[7].

7. **Specific Scenario Framework**: This framework is used when the AI needs to


respond to a specific scenario[7].

8. **Compare and Contrast Framework**: This framework is used when the AI needs to
compare and contrast two or more items[7].

9. **Question-Answer Framework**: This framework is used when the AI needs to


answer a specific question[7].

10. **Multi-Turn Conversation Framework**: This framework is used when the AI needs
to engage in a conversation that involves multiple turns[7].
11. **Role-Play Framework**: This framework is used when the AI needs to play a
specific role in a scenario[7].

12. **Problem-Solution Framework**: This framework is used when the AI needs to


provide a solution to a specific problem[7].

13. **Debate Framework**: This framework is used when the AI needs to engage in a
debate on a specific topic[7].

14. **Historical Context Framework**: This framework is used when the AI needs to
provide information in a historical context[7].

15. **Personalization Framework**: This framework is used when the AI needs to


provide personalized responses[7].

16. **Future Scenario Framework**: This framework is used when the AI needs to
predict or discuss future scenarios[7].

17. **Instruction Framework**: This framework is used when the AI needs to provide
instructions on how to do something[7].

18. **Exploration Framework**: This framework is used when the AI needs to explore
a topic in depth[7].

19. **Storytelling Framework**: This framework is used when the AI needs to tell a
story[7].

20. **AARRR (Acquisition, Activation, Retention, Referral, Revenue) Framework**:


This framework is used when the AI needs to craft a detailed marketing campaign[4].

Each of these frameworks serves a unique purpose and can be used to guide the AI to
generate more accurate, relevant, and engaging outputs. The choice of framework
depends on the specific task at hand and the desired output[1][2][3][4][5][6][7].

Citations:
[1] https://www.servicedeskinstitute.com/ai-powered-service-desk-we-tested-best-ai-
prompt-frameworks/
[2] https://www.datacamp.com/blog/what-is-prompt-engineering-the-future-of-ai-
communication
[3] https://www.linkedin.com/pulse/exploring-different-prompt-frameworks-
applications-ahmed-albadri-kwj9f
[4] https://www.linkedin.com/pulse/50-chatgpt-prompts-grow-your-business-save-you-
hours-work-anyaegbu
[5] https://www.mercity.ai/blog-post/advanced-prompt-engineering-techniques
[6] https://www.thepromptwarrior.com/p/5-prompt-frameworks-level-prompts
[7] https://dataguy.in/prompt-engineering-frameworks/
[8] https://www.linkedin.com/pulse/deep-dive-advanced-prompt-engineering-chatgpt-
russell-thompson-pwycc
[9] https://s3.amazonaws.com/kajabi-storefronts-production/file-uploads/sites/
2147628405/themes/2154044689/downloads/10e41-01f-07d-0bbc-1aa0408e66ac_GetGoing_-
_ChatGPT_Cheat_Sheet_-_97.pdf
[10] https://www.semrush.com/blog/chatgpt-prompts/
[11] https://www.hostinger.com/tutorials/ai-prompt-engineering
[12] https://www.linkedin.com/pulse/mastering-generative-ai-prompt-framework-your-
path-debnath-mba-pmp
[13] https://www.techtarget.com/searchenterpriseai/feature/Compare-prompt-
engineering-tools
[14] https://www.altexsoft.com/blog/prompt-engineering/
[15] https://guide.flowgpt.com/engineering/1basics/3basic-framework
[16] https://liatbenzur.com/2024/01/01/ai-prompt-frameworks-limitations/
[17] https://www.techtarget.com/searchenterpriseai/definition/prompt-engineering
[18] https://www.open.ac.uk/libraryservices/documents/advanced-evaluation-using-
prompt.pdf
[19] https://www.factspan.com/blogs/advanced-prompt-engineering-with-chatgpt-
frameworks/
[20] https://www.leewayhertz.com/prompt-engineering/
[21] https://beebom.com/best-chatgpt-prompts/
[22] https://www.linkedin.com/pulse/mastering-advanced-prompt-engineering-cot-tot-
ai-maurice-bretzfield-eqz9f

Here are some highly effective prompts for ChatGPT that you can use as a reference:

1. **Raindrop Journey**: Imagine you are a raindrop falling from the sky during a
thunderstorm. Describe your journey from the moment you form in the cloud to the
moment you hit the ground. What do you see, feel, and experience? [1]

2. **Toy in the Attic**: You are a toy that has been left behind in an attic for
decades. Narrate your feelings, memories of playtimes past, and your hopes of being
rediscovered. [1]

3. **Audience Consideration**: Consider your audience when crafting prompts. For


example, if you're writing a report, consider the background and interests of your
readers. This will help you tailor the content to their needs and preferences. [5]

4. **Context Provision**: Provide contextual details to help ChatGPT understand the


specific scenario or context. This will enable it to provide more accurate
responses. Include information like background info, specific facts, or user
preferences. [2]

5. **Role Assignment**: Assign a role to ChatGPT, such as a mentor, guide, or


expert in a specific field. This will help you get more relevant and focused
responses. [3]

6. **Clear and Accurate Task**: Give a clear, descriptive, and accurate task to
ChatGPT. This will help it understand your expectations and deliver the desired
output. [3]

7. **Examples and Constraints**: Provide examples of the desired output and create
rules or constraints to guide ChatGPT's response. This will help ensure that the
output aligns with your expectations. [3]

Remember that crafting effective prompts is an iterative process. Be prepared to


make changes and adjustments based on the output you receive. By following these
strategies, you can maximize the potential of ChatGPT and get more relevant and
accurate responses.

Citations:
[1] https://www.zdnet.com/article/how-to-write-better-chatgpt-prompts/
[2] https://www.semrush.com/blog/chatgpt-prompts/
[3] https://www.forbes.com/sites/jodiecook/2023/06/26/how-to-write-effective-
prompts-for-chatgpt-7-essential-steps-for-best-results/
[4] https://github.com/f/awesome-chatgpt-prompts
[5] https://community.openai.com/t/a-guide-to-crafting-effective-prompts-for-
diverse-applications/493914

You might also like