ChatGPT Prompt Engineering – Part 2 (Modifiers)

ChatGPT Prompt Engineering – Part 2 (Modifiers)

0 Comments

In the first part of this series, we provided an overview of ChatGPT. We also explored the optimal application of basic prompt priming to achieve more effective responses from ChatGPT.

This post is specifically designed for programmers interested in learning how to effectively use modifiers to craft prompts. If you haven’t yet gone through Part 1, I recommend completing it first.

Moving forward in this series, we will apply these prompt techniques to generate code, such as static front-end, Single Page Applications, and Spring Boot RESTful APIs.

ChatGPT Modifiers

In ChatGPT prompts, modifiers play a crucial role in providing additional context to the model. They help the model understand the subtleties of the user’s input, enabling it to deliver more accurate and relevant responses.

Modifiers can take various forms, including adjectives, adverbs, prepositions, conjunctions, and more.

These modifiers can also alter the degree or intensity of a word or phrase, using intensifiers like “very,” “extremely,” or “totally,” or mitigators like “somewhat,” “a little,” or “kind of.”

By incorporating these modifiers, you can convey your level of certainty, enthusiasm, or doubt regarding the information being conveyed.

Types of Modifiers in ChatGPT Prompts

Throughout this section, we will explore different types of modifiers and how they can enhance your prompts. The modifiers we will discuss are:

  • Adjectives
  • Adverbs
  • Prepositions
  • Conjunctions
  • Pronouns
  • Articles
  • Numeric
  • Qualifiers
  • Negatives
  • Degree

Adjectives

Adjectives are words that describe or modify nouns. They convey qualities, characteristics, or attributes. Examples of adjectives include “happy,” “sad,” “excited,” “blue,” “large,” and “small.”

Incorporating adjectives into prompts helps specify the desired tone or mood of the response. For instance:

 Write a heartwarming story about a brave little girl who overcomes her fears.

Here, the adjective “heartwarming” modifies the noun “story,” indicating that the desired response should evoke positive emotions in the reader.

Let’s submit and see what ChatGPT generates.

Let’s move on to another example:

Describe a stunning sunset over the ocean, with the colors of the sky melting into the water."

 

In this prompt, the adjective “stunning” modifies the noun “sunset,” emphasizing that the desired response should vividly depict a beautiful or impressive scene.

By utilizing adjective modifiers in ChatGPT prompts, you can guide the model to generate responses that align with your intended tone, mood, or atmosphere.

Adverbs

Adverbs modify verbs, adjectives, or other adverbs. They describe how an action is performed, when it occurs, or to what extent. Examples of adverbs include “quickly,” “slowly,” “loudly,” “always,” and “never.”

Incorporating adverbs into prompts can influence the pace, intensity, or timing of the response.

For example:

Write a story about a detective who solves a mystery quickly and efficiently.

n this prompt, the adverb “quickly” modifies the verb “solves,” indicating that the desired response should feature a detective who swiftly resolves the mystery. Let’s submit it and observe ChatGPT’s output.

By utilizing adverb modifiers in ChatGPT prompts, you can guide the model to generate responses that align with your desired pace, intensity, or mood.

Prepositions

Prepositions establish relationships between nouns or pronouns and other words in a sentence. They indicate location, time, direction, manner, or other aspects of relationships. Examples of prepositions include “in,” “on,” “with,” “at,” “by,” and “through.”

Let’s see an example prompt:

Write a story about a group of friends who embark on an adventure through the jungle.

In this prompt, the preposition “through” modifies the noun “jungle,” indicating that the desired response should feature the friends traveling through the jungle as part of their adventure.

Let’s look at another prompt:

 Describe a painting of a landscape with a river running beside a towering mountain.

In this prompt, the preposition “beside” modifies the noun “river”. This indicates that the desired response should describe a river that is located next to a mountain in the painting.

By using preposition modifiers in ChatGPT prompts, you can guide the model to generate responses that include specific details and relationships between objects or concepts.

Conjunctions

Conjunctions are words that connect words, phrases, or clauses in a sentence. They can show relationships such as addition, contrast, comparison, or cause and effect. Examples of conjunctions include “and,” “but,” “or,” “because,” “although,” and “if.”

Using conjunctions in prompts can guide the model to generate responses that reflect specific logical or relational connections.

Here is an example:

Write a dialogue between two old friends who reconnect after many years, and reminisce about their shared past.

In this prompt, the conjunction “and” connects the two actions of reconnecting and reminiscing, indicating that the desired response should feature both elements.

Another example is:

 Describe a futuristic city where technology and nature coexist, but sometimes clash in unexpected ways.

In this prompt, the conjunction “but” connects the contrasting ideas of technology and nature coexisting, but sometimes clashing, indicating that the desired response should include both elements.

By using conjunction modifiers in ChatGPT prompts, you can guide the model to generate responses that reflect specific logical or relational connections between ideas or concepts.

Pronouns

people, places, things, or ideas. Examples of pronouns include “he,” “she,” “it,” “they,” “this,” and “that.” Incorporating pronouns in prompts helps specify the subject or object of the response.

Consider this example prompt:

Write a story about a person who discovers a secret that changes their life forever.

In this prompt, the pronoun “their” is used to indicate that the desired response should focus on the person who discovers the secret, without specifying their gender.

Here’s another example:

Describe a landscape that takes your breath away, with its majestic mountains and sparkling lakes.

In this prompt, the pronoun “your” is used to indicate that the desired response should be written from the perspective of the reader or the writer, who is experiencing the landscape firsthand.

By employing pronoun modifiers in ChatGPT prompts, we can create more engaging and personalized queries that encourage the model to generate captivating and pertinent responses.

Articles

Articles are words that indicate the presence or absence of a noun. There are two types of articles: “a” and “an” (used before singular countable nouns) and “the” (used before singular or plural countable nouns or uncountable nouns). Using articles in prompts can help specify the quantity or specificity of the response.

Here is an example:

Write a story about a girl who discovers a magical flower in her backyard.

In this prompt, the indefinite article “a” is used before the noun “girl” to indicate that the desired response should feature any girl who discovers the magical flower, rather than a specific girl.

Another example prompt is this.

Describe the experience of swimming in the ocean on a sunny day.

In this prompt, the definite article “the” is used before the noun “experience” to indicate that the desired response should feature a specific experience of swimming in the ocean on a sunny day.

By using article modifiers in ChatGPT prompts, we can create prompts that are either specific or general, depending on the desired response.

Numeric

Numeric modifiers are numbers used in ChatGPT prompts to specify a quantity or amount or to provide a specific value or range for the desired response. These modifiers can be used with various types of prompts, such as prompts for descriptions, explanations, stories, and more.

An example is this.

Describe three ways to reduce stress in your daily life.

In this prompt, the numeric modifier “three” is used to indicate that the desired response should feature three specific ways to reduce stress.

Let’s see the output.

Let’s have another example:

 Explain the two main types of rock formations and how they are created.

In this prompt, the numeric modifier “two” is used to indicate that the desired response should feature an explanation of the three specific main types of rock formations and how they are created.

Here is the output.

By using numeric modifiers in ChatGPT prompts, we can create prompts that are more specific and focused, and that require a certain quantity or amount of information in the desired response.

Qualifiers

Qualifiers are modifiers in ChatGPT prompts that are used to modify the certainty or probability of a statement or question. They can be used to express doubt, uncertainty, or ambiguity, or to express a degree of certainty or probability.

 An example prompt that uses a qualifier modifier is this.

What are some potential benefits and drawbacks of using artificial intelligence in healthcare?

In this prompt, the qualifier “potential” is used to indicate that the desired response should feature possible benefits and drawbacks of using artificial intelligence in healthcare, rather than definitive ones.

Another prompt using the qualifier modifier is this.

How likely is it that climate change will have a significant impact on the planet in the next 50 years?

 

In this prompt, the qualifier “likely” is used to indicate that the desired response should provide an assessment of the probability or likelihood that climate change will have a significant impact on the planet in the next 50 years.

By using qualifiers as modifiers in ChatGPT prompts, we can create prompts that allow for a range of possible responses and reflect the complexity and ambiguity of real-world situations.

Negative

Negative modifiers are a type of modifier in ChatGPT prompts that express negation or denial.

These modifiers modify a statement or question by expressing the opposite of the intended meaning to express skepticism, doubt, or disagreement.

 An example prompt with a negative modifier is this.

 What are some arguments against the use of genetically modified organisms in agriculture?

In this prompt, the negative modifier “against” indicates that the desired response should feature reasons why the use of genetically modified organisms in agriculture is not desirable.

 Another example prompt with a negative modifier is this.

 What are some reasons why people don't exercise regularly?

In this prompt, the negative modifier “don’t” indicates that the response should feature the nonmotivating factors for not having the habit of exercising regularly.

As we saw, by using negative modifiers as modifiers in ChatGPT prompts, we can create prompts that allow for a range of perspectives and opinions on a given topic.

Degree

Degree modifiers are a type of modifier in ChatGPT prompts that modify the intensity or degree of an adjective or adverb. Such modifiers describe the level or extent of a quality or condition.

An example prompt using a degree modifier is this.

 How extremely important is sleep for overall health?

In this prompt, the degree modifier “extremely” modifies the adjective “important” to express a high degree of importance.

Another prompt using a degree modifier is this.

How relatively difficult is it to learn a new language?

In this prompt, the degree modifier “relatively” modifies the adjective “difficult” to express a moderate level of difficulty.

Summary

Modifiers such as adjectives, adverbs, prepositions, and conjunctions play a crucial role in shaping prompts for ChatGPT. They allow you to provide additional context, specify desired qualities, or establish relationships between elements in the generated response.

When crafting prompts, consider the tone, mood, atmosphere, or specific details you want the response to include. By leveraging the power of modifiers, you can enhance the quality and relevance of the generated content.

In the next part of this series, we will explore additional types of modifiers, including pronouns, articles, numeric modifiers, qualifiers, negatives, and degree modifiers, to further refine and optimize your prompts. Stay tuned!


Spring AI: Beginner to Guru

Learn how to use Spring AI to integrate AI into your Spring Framework Applications!

Spring AI

About SFG Contributor

Staff writer account for Spring Framework Guru

    You May Also Like

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.