Skip to content
Giallo

Prompt engineering: what it is and how to get started

What prompt engineering is and how to start: a 6-part framework, before-and-after examples, common mistakes and reliable business use.

Reading time: 10 min

Prompt engineering schema: role, context, constraints, data, format, and control that drive AI response

The prompt engineering is the practice of writing clear, well-structured instructions for an AI model —such as ChatGPT, Claude, or Gemini — so that you get useful, precise, and repeatable answers. speak AI: it's not enough to ask a question, it counts how you do it. The same model, with the same request written in two different ways, can give you an output to throw away or one ready to use.

The important thing to understand right away is this: prompt engineering is not programming. It is done in natural language, in Italian or in English, as you would instruct a new collaborator who is very good but does not know anything about your company. You must tell him who It must be, what must do, with what data, by What Limits and in which format. Skipping these steps is the number one cause of disappointing responses.

In this guide we see what prompt engineering really is, a concrete six-part framework for building prompts that work, real "before/after" examples, the most common mistakes and how to apply all this in an SME's processes.

In summary

  • The prompt engineering is to write clear instructions for an AI so as to get reliable and repeatable answers, not by chance.
  • You don't need to know how to program: you write in natural language, but with Method and discipline.
  • A solid prompt has six parts: role, context, constraints, data, format and control.
  • Provide the data in the prompt and asking not to invent greatly reduces hallucinations, but does not replace human review.
  • In the company the value comes when a prompt that works comes standardized and reused on a repetitive process.

What Prompt Engineering Is and Why It Matters

A prompt is the instruction you write to an AI model. The prompt engineering is the method of building, testing and improving it as long as it produces good results consistently. The difference is the same as between asking an impromptu question and preparing a briefing for a collaborator: in the second case you get what you need, in the first case you hope you guess.

It matters why language models like Large Language Models (LLM) they do not "understand" as a person: they foresee the most likely continuation of the text they have in front of them. The more clear, specific and well-contextualized your text is, the more the continuation will be what you want. The less context given, the more the model fills in the voids with what is statistically common —that is, generic, or sometimes invented.

A second reason is economic and operational: in the company you do not write a prompt once. You re-use it a hundred times on the same trial. A well-written prompt saves hours of revision; a poorly written one multiplies corrections. To understand why length also counts, it is useful to know how AI counts text: see the AI tokens.

The prompt framework: role, context, constraints, data, format, control

You don't need to memorize exotic techniques. Most effective prompts are built with six bricks. You won't always use all of them, but when an answer is poor it's usually missing one.

Component What it is used for Example sentence in prompt
Role Gives the model a perspective and a register "You're an administrative assistant to an accountant's firm."
Background Explain the situation and the objective "I have to respond to a customer complaining of a delay in the invoice."
Constraint Set the limits: tone, length, what to avoid "Maximum 120 words, courteous but firm tone, no promises on dates."
Data Provides true information to work on "Here's the customer's email: [...]. Here's the practical status: [...]."
Format Defines the output structure "Reply with: email subject, body, and 3 internal stock bulletins."
Control Demands uncertainty verification and management "If data is missing to answer, list it instead of inventing it."

The principle behind it all: remove ambiguity. Every component you add narrows the range of interpretations in which the model could go wrong. The most underrated component is the last — the control — because it is what protects you from AI Hallucinations, meaning plausible but false information.

When two components are enough and when six are needed

For a trivial task ("summarise this text in 5 points") all you need is data and format. For a repetitive and risky business task unaa response to a customer, a draft contract, a classification.it is worth using almost all of them. The practical rule is proportionate to the risk: the more the error costs, the more it is worth structuring the prompt.

Warning A longer prompt is not automatically better. Just add context that changes the answer. Decorative text or unnecessary repetition confuses the model and consumes tokens without advantages.

How to write a prompt, step by step

The method can also be applied to a first job with Kimi AI in Italian: Explicit goal, context and format makes the result easier to verify.

