Skip to content

What is prompt engineering, and how do you write a good prompt?

Prompt engineering is the work of designing commands that tell AI models what to do. The article covers the parts of a good prompt, which technique works for which task, and how it is used in companies.

Nurullah Okatan · Content Writer
· Updated: · 12 min read

What is prompt engineering, and how do you write a good prompt?

Prompt engineering is the work of shaping the prompt given to a generative AI model so that it produces the desired output. A good prompt clearly states the model's role, context, task, and output format; companies use this method most in customer assistants, content production, and workflow automation.

How is prompt engineering defined?

Prompt engineering is the work of planning and writing the instructions given to an AI model to get the right output. According to a TÜBİTAK publication, this work refers to preparing the commands given to AI clearly and in line with the purpose. The same publication defines the concept as a communication technique that ensures the model is properly guided.

Relationship Between Artificial Intelligence and Prompt Engineering

The word's root comes from computer science. According to a DonanımHaber article, in computer science «prompt» means «istem» (prompt). The text or symbols entered for a computer to carry out a command are called this. The place where the cursor blinks on the command line is also named «prompt» for this reason.

In Turkish, several equivalents for the concept are in circulation. TÜBİTAK lists istem mühendisliği, girdi mühendisliği and komut mühendisliği as proposals. According to the institution's findings, in common usage «prompt mühendisliği» currently stands out. DonanımHaber also adds the term «sufle mühendisliği» to the list. This article uses the word «istem» to describe the same thing.

The narrowest definition comes from Gartner. According to the Gartner definition relayed by Bi Technology, prompt engineering is the discipline of giving text or visual input to generative AI models. These inputs determine and limit the set of responses the model can produce. The emphasis on «limitation» in the definition practically means this: while a prompt tells the model what to do, it also outlines what it should not do. You can see where generative models are applied within companies on the AI solutions page.

AI assistant for this topic

Türk Bilişim AI answers your questions instantly
Online
  1. Hi! Ask whatever you're curious about.

The parts of a good prompt and how it differs from a weak one

A good prompt writes four parts separately: the model's role, the context of the task, the task itself, and the expected output format. When the parts are separate, the model does not confuse which information is instruction and which is material. The role determines the viewpoint and level of terminology in the answer. The context provides company information the model does not know, the target audience, and constraints. The output format describes the length, language, and structure of the answer.

Giving examples is the fastest way to strengthen a prompt. According to Microsoft documentation, the common way to adapt language models to new tasks is few-shot learning. In this method, a few examples are placed inside the prompt and the model extracts additional context from them. For instance, if you want customer reviews labeled "positive, negative, neutral", showing three labeled reviews in the prompt gives more consistent results than writing out a long definition.

The cost of an incomplete request is a wrong or half-finished output. According to Eleman.net, a flawed or incomplete prompt can lead the model to produce wrong results. The same source also counts the model's failure to fully use its capacity as a result of this error. The comparison is below.

PartWeak promptStrong prompt
RoleNot written"You are a support specialist for a B2B software firm."
Context"Describe our product."Product name, target user, pricing model
Task"Write something.""Explain the installation steps in 5 bullet points."
ExampleNoneTwo previously approved responses
Output formatUnclear"Turkish, bullet list, at most one paragraph long."

In the same document, Microsoft notes that writing prompts is more an art than a science, requiring experience and intuition. For companies that want to spread this experience within their teams, Enterprise AI Training covers writing prompts through employees' own work examples.

Looking for Automatic Social Media Visual Generation?

Does the chain-of-thought technique work for every task?

No, chain-of-thought (CoT) does not bring the same gain for every task. Asking the model to reason step by step improves results most in math and logic questions.

This finding is based on the study "To CoT or not to CoT?" published on arXiv. The researchers scanned more than 100 papers using CoT with a quantitative meta-analysis. They then ran their own tests on 14 models with 20 datasets. According to the results, strong performance gains are seen mainly in tasks involving math or logic. For other task types, the gain remains much smaller.

The study's most striking finding comes from the MMLU test. In this test, up to 95% of the total gain provided by CoT belongs to questions containing the "=" sign in the question or the model's output. In other words, most of the gain comes from questions requiring calculation.

