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

PromptingA - M1

Uploaded by

Starry Knight
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

PromptingA - M1

Uploaded by

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

Introduction to Prompt Engineering

1
Introduction to Prompt Engineering

Module 001 –Introduction to Prompt


Engineering

At the end of this module you are expected to:


1. Understand the basic concepts of prompt engineering and how it can be
used to control the output of large language models.
2. Write effective prompts for large language models, using a variety of
techniques.

Introduction to Prompt Engineering

Prompt engineering is the process of crafting instructions that guide the output of a large language
model (LLM). It is a critical skill for anyone who wants to use LLMs to generate text, answer
questions, or create creative content.

Prompts can be as simple as a few words or as complex as a paragraph. They can be written in
natural language or in a more technical format. The best prompts are clear, concise, and specific.
They should also be relevant to the task at hand.

Examples of prompts:
 Simple prompt: Write a poem about a cat.
 Complex prompt: Generate a 3D model of a cat based on the following description: A tabby
cat with green eyes and a white belly.
 Technical prompt: Write a prompt that will generate a poem about a cat using the Bard API.

How these prompts work:


 The simple prompt is clear and concise. It tells the LLM exactly what to do: write a poem
about a cat.
 The complex prompt is more detailed. It provides additional information about the cat, such
as its color and markings. This helps the LLM to generate a more accurate and realistic
model.
 The technical prompt is specific. It tells the LLM which API to use and how to format the
prompt. This ensures that the LLM will generate the desired output.

Course Module
Introduction to Prompt Engineering
2
Introduction to Prompt Engineering

 Prompt engineering is an ongoing process. As you learn more about LLMs, you will be able to
write better prompts. You can also experiment with different techniques to improve the
effectiveness of your prompts.

Tips for writing effective prompts:


 Use clear and concise language. Avoid using jargon or technical terms that the LLM may not
understand.
 Be specific about what you want the LLM to do. The more specific you are, the better the LLM
will be able to understand what you are asking for.
 Use keywords and phrases that are relevant to the task at hand. This will help the LLM to
focus on the most important information.
 Avoid using negative language. For example, instead of saying "Don't write about dogs," say
"Write about cats."
 Experiment with different techniques to improve the effectiveness of your prompts. Try
using different keywords, phrases, and sentence structures. You can also try using different
LLMs to see which one produces the best results for your specific task.

Prompt engineering is a powerful tool that can be used to unleash the creativity of LLMs. By
learning how to write effective prompts, you can use LLMs to generate text, answer questions, and
create content that is both informative and engaging.

Additional examples of prompts:


 Write a story about a robot who falls in love with a human.
 Generate a list of 10 things that I should do to improve my writing skills.
 Answer the question: What is the meaning of life?
 Create a poem that describes the beauty of a sunset.

When an LLM receives a prompt, it first breaks it down into individual words and phrases. It then
uses its massive dataset of text and code to find patterns that match the prompt. These patterns can
be anything from the meaning of individual words to the structure of entire sentences.

Once the LLM has found the relevant patterns, it uses them to generate a response. The response is
typically a piece of text, but it can also be a 3D model, a painting, or even a song.

The quality of the response depends on a number of factors, including the quality of the prompt, the
size and complexity of the LLM's dataset, and the LLM's training algorithm.

Course Module
Introduction to Prompt Engineering
3
Introduction to Prompt Engineering

More detailed explanation of how LLMs process prompts:


 The LLM breaks the prompt down into individual words and phrases.
 The LLM uses its massive dataset of text and code to find patterns that match the prompt.
 The LLM uses these patterns to generate a response.
 The response is typically a piece of text, but it can also be a 3D model, a painting, or even a
song.
 The quality of the response depends on a number of factors, including the quality of the
prompt, the size and complexity of the LLM's dataset, and the LLM's training algorithm.

Additional details about each of these steps:


 Breaking the prompt down into individual words and phrases: This is the first step in
processing a prompt. The LLM needs to understand the meaning of each word and phrase in
order to find the relevant patterns in its dataset.

 Finding patterns that match the prompt: This is the most important step in processing a
prompt. The LLM needs to find patterns that are relevant to the task at hand. For example, if
the prompt is "Write a poem about a cat," the LLM needs to find patterns that are related to
cats, poems, and writing.

 Generating a response: Once the LLM has found the relevant patterns, it uses them to
generate a response. The response is typically a piece of text, but it can also be a 3D model, a
painting, or even a song. The quality of the response depends on how well the LLM was able
to find the relevant patterns and how well it was able to use those patterns to generate a
creative and informative response.

Course Module
Introduction to Prompt Engineering
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