Here is a repeatable method to switch from a vague idea to a prompt that works. It works with any model and for almost every text task.

  1. Define the target in a sentence. What exactly does AI have to produce and for whom? "An email response to the customer, ready to send" is clear; "help me with the customer" is not.
  2. Assign a role. Tell the model who it is (e.g. "You're a copywriter for furniture e-commerce"). Orient tone and expertise.
  3. Paste the real data. Don't guess: provide the email, the product card, the numbers. The data in the prompt beats the model's memory.
  4. Put the constraints. Length, tone, things to avoid, language. "Maximum 100 words, no superlatives, in Italian."
  5. Ask for the exact format. Table, bullet, JSON, email with subject and body. Structured output re-uses better.
  6. Add control. "If a data is missing, report it. Don't invent prices or dates." Reduce the risk of silent errors.
  7. Head and iterates. Throw, read what's wrong, correct one thing at a time. When it works two or three times in a row, save it as a model.

The last step is what separates prompt engineering from improvisation: iterare. The first prompt is rarely perfect. The difference is saving the version that works and reusing it, instead of rewriting from scratch each time.

Practical examples

Three real examples of "before/after" prompts, taken from situations of Italian SMEs. Open each block to see the poor and structured version.

Example 1 Risposta Response to a negative review (e-commerce)

First (weak): "Reply to this negative review: [review]."

Result: a generic answer, perhaps too long, that promises unverified things and sounds fake.

After (structured):

"You are the customer support manager of an e-commerce homewares. A customer left this 2-star review: [review]. Write a public response. Constraints: maximum 80 words, empathetic tone but not servile, in Italian, no promises about refunds or times. Format: a public response + apart from 2 internal action bulletins to be done. Control: if you need data that you don't have (order number, reason for return), indicate where to enter it with [...] instead of inventing it."

Result: a publishable response, of the right length, without risky commitments and with internal actions ready.

Example 2 — Draft estimate (service company)

First (weak): "Give me a quote for this customer who wants a website."

Result: the model invents random items and prices, not in your format, unusable.

After (structured):

"You're a commercial assistant to my agency. Data: here is the customer's request [...] and my item list with prices [...]. Prepare a draft quote. Constraints: use only list items, do not invent prices, report dubious items. Format: table with columns Item, Quantity, Unit Price, Total, plus one row General total. Control: if the request is ambiguous, list the questions to be asked to the customer before confirming."

Result: a clean table based on your real price list, with the uncertainties highlighted instead of hidden.

Example 3 — Email Classification (back-office study)

First (weak): "What kind of email is this?"

Result: categories invented on the fly, different each time, not reusable in a stream.

After (structured):

"You're an email classifier for an accountant firm. Data: Here is the email [...]. Classify it in ONE of these categories: Invoices, F24, Contracts, Info request, Other. Constraints: choose only one category; if none is clear, use Other. Format: JSON with category and priority fields (high/medium/low). Control: do not add text outside the JSON."

Result: a constant and structured output that you can connect to a AI Automation or to a AI Agent without further intervention.

The common thread of the three examples: the "after" version is no longer Creative, is more bound. The less freedom left to interpretation, the more reliable and reusable the result.

Useful Techniques to Know

In addition to the basic framework, few techniques recur in almost all business prompts. They are not tricks: they are different ways of giving context.

  • Give examples (few-shot): shows 1-3 examples of desired input and output. The pattern mimics the pattern much better than an abstract description.
  • Asking for step reasoning: for tasks with multiple steps, ask to proceed "step by step" before giving the final answer. It reduces logic errors.
  • Delimiting Data: separates instructions and data with clear markers (e.g. "TEXT TO ANALYZE:" followed by content). Prevents the model from confusing your data with a command.
  • Iterating in Conversation: do not redo the prompt from scratch, correct: "Shortest", "Most formal tone", "Take away the last point". Often it is the quickest way.

The most underrated technique is the first. Just one concrete example of the result you want is worth more than a paragraph of explanation. If you have a past answer that you liked, paste it as a template.

Mistakes to Avoid

  • Asking without context. "Write me an email to the customer" without telling who the customer is, what you want to achieve and in what tone it produces generic text. The context is not optional: it is the raw material.
  • Let the model guess the data. If you don't paste the numbers, dates, or facts, the model makes them up in a plausible way. Always provide the real data in the prompt and ask not to invent. AI Hallucinations.
  • Not specifying the format. If you don't say "table" or "maximum 5 bullet", you get a wall of text to reformat by hand. The required format saves downstream work.
  • Accumulating contradictory instructions. "Be brief but exhaustive, formal but friendly" sends the model into confusion. Choose priorities and ordinal.
  • Entering sensitive data without criterion. Pasting personal data of customers into public tools can violate the GDPR. Define first what you can share and what you can't.

