On Prompt Engineering, What is it and 3 Tips to Craft Better Prompts

Learn prompt engineering with tips on crafting effective prompts, including context + instruction, role prompting, and chain-of-thought techniques.

Author: Mustafa Yıldız

Any system, in its simplest form, has 3 components. These are as follows:

  1. Input

  2. Process

  3. Output

In a scenario where Process is a constant or a fixed component or a component which is outside the sphere of influence, it is highly likely that better Input will make for better Output.

An analogy centered around “system” concept may be helpful in the context of interactions with a generative AI (gen AI) model:

  1. Input : Prompts, and the practice of writing them is called Prompt Engineering.

  2. Process : Interacting with gen AI model/tool of choice.

  3. Output : Results the user gets after each interaction.

Before jumping to the tips for crafting better prompts, the writer of the blog post you are reading right now wants to share that he finds the word “Engineering” too ambitious for the interactions being executed. Would you call someone who is good at Google Search a Google Search Engineer? 😊

Anyway:

Tip 1

Context + Instruction or Instruction + Context

Example:

Prompt engineering is the practice of designing and refining prompts to effectively interact with AI models, particularly large language models like GPT-4. This involves crafting the inputs or questions given to the model to achieve spesific, desired outputs. The goal is to elicit the most accurate, relevant, and useful responses from the AI.

Explain the above in one sentence!

Tip 2

Role Prompting. This helps the model keep its answers within the expected knowledge domain of the role.

Example:

Act as if you are a primary school teacher, and you are working with 8 year-olds. A student asks the following question -How does the Internet work?-. How would you answer? Keep the answer short and concise.

Tip 3

Chain-of-Thought (CoT) Technique. A step-by-step approach to understand and improve the model’s reasoning capability for further prompts, thus; desired outcomes.

Example:

There are 20 eggs in a basket. Half of the eggs are chicken eggs, and half of the chicken eggs are dark yellow. How many dark yellow chicken eggs are there in the basket?

Let’s think step by step.

share this post:

Searching Anything Else? Here’s more

Bir pano üzerinde iğnelerle oluşturulmuş karmaşık bir ağ deseni. Üç kişinin elleri, ipin düğüm noktalarını düzenliyor. Bu görsel, işbirliği ve bağlantıları simgeliyor.

Culture at Risk: The Hidden Costs of Cost-Cutting Measures

During economic crises, businesses often turn to “cost-cutting,” impacting consumer spending and business investment. This approach, driven by short-term goals, strains stakeholder relations and morale. Leaders are pressured to justify departmental functions, potentially tailoring justifications for management. The Barret Values Center warns of the negative impact on company culture and success. Businesses should prioritize strategic investment and innovation for sustainable success.

Read More »