0% found this document useful (0 votes)
22 views

Prompt Engr Module 6

The document discusses improving prompts for AI generative apps. It explains that prompts should be clear, concise, specific, and avoid negative words or jargon. Tips are provided for writing good prompts along with examples of good and bad prompts. Additional factors for improving prompts are also covered such as prompt length, complexity, context, and experimentation.

Uploaded by

enonimoussse
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Prompt Engr Module 6

The document discusses improving prompts for AI generative apps. It explains that prompts should be clear, concise, specific, and avoid negative words or jargon. Tips are provided for writing good prompts along with examples of good and bad prompts. Additional factors for improving prompts are also covered such as prompt length, complexity, context, and experimentation.

Uploaded by

enonimoussse
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Improving Prompts

1
Introduction to Prompt Engineering

Module 006 – Improving Prompts

At the end of this module you are expected to:


1. Understand the importance of writing clear and concise prompts.
2. Learn how to write prompts that are specific, relevant, and avoid jargon.

Improving Prompts

Prompts are the instructions that you give to an AI generative app. They tell the app what you want it to
do. The better your prompts are, the better the results that you will get from the app.

LLMs are trained on massive datasets of text and code. This data is used to teach the LLM how to
generate text, translate languages, write different kinds of creative content, and answer your questions in
an informative way.

When you give an LLM a prompt, it first processes the prompt by breaking it down into individual words
and phrases. It then looks for patterns in these words and phrases. These patterns are used to generate a
response that is consistent with the patterns that the LLM has learned.

For example, if you give the LLM the prompt "Write me a poem about a cat", it will first break the prompt
down into the words "write", "me", "poem", and "cat". It will then look for patterns in these words. For
example, it will notice that the words "write" and "poem" are often used together. This pattern tells the
LLM that you are asking it to generate a poem.

The LLM will then use this pattern to generate a response that is consistent with it. For example, it might
generate the following poem:

The cat is a furry creature


With big eyes and a long tail.
It loves to play and chase mice
And sleep in the sun all day.

Course Module
Improving Prompts
2
Introduction to Prompt Engineering

This poem is consistent with the pattern that the LLM has learned. The words "cat", "furry", "eyes", "tail",
"play", "mice", "sleep", and "sun" are all words that are often associated with cats.

The LLM is able to process prompts literally because it is trained on a massive dataset of text and code.
This dataset contains many different patterns that the LLM can learn. When you give the LLM a prompt, it
can use the patterns that it has learned to generate a response that is consistent with the prompt.

However, it is important to note that LLMs are not perfect. They can sometimes make mistakes, especially
if the prompt is not clear or concise. Additionally, LLMs are still under development, and their capabilities
are constantly evolving. As LLMs continue to develop, they will become better at processing prompts
literally.

Tips for improving your prompts:


 Be clear and concise. Avoid using jargon or technical terms that the app may not understand.
 Be specific about what you want the app to do. The more specific you are, the better the app will
be able to understand you.
 Avoid using negative words. Negative words can be confusing for the app.
 Use keywords that are relevant to the task that you want the app to perform.
 Experiment with different prompts to see what works best for you and for the app.

Examples of good prompts:


 Write me a poem about a cat.
 Translate this sentence from English to Spanish.
 What is the capital of France?
 Come up with a new business idea.

Here are some examples of bad prompts:


 Do not write me a poem about a cat.
 Translate this code from Python to Java, but do not change the meaning of the code.
 What is the capital of France, but not Paris.

Course Module
Improving Prompts
3
Introduction to Prompt Engineering

By following these tips, you can improve your prompts and get better results from AI generative apps.

Additional considerations when improving prompts:


 The length of the prompt: Longer prompts can be more specific, but they can also be more difficult
for the app to understand.
 The complexity of the prompt: More complex prompts can be more difficult for the app to
understand, but they can also produce more creative results.
 The context of the prompt: The context of the prompt can help the app to understand what you are
asking for. For example, if you are asking the app to write a poem about a cat, it would be helpful
to provide the app with some information about cats, such as their physical appearance, behavior,
or habitat.
 Use keywords: When writing a prompt, it is important to use keywords that are relevant to the
task that you want the app to perform. For example, if you want the app to write a poem about a
cat, you would use the keywords "cat", "poem", and "furry".
 Use negative words sparingly: Negative words can be confusing for AI generative apps. For
example, the prompt "Do not write me a poem about a cat" is not clear because it is not clear what
the app should do. A better prompt would be "Write me a poem about something other than a cat."
 Use examples: If possible, provide examples of the kind of output that you are looking for. This will
help the app to understand what you want. For example, if you want the app to write a poem
about a cat, you could provide the app with an example of a poem about a cat.
 Use multiple prompts: If you are not getting the results that you want from a single prompt, try
using multiple prompts. This will give the app more information to work with and may help it to
produce better results.
 Experiment: The best way to learn how to improve your prompts is to experiment. Try different
types of prompts and see what works best for you and for the app.
 The structure of the prompt: The structure of the prompt can affect how the app understands it.
For example, a question-and-answer prompt is easier for the app to understand than a statement-
based prompt.
 The tone of the prompt: The tone of the prompt can also affect how the app understands it. For
example, a friendly and encouraging prompt is more likely to produce positive results than a
negative or demanding prompt.
 The data that the app has been trained on: The app's ability to understand your prompts will
depend on the data that it has been trained on. If the app has been trained on a lot of data, it will
be better able to understand your prompts.

Course Module
Improving Prompts
4
Introduction to Prompt Engineering

References and Supplementary Materials


Books and Journals
1. https://www.researchgate.net/publication/360310862_Prompt_Engineering_for_Tex
t-Based_Generative_Art
2. https://arxiv.org/pdf/2107.13586.pdf
3. Oppenlaender, Jonas. (2022). Prompt Engineering for Text-Based Generative Art.
Online Supplementary Reading Materials
1. https://www.classcentral.com/course/chatgpt-for-developers-180241
2. https://www.flowrite.com/blog/introduction-to-prompt-engineering
3. https://docs.cohere.com/docs/prompt-engineering
4. https://solutions.yieldbook.com/content/dam/yieldbook/en_us/documents/publicat
ions/using-chatgpt-with-prompt-engineering.pdf
Online Instructional Videos
1. https://youtu.be/dOxUroR57xs?feature=shared
2. https://youtu.be/JTxsNm9IdYU?feature=shared
3. https://youtu.be/BP9fi_0XTlw?feature=shared

Course Module

You might also like