How to apply it in the company

In an SME prompt engineering ceases to be a personal experiment and becomes useful when a working prompt comes transformed into a reusable standard. The difference between "I tried ChatGPT" and "AI got into the process" is all here.

When to Standardize a Prompt

  • The task is repeated often (tens of times a month).
  • Different people have to get the same kind of output.
  • The output format must be constant (to store or automate).
  • Error costs time or reputation, so predictable control is needed.

When it's not worth

  • The task is occasional and always different.
  • We need a human judgment that changes every time.
  • The upstream process is still confusing: first go fix it.
  • You are using AI "to try", without a measurable result.

The practical path is short: locate a repetitive task, build the prompt with the framework, test it on real cases as long as it is stable, then save it as Business Templates that anyone can use by filling only the data. When the prompt has to operate on its own inside a stream —read an email, classify it, update a management software —you enter the territory of AI agents and of the automation of business processes, where the prompt is the piece instructing the system.

This is exactly the work of one AI Consulting: understand what processes are worth standardizing, write the right prompts and connect them to the tools you already use. If you want to see concrete evidence and prototypes, take a look at the experiments of the The Lab.

Note The capabilities and names of AI models change quickly. A prompt optimized for one model can behave differently on another: always test when changing the model and check the official pages for the latest features.

The natural sequel to this article: Reasoning effort: what changes in model comparisons and How to read AI benchmarks.

Conclusion

The prompt engineering is not a technical competence reserved for insiders: it is the discipline to tell AI, clearly, who It must be, what must do, with what data and in which format, adding a check to avoid silent errors. Mastering the framework in six parts — role, context, constraints, data, format, control. and the habit of iterating is what turns random responses into repeatable results. For an SME the real leap occurs when a good prompt becomes a standard reused on a concrete process. From here you can continue with the Generative AI to understand what is underneath, and with the AI Guide for Companies to frame priorities and costs.

AI becomes useful when it enters processes. Giallo Studio helps SMEs and teams to build concrete, measurable and sustainable automations.

Giallo Studio guides: methodology and sources

How we apply it in the company

Related resources

AI consulting services and process automation

FAQ

What is prompt engineering in simple words?

Prompt engineering is the practice of writing clear instructions for an AI model so as to obtain useful and reliable answers. It is not programming: it is telling the model who it must be, what it must do, with what data and in what format. A well-written prompt reduces errors and revisions; a badly written one produces generic or wrong output.

Do you need to know how to program to do prompt engineering?

No. Prompt engineering uses natural language: write in Italian (or English) as you would to a colleague. Clarity matters, rather than code. Discipline and method matter more than technical expertise: define the objective, provide context and give examples.

What is the difference between a prompt and prompt engineering?

A prompt is the single request you write to AI. Prompt engineering is the method of building and improving it: choosing role, context, constraints, data, format and a final control, then iterating on the results. It is the difference between asking a question at random and designing the instruction that gives repeatable results.

Is prompt engineering still useful with the latest models?

Yes. Models understand imperfect requests better than before, but remain sensitive to context, constraints and the requested format. For repetitive business tasks, a structured prompt still makes the difference between an output that needs redoing and one that can be published. Model names and capabilities change: always check the official page.

How do I avoid AI inventing information in the prompt?

Provide the data in the prompt rather than asking the model to recall it, explicitly instruct it not to invent information and to state what it does not know, and limit its answer to the information you supplied. A human review of critical points remains necessary: no prompt completely eliminates hallucinations.

How long does a good prompt have to be?

As long as needed, and no longer. A useful prompt contains an objective, relevant context, constraints and format: a few well-structured lines are often enough. Adding unnecessary text does not help and consumes tokens; removing necessary context worsens the answer. The rule is: every sentence must guide the output.

Put it into practice

Let's turn this guide into your first live workflow.

Tell us what process you want to lighten: we evaluate feasibility, return and first operational step.