#Examples of good prompts vs non efficient prompts

1 messages · Page 1 of 1 (latest)

zenith basalt
#

Examples of good prompts vs non efficient prompts

deft furnaceBOT
#

Hi @zenith basalt. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Good prompts are those that effectively guide the AI model to produce the desired output. They can be crafted using various strategies such as instructions, completions, and demonstrations. Here are some examples:

  1. Instruction Prompts: These prompts tell the model exactly what you want. For instance, if you want to extract the author's name from a quote, you can use an instruction like this:
Extract the name of the author from the quotation below.

“Some humans theorize that intelligent species go extinct before they can expand into outer space. If they're correct, then the hush of the night sky is the silence of the graveyard.”
― Ted Chiang, Exhalation

The model's output for this prompt would be Ted Chiang (source (https://github.com/openai/openai-cookbook/blob/main/articles/how_to_work_with_large_language_models.md)).

  1. Completion Prompts: These prompts induce the model to complete the beginning of what you want. For example:
“Some humans theorize that intelligent species go extinct before they can expand into outer space. If they're correct, then the hush of the night sky is the silence of the graveyard.”
― Ted Chiang, Exhalation

The author of this quote is

The model's output for this prompt would be Ted Chiang (source (https://github.com/openai/openai-cookbook/blob/main/articles/how_to_work_with_large_language_models.md)).

  1. Demonstration Prompts: These prompts show the model what you want it to do. This approach is sometimes called few-shot learning, as the model learns from a few examples provided in the prompt. For example:
Quote:
“When the reasoning mind is forced to confront the impossible again and again, it has no choice but to adapt.”
― N.K. Jemisin, The Fifth Season
Author: N.K. Jemisin
#

Quote:
“Some humans theorize that intelligent species go extinct before they can expand into outer space. If they're correct, then the hush of the night sky is the silence of the graveyard.”
― Ted Chiang, Exhalation
Author:

The model's output for this prompt would be `Ted Chiang` (**source** (<https://github.com/openai/openai-cookbook/blob/main/articles/how_to_work_with_large_language_models.md>)).

Non-efficient prompts are those that do not guide the model effectively towards the desired output. For instance, a prompt that is too vague or does not provide enough context may lead to inaccurate or irrelevant outputs. Unfortunately, the provided extracts do not include specific examples of non-efficient prompts. However, it's generally recommended to avoid prompts that are too short, ambiguous, or lack clear instructions or context.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
#

@zenith basalt kapa.ai is still learning and improving, please let us know how it did by reacting below

zenith basalt
#

@deft furnace can we mix all strategies into 1 ?

deft furnaceBOT
#

Let me check the knowledge base for you. One moment! :books:

#

Yes, it is possible to mix different strategies into one when crafting prompts for AI models. The key is to understand the strengths and limitations of each strategy and use them in a way that maximizes the effectiveness of the prompt.

For instance, you can start with an instruction to set the context and expectations, then provide a few demonstrations to guide the model's behavior, and finally use a completion to specify the exact output you want. Here's an example:

I will provide you with a quote and I want you to extract the author's name. Here are a few examples:

Quote: “When the reasoning mind is forced to confront the impossible again and again, it has no choice but to adapt.” ― N.K. Jemisin, The Fifth Season
Author: N.K. Jemisin

Quote: “Some humans theorize that intelligent species go extinct before they can expand into outer space. If they're correct, then the hush of the night sky is the silence of the graveyard.” ― Ted Chiang, Exhalation
Author: Ted Chiang

Now, for the following quote, please extract the author's name:

Quote: “It's the questions we can't answer that teach us the most. They teach us how to think. If you give a man an answer, all he gains is a little fact. But give him a question and he'll look for his own answers.” ― Patrick Rothfuss, The Wise Man's Fear
Author:

In this example, the first paragraph is an instruction, the next two paragraphs are demonstrations, and the final paragraph is a completion. This combination of strategies can help guide the model towards the desired output.

#

However, it's important to note that the effectiveness of mixing strategies can depend on the specific task and the capabilities of the AI model. Therefore, it's recommended to experiment with different combinations of strategies and tactics to find what works best for your use case (source (https://platform.openai.com/docs/guides/prompt-engineering)).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: