10 Essential Prompt Engineering Criteria to Kickstart Your Success
Tags: development, tips, chatgpt, productivity
Published: 2023-05-30 02:06:06

---
title: 10 Essential Prompt Engineering Criteria to Kickstart Your Success
published: true
date: 2023-05-29 11:15:00 UTC
tags: development, tips, chatgpt, productivity
canonical_url: https://www.syncfusion.com/blogs/post/10-prompt-engineering-criteria.aspx
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eqodzk1wj7wkwut00w6f.png
---
[Prompt engineering](https://en.wikipedia.org/wiki/Prompt_engineering "Wikipedia: Prompt engineering") is a vital aspect of working with large language models like [ChatGPT](https://en.wikipedia.org/wiki/ChatGPT "ChatGPT"). It involves creating effective prompts that lead to accurate and useful responses. Prompts are questions or instructions given to a large language model (LLM) to obtain a specific output.

Whether you are a software developer, data analyst, or business professional, understanding prompt engineering can help you get the most out of your LLM.

LLMs are powerful machine learning models trained on vast amounts of text data. They produce high-quality text responses that are often indistinguishable from human-written responses. These models can perform various tasks such as content generation, content classification, and question answering.

## Why should prompts be effective?

Effective prompts are crucial to get the best result from LLMs. The text input guides the model’s response in the right direction and allows us to specify the information we need. A well-crafted prompt with the right keywords and conditions can extract specific information from the model, such as the capital of a country.

Conversely, a poorly constructed prompt can lead to inaccurate or irrelevant information. Therefore, it is essential to structure the prompt thoughtfully, choosing the right words and phrases to direct the model’s response.

By doing so, we can ensure we receive the desired information from the LLM.

## Criteria for good prompts

Let’s discuss the top 10 characteristics of a good prompt:

### 1. Relevancy

The prompt given to an LLM should be clear and specific, providing enough information to it to generate the desired output. Ambiguity in the prompt can result in inaccurate or irrelevant responses.

### 2. Context

The context in prompts refers to information included in the request that provides a better framework for producing the desired output. Context can be any relevant details, such as keywords, phrases, sample sentences, or even paragraphs, that inform the LLM. Providing context to your prompts allows the model to generate more accurate and relevant responses.

### 3. Tailored to the target audience

The prompt should be tailored to the target audience to ensure the generated text is appropriate and relevant. For instance, prompts designed to produce technical writing should differ from those designed for creative writing.

### 4. Designed for a specific use case

The prompt should be created with a specific use case in mind. Include details about where and why you are going to publish the material. These will influence the prompt’s tone, language, and style, therefore affecting the output.

### 5. Include high-quality training data

The quality of the generated output is directly related to the quality of any training data included in the prompt. High-quality training data can help ensure that the LLM generates accurate and relevant output based on the prompt.

### 6. Proper wording

The wording in the prompt is essential because it plays a crucial role in determining the quality and accuracy of the generated output. The wording of the prompt should be clear, specific, and unambiguous to ensure that the generated text is relevant and appropriate.

#### Levels of improving the wording

Let’s see some examples of improving the wording in prompts to get accurate results:

- **Vague wording** : Generate a program that takes input and produces output.  
  
This prompt should be more specific and provide specific information about the expected input or output. Otherwise, it will lead to irrelevant or inaccurate responses from the model.
- **Clear wording** : Write a C# program that calculates the average of three numbers and displays the result.  
  
This prompt is clear and specific, providing a clear task for the model. It includes relevant keywords, such as **C#** and **average** , to give context to the prompt.
- **Technical wording** : Develop a C# console application that implements a bubble sort algorithm on an array of integers.  
  
This prompt is tailored for a technical audience and requires the model to know C# programming concepts and algorithms. It also includes technical terms such as **console application** and **bubble sort algorithm**.
- **Creative wording** : Create a C# program that tells a story using randomly generated words.  
  
This prompt is designed for a creative writing use case and requires the model to generate imaginative and engaging text. It includes the keyword **C#** to provide a specific use case for the model.
- **Domain-specific wording** : Write a C# program that calculates the financial data for a retail store, including revenue, expenses, and profit margins.  
  
This prompt is tailored for a specific use case related to financial data analysis. It includes relevant domain-specific terms such as **revenue** , **expenses** , and **profit margins** to provide context for the model.

### 7. Apply formatting

Formatting is significant in the prompt submitted to LLMs as it can impact the generated output. Formatting your prompts with bullet points, numbered lists, and delimiters will give your prompt more potential. If the prompt is not properly formatted, it can result in unclear or incomplete information being fed into the model, leading to irrelevant or inaccurate responses. Additionally, formatting can help improve the prompt’s readability and overall quality.

### 8. Provide conditions

Conditions in prompt engineering refer to adding additional information or constraints to the prompt to guide the generated response in a specific direction. They may be specific keywords, guidelines, or instructions for the model to follow in producing content. Overall, conditions allow for greater control over the generated output and can help improve the quality and relevance of the result.

### 9. Appropriate vocabulary

Using industry-specific terminologies, jargon, or technical terms can help improve the relevance and accuracy of the generated text for a specific use case. For example, **Maui** generally means the island, but from a developer’s perspective, it means the cross-platform domain from Microsoft. So in the prompt, a developer would have to use **.NET MAUI** instead of **Maui.** However, balancing this with simplicity and clarity is important to ensure the target audience understands the generated text. Additionally, incorporating feedback from users and domain experts can help refine and improve the vocabulary used in LLM prompts.

#### **Examples** :

- Technical writing prompt: “Write a detailed **user manual** for ……….”
- Creative writing prompt: “Write a short **story** about ……….”
- Academic writing prompt: “Write a **research paper** on ……….”
- Marketing copy prompt: “Write **persuasive ad copy** for……….”

### 10. Provide a role

Assigning a role to the LLM in the prompt can help establish expectations for the generated text’s tone, language, and style, making it more consistent, professional, and ultimately useful.

## Examples

Let’s see some examples that use the prompt criteria we’ve covered. These examples all use **ChatGPT** as the LLM.

<table style="border-collapse: collapse; width: 100%;">
<tbody>
<tr>
<td style="width: 15;"><strong>Criteria</strong></td>
<td style="width: 15%;"><strong>With the criteria</strong></td>
<td style="width: 15%%;"><strong>Without the criteria</strong></td>
</tr>
<tr>
<td style="width: 15%;">Relevancy</td>
<td style="width: 15%;">
<p><strong>Write C# code to find the maximum value in an array of integers. If there are multiple maximum values, return the index of the first occurrence.</strong></p>
<p>This prompt provides relevant details about what type of array to use and how to handle cases with multiple maximum values. With this information, ChatGPT can generate more accurate code that fits the user’s request.</p>
</td>
<td style="width: 15%;">
<p><strong>Write code to find the maximum value in an array.</strong></p>
<p>This prompt needs to be more specific and provide specific instructions on what type of array to use or how to handle cases with multiple maximum values.</p>
</td>
</tr>
<tr>
<td style="width: 15%;">Context</td>
<td style="width: 15%;">
<p><strong>Write a method to add two numbers together and return the result as a formatted string, where the first parameter is the dollar amount and the second parameter is the cents.</strong></p>
<p>This prompt provides additional context that helps ChatGPT understand the problem better. By including the desired output format and specifying that the numbers represent dollars and cents, ChatGPT can generate more accurate and useful code.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/With-the-criteria-Context.png" alt="With the criteria Context" width="856" height="465" class="aligncenter size-full wp-image-117035" /></p>
</td>
<td style="width: 15%;">
<p><strong>Write a method to add two numbers together.</strong></p>
<p>This prompt is too simple and doesn’t provide any context for the problem. ChatGPT can generate code to add two numbers together, but it won’t know the method’s purpose or how it will be used in this case.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/Without-the-criteria-Context.png" alt="" width="875" height="384" class="aligncenter size-full wp-image-117037" /></p>
</td>
</tr>
<tr>
<td style="width: 15%;">Tailored to a target audience</td>
<td style="width: 15%;">
<p><strong>Write a beginner’s guide to using a software program for graphic designers.</strong></p>
<p>This prompt targets a specific audience: graphic designers who are beginners to using the software program. By providing this instruction, ChatGPT will have a better understanding of the intended audience and can tailor the guide accordingly. The prompt can be further improved by including additional details about the audience, such as their skill level or specific needs and which software program should be the topic of the guide.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/With-the-criteria-Tailored-to-a-target-audience.png" alt="With the criteria Tailored to a target audience" width="929" height="734" class="aligncenter size-full wp-image-117039" /></p>
</td>
<td style="width: 15%;">
<p><strong>Write a guide on how to use a software program.</strong></p>
<p>This prompt is too general and lacks information about the target audience. It’s difficult for ChatGPT to generate a useful guide without knowing who the guide is intended for.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/Without-the-criteria-Tailored-to-a-target-audience.png" alt="Without the criteria Tailored to a target audience" width="869" height="745" class="aligncenter size-full wp-image-117042" /></p>
</td>
</tr>
<tr>
<td style="width: 15%;">Specific use case</td>
<td style="width: 15%;">
<p><strong>Write an algorithm for a login page for a social media app that allows users to sign in with their email or phone number.</strong></p>
<p>This prompt provides a specific use case for the login page, which is the starting point for a social media app. With this information, ChatGPT can generate a procedure that lists all the necessary functionalities for a login page, such as a form for users to enter their email or phone number and password, as well as a method to verify the user’s credentials and allowing them to log in to the app.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/With-the-criteria-Specific-use-case.png" alt="With the criteria Specific use case" width="835" height="654" class="aligncenter size-full wp-image-117043" /></p>
</td>
<td style="width: 15%;">
<p><strong>Write an algorithm for a login page.</strong></p>
<p>This prompt is too general and lacks information about the intended use case. It’s easier for ChatGPT to generate code by knowing the specific use case or context for the login page.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/Without-the-criteria-Specific-use-case.png" alt="Without the criteria Specific use case" width="834" height="597" class="aligncenter size-full wp-image-117044" /></p>
</td>
</tr>
<tr>
<td style="width: 15%;">Training data</td>
<td style="width: 15%;">
<p><strong>Write code to calculate the area of a rectangle, but allow the user to input the length and width of the rectangle in either centimeters or inches. The expected code is: </strong></p>
<pre class="brush: csharp">public static double CalculateRectangleArea(double length, double width, string unit)
{
   double area = 0;
   //
   //
   //
   return area;
}</pre>
<p>This prompt includes additional training data for ChatGPT to generate code that meets the specified requirements. The training data should include examples of how to convert centimeters to inches and vice versa, as well as how to calculate the area of a rectangle with the given length and width in either unit of measurement. This information can be provided as example code snippets or written instructions that ChatGPT can use to generate the desired code.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/With-the-criteria-Training-data.png" alt="With the criteria Training data" width="938" height="1296" class="aligncenter size-full wp-image-117046" /></p>
</td>
<td style="width: 15%;">
<p><strong>Write code to calculate the area of a rectangle.</strong></p>
<p>This prompt is too simple and doesn’t include any specific training data. ChatGPT can easily generate code to calculate a rectangle’s area without additional training data, but it may not produce code in the format you were hoping for.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/Without-the-criteria-Training-data.png" alt="Without the criteria Training data" width="887" height="729" class="aligncenter size-full wp-image-117047" /></p>
</td>
</tr>
<tr>
<td style="width: 15%;">Proper wording</td>
<td style="width: 15%;">
<p><strong>Write a C# program that calculates the financial data for a retail store, including revenue, expenses, and profit margins. </strong></p>
<p>This prompt uses domain-specific wording related to financial data analysis. It includes relevant terms such as <strong>revenue</strong>, <strong>expenses</strong>, and <strong>profit margins</strong> to provide context for the model.</p>
</td>
<td style="width: 15%;">
<p><strong>Generate a program that takes input and produces output.</strong></p>
<p>This prompt is too vague and does not provide any information about the expected input or output. It can lead to irrelevant or inaccurate responses from ChatGPT.</p>
</td>
</tr>
<tr>
<td style="width: 15%;">Formatting</td>
<td style="width: 15%;">
<p><strong>Review the following aspects of the provided code:</strong></p>
<ol>
<li><strong><strong>Should meet mobile device accessibility:</strong></strong>
<ul>
<li>Screen text reader</li>
<li>Keyboard navigation</li>
<li>Color contrast Automation properties</li>
</ul>
</li>
<li><strong>Should have 100% code coverage</strong></li>
<li><strong>Should use Material theme sizing and colors</strong></li>
</ol>
<p>This prompt breaks down the review aspects into three clear points with subpoints for the first, making it easier for ChatGPT to understand the requirements and focus on each aspect separately. The prompt also uses ordered lists and proper indentation, which makes it more visually appealing and easy to read. The formatting of the prompt helps ensure that ChatGPT gets all the important details and can efficiently complete the code review.</p>
</td>
<td style="width: 15%;">
<p><strong>Please review the following code and ensure it meets all standards like accessibility, UI, and test coverage.</strong></p>
<p>This prompt lacks clarity and could benefit from more details about each standard. Providing these additional details in the form of a list gives ChatGPT a clear set of items to assess.</p>
</td>
</tr>
<tr>
<td style="width: 15%;">Conditions</td>
<td style="width: 15%;">
<p><strong>Write a C# program that calculates the sum of two user-input numbers. The program should prompt the user for input, validate that the input is numeric, and output the result with two decimal places.</strong></p>
<p>This prompt provides a set of conditions for the generated text. The model is guided to generate a response that meets the specified criteria, such as using the particular programming language (C#) and adhering to certain design principles.</p>
<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/With-the-criteria-Conditions.png" alt="With the criteria Conditions" width="426" height="718" class="aligncenter size-full wp-image-117051" /></td>
<td style="width: 15%;">
<p><strong>Write a program that calculates the sum of two numbers.</strong></p>
<p>This prompt provides no specific conditions for the generated text. The model is free to generate any response it deems appropriate response based on its training data.</p>
<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/Without-the-criteria-Conditions.png" alt="Without the criteria Conditions" width="836" height="733" class="aligncenter size-full wp-image-117052" /></td>
</tr>
<tr>
<td style="width: 15%;">Vocabulary</td>
<td style="width: 15%;">
<p><strong>Write C# code to add two numbers and return the result in double type.</strong></p>
<p>It uses technical language, such as <strong>C# code</strong>, <strong>add</strong>, <strong>result</strong>, and <strong>double type</strong>, which are specific and concise, making it appropriate for communicating a programming task to the GPT.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/With-the-criteria-Vocabulary.png" alt="With the criteria Vocabulary" width="961" height="574" class="aligncenter size-full wp-image-117053" /></p>
</td>
<td style="width: 15%;">
<p><strong>Write an essay to add two numbers and return the result as a double type.</strong></p>
<p>It uses general language, such as <strong>essay</strong>, <strong>add</strong>, and <strong>result</strong>, which may not provide enough context or specificity for ChatGPT to generate the desired output accurately. Additionally, <strong>essay</strong> implies a different writing style and structure than needed for a programming task, which is implied by <strong>double type</strong>.<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/Without-the-criteria-Vocabulary.png" alt="Without the criteria Vocabulary" width="839" height="616" class="aligncenter size-full wp-image-117054" /></p>
</td>
</tr>
<tr>
<td style="width: 15%;">Role</td>
<td style="width: 15%;">
<p><strong>You are a software developer. What is maui.</strong></p>
<p>This prompt produces output that explains the .NET MAUI cross-platform technology from the viewpoint of a software developer.</p>
<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/With-the-criteria-Role.png" alt="With the criteria Role" width="854" height="626" class="aligncenter size-full wp-image-117055" /></td>
<td style="width: 15%;">
<p><strong>What is maui</strong></p>
<p>This prompt outputs an explanation the geographic island because ChatGPT didn’t have any indication that you were inquiring about a software development framework.</p>
<img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/05/Without-the-criteria-Role.png" alt="Without the criteria Role" width="900" height="396" class="aligncenter size-full wp-image-117057" /></td>
</tr>
</tbody>
</table>

## Conclusion

Thanks for reading! I hope you found this blog helpful in understanding the importance of prompt engineering for LLMs like [ChatGPT](https://openai.com/blog/chatgpt "ChatGPT") to get accurate results. Try out the tips listed in this blog post and leave your feedback in the comments section below.

[Syncfusion](https://www.syncfusion.com/ "Syncfusion") provides the world’s best UI component suite for building robust  
web, desktop, and mobile apps. It offers over 1,800 components and frameworks for [WinForms](https://www.syncfusion.com/winforms-ui-controls "WinForms UI Controls"), [WPF](https://www.syncfusion.com/wpf-ui-controls "WPF controls"), [WinUI](https://www.syncfusion.com/winui-controls "WinUI controls"), [.NET MAUI](https://www.syncfusion.com/maui-controls ".NET MAUI Controls"), ASP.NET ([Web Forms](https://www.syncfusion.com/jquery/aspnet-web-forms-ui-controls "ASP.NET Web Forms UI Controls"), [MVC](https://www.syncfusion.com/aspnet-mvc-ui-controls "ASP.NET MVC UI Controls"), [Core](https://www.syncfusion.com/aspnet-core-ui-controls "ASP.NET Core UI Controls")), [UWP](https://www.syncfusion.com/uwp-ui-controls "UWP UI Controls"), [Xamarin](https://www.syncfusion.com/xamarin-ui-controls/ "Xamarin UI Controls"), [Flutter](https://www.syncfusion.com/flutter-widgets "Flutter Widgets"), [JavaScript](https://www.syncfusion.com/javascript-ui-controls "JavaScript UI Controls"), [Angular](https://www.syncfusion.com/angular-ui-components "Angular UI Components"), [Blazor](https://www.syncfusion.com/blazor-components "Blazor UI Components"), [Vue](https://www.syncfusion.com/vue-ui-components "Vue UI Components"), and [React](https://www.syncfusion.com/react-ui-components "React UI Components") platforms.

Current customers can access the latest version of Essential Studio from the [License and Downloads](https://www.syncfusion.com/account/downloads "Essential Studio License and Downloads page") page, and Syncfusion-curious developers can use the 30-day [free trial](https://www.syncfusion.com/downloads "Free evaluation of the Essential Studio Products") to explore its features.

You can contact us through our [support forums](https://www.syncfusion.com/forums "Syncfusion Support Forum"), [support portal](https://support.syncfusion.com/ "Syncfusion Support Portal"), or [feedback portal](https://www.syncfusion.com/feedback "Syncfusion Feedback Portal"). We are always happy to assist you!

## Related blogs

- [Create a Place Explorer App Using .NET MAUI and ChatGPT](https://www.syncfusion.com/blogs/post/place-explorer-app-using-dotnet-maui-chatgpt.aspx "Blog: Create a Place Explorer App Using .NET MAUI and ChatGPT")
- [5 Front-End Web Frameworks to Consider Other Than React](https://www.syncfusion.com/blogs/post/5-front-end-web-frameworks-other-than-react.aspx "Blog: 5 Front-End Web Frameworks to Consider Other Than React")
- [Best Practices for Building Inclusive User Interfaces [Webinar Show Notes]](https://www.syncfusion.com/blogs/post/build-inclusive-user-interfaces.aspx "Blog: Best Practices for Building Inclusive User Interfaces [Webinar Show Notes]")
- [Google-Powered Autocomplete: Leveraging Search Suggestions in .NET MAUI](https://www.syncfusion.com/blogs/post/google-powered-autocomplete-dotnet-maui.aspx "Blog: Google-Powered Autocomplete: Leveraging Search Suggestions in .NET MAUI")