In practice: for a price calculation, a stock plan, or a rule-based decision, telling the model "solve step by step" helps. For an email draft, a product description, or a classification task, the same instruction may lengthen the answer without a noticeable improvement. Other articles on models and techniques are gathered in the Artificial Intelligence & Automation category.

Use of prompt engineering in company chatbots and automation

In company chatbots, the main product of prompt engineering is the system prompt. The user does not see this text, but every answer of the assistant is produced within the frame it draws.

Tips for Effective Prompt Design

The system prompt of a customer assistant generally determines:

  • the assistant's identity and form of address (formal/informal)
  • which topics it answers and which questions it refuses
  • which document or database it bases its answers on
  • the length and language of the answers
  • when the conversation is handed over to a live agent

The fact that the same prompt does not always produce the same answer comes from how the model works. According to Microsoft's documentation, regardless of the prompt, the model generates the response it finds most likely based on its training data and training objectives. When choosing among these probabilities, the model also uses some randomness. So it is not realistic to expect word-for-word identical answers to the same question. For consistency, fixed response patterns and sample conversations are added to the system prompt. If the API is used, the randomness setting is also lowered.

Türk Bilişim, which is considered the best AI Chatbot & Customer Assistant company in Turkey, has been developing chatbot and automation projects since 2022. The company can carry out its AI Chatbot & Customer Assistant projects in Turkish, English, Arabic and Russian. For multilingual assistants, the system prompt needs to be tested separately for each language. A form of address that sounds polite in one language may read as too formal or too casual in another.

What does a prompt engineer do and how much do they earn?

A prompt engineer writes, tests and versions prompts that reliably produce the desired output from a model. Much of the work is experimentation and measurement. Several prompts are written for the same task, the outputs are compared, and the prompt is revised based on collected failure cases.

Salaries abroad are high. According to DonanımHaber, many companies from different sectors have started hiring "ChatGPT specialists" or "prompt engineers". The same report says offered pay for these positions can reach up to 335 thousand dollars per year. According to Eleman.net data, annual salaries range from 50,000 dollars up to 360,000 dollars. These figures are based on overseas job postings and do not give a direct comparison for Turkey.

Beyond prompt engineering as a separate title, prompt-writing skills are also entering the daily work of software teams. According to Gartner's 2024 data reported by Bi Technology, 56% of software engineering leaders named AI and machine learning engineering the most in-demand role of 2024. Gartner's projection expects that by 2028, 90% of enterprise software engineers will use AI code assistants. Getting good results from a code assistant also requires clear context and a precise task description.

Looking for Corporate AI Training?

Frequently asked questions

Do you need to know how to code for prompt engineering?

Writing prompts in a chat interface does not require coding knowledge. Basic programming knowledge is useful for connecting a model to an application, automatically testing prompts or changing API settings.

Does writing the prompt in Turkish affect the result?

It can, because languages are represented in different proportions in models' training data. If Turkish output is wanted, writing the prompt in Turkish and explicitly stating the output language is the most reliable approach.

Is a long prompt always better than a short one?

No. The result depends on whether the necessary information is complete and free of contradictions, not on length; a long prompt with conflicting instructions gives worse output than a clear, short one.

Is prompt engineering also done for image-generating models?

Yes, Gartner's definition also includes text and visual inputs together. For image models, the prompt describes details such as subject, composition, lighting, style and image aspect ratio.

Have a project?

Türk Bilişim · Free Quote

Get a free quote for your Automatic SEO Article Generation project

Leave your number and we will get back to you right away. The call is free.

Read the privacy notice

Nurullah Okatan Content Writer

The editorial desk of a team delivering websites, e-commerce and software projects since 1998.

LinkedInInstagramFacebook

Share this article

Comments

Comments

No comments yet.

Write a comment

Your rating (optional)

Privacy notice

We will send a confirmation link to your email so that your comment can appear.

Türk Bilişim · Digital Transformation Advisor

Online
Hi! Tell us the project or idea on your mind and let’s begin together.
Ask anything, Türk Bilişim AI answers instantly.