Prompt Engineering: How to Write a Good Prompt?
- Pedro dos Santos
- 1 day ago
- 5 min read

The AI revolution is already part of our daily lives. Language models (like ChatGPT, Claude, Gemini and Llama) have changed how we research, create content and automate processes. But to extract real value from these models you need more than familiarity: you need prompt engineering: the practice of writing instructions that turn the raw capability of LLMs into useful outcomes for businesses and projects.
What is a prompt and why does it matter?
A prompt is the instruction (question, command, context) you give the model. Think of it as the skeleton of the request: the more complete and well-structured it is, the more the response tends to be relevant and actionable. Prompt engineering is not a “trick”; it’s a documented method that includes patterns such as few-shot, zero-shot, chain-of-thought and modular templates.
Practical example:
Generic prompt: “Talk about marketing.” → superficial answer.
Optimized prompt: “Create a digital marketing plan for a B2B software startup, focused on lead generation via LinkedIn and content, budget $10,000/month, quarterly goals.” → operational and applicable answer.
Fundamentals of prompt engineering
Specificity: Provide context, objective, constraints and audience. More details = less ambiguity.
Define the format: Ask for the exact format (list, table, email, script), length and tone. E.g.: “Limit to 150 words; persuasive tone.”
Assign roles (role prompting): Asking the model to “act as” an expert (e.g., “Act as a tax consultant with 10 years of experience”) improves accuracy and style. Platforms and major-company guides explicitly recommend this pattern.
Use examples (few-shot): Showing 2–5 input/output examples (few-shot) helps the model reproduce format and style. This technique has been documented since GPT-3.
Iteration: Prompt engineering is iterative that involves testing, evaluating and refining.
Advanced techniques (that really make a difference)
Meta-prompting
The term “meta-prompting” (or metaprompting) refers to creating prompts that help generate, improve or guide other prompts. In other words, “prompting about prompts.” It’s a meta-level technique where the focus is not just producing an answer but teaching, structuring or optimizing the process of creating prompts for language models like ChatGPT.
Prompt Chaining
Break complex tasks into smaller steps and chain prompts. First request data extraction; then analysis; finally synthesis into a report. This pattern reduces logical errors and helps maintain control over the process.
Modular Prompt (block structure)
Use clear blocks, for example:
[CONTEXT] [TASK] [SITUATION] [FORMAT] [TONE]
Blocks make explicit what varies and what should remain fixed — great for enterprise templates.
Chain-of-Thought (CoT)
Asking the model to show intermediate steps (“think step-by-step”) improves reasoning on complex problems (e.g., calculations, logical decisions). Studies show significant benchmark gains when CoT is applied to sufficiently large models.
Few-Shot and One-Shot
Showing examples (few-shot) is efficient for teaching format and reducing ambiguity; one-shot can suffice when the task is simple. The technique was formalized and tested around GPT-3.
Full practical example (template)
Modular prompt used internally:
[CONTEXT]
You are a digital marketing strategist specialized in B2B demand generation for technology companies. The startup in question is an HR software (SaaS) company with about 50 employees, offering solutions focused on people management, engagement and performance.
[OBJECTIVE]
Develop a lead-generation campaign on LinkedIn Ads aimed at senior decision-makers (Heads and C-Levels) in medium and large companies. The plan should be practical and actionable, focusing on maximizing cost per qualified lead (CPL) within the monthly budget.
[CONSTRAINTS]
Budget: $ 8,000/month.
Targeting: Positions “Head”, “Director”, “VP” or “C-level”.
Channel: LinkedIn Ads only (do not include other media).
Deliverable: Focus on generating qualified leads, not just traffic.
[OUTPUT FORMAT]
Present the response in clear, objective bullet sections, divided as follows:
- Target audience: professional profiles, company segments and LinkedIn targeting criteria.
- Messaging and creatives: value proposition, tone, CTAs and examples of headlines/ads.
- KPIs and success metrics: measurable indicators and performance targets.
- Calendar and steps: weekly/monthly execution and optimization schedule.
[TONE & STYLE]
Professional, direct and results-oriented. Use clear B2B marketing language. Avoid excessive jargon.

This level of precision produces outputs ready for execution.
Evaluation and metrics: how to measure if a prompt is “good”
Relevance: do responses match the objective?
Accuracy: are facts, numbers and sources correct?
Consistency: is formatting and tone maintained across runs?
Efficiency: tokens used vs. output quality.
A/B testing of prompts: test variations and compare business metrics (CTR, conversion, time saved).
Provider tools and guides encourage iterative testing and validation with real samples.
Common mistakes to avoid
Overly long or confusing prompts. Be direct.
Ambiguous language. Avoid open terms like “good” without criteria.
Ignoring real business context. Always include audience and constraints.
Not specifying format. Ask for “table”, “bullet points”, etc.
Blindly trusting factual outputs. Request sources and verify: LLMs can hallucinate (invent facts), so ask for verification and citations when possible. Companies like Anthropic and OpenAI recommend techniques to reduce hallucinations (e.g., allowing “I don’t know,” asking for citations, or using external verification).
Model-specific tips (key differences)
OpenAI / ChatGPT: good for creativity and text production; follow OpenAI’s prompt guidelines and iterate.
Claude (Anthropic): emphasizes safety and clarity; recommends role prompting and asking for step-by-step explanations.
Gemini (Google): strong multimodal integration when applicable; use prompts that explore text + image.
Llama (Meta, open-source versions): useful for on-prem and customized solutions; requires more care with few-shot and fine-tuning.
Practical limitations (and how to work around them)
Context window (token limit): intermediate summaries and prompt chaining help when context is large.
Temporal knowledge: LLMs have a cutoff date for training knowledge; use external source verification.
Privacy and compliance: be careful with sensitive data; prefer on-prem solutions or models with strong controls when necessary.
Operational best practices for companies
Reusable templates: standardize prompts for repetitive tasks (support, triage, reports).
Logs and traceability: record prompt versions and outputs for audit.
Internal training: train teams in prompt engineering as a key skill.
Integration with external verification: combine LLM + search tools or reliable databases to reduce errors.
Measure ROI: compare time spent before/after and conversion metrics.
Selected references (recommended reading)
Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in NLP, Pengfei Liu et al. (survey on prompting).
Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, Jason Wei et al. (CoT).
Language Models are Few-Shot Learners, Tom B. Brown et al. (introduction to few-shot with GPT-3).
OpenAI: Guides and best practices for prompt engineering (official docs).
Anthropic article/guide summarized on Business Insider (practical recommendations on prompting and reducing hallucinations).
Conclusion: the prompt as a competitive advantage
Mastering prompt engineering is today a practical advantage, not just a technical one. Teams that structure tasks into reusable prompts, test variations and combine LLMs with external validation gain speed and quality in delivery. For companies, this means more efficient automation, higher-value content and faster, better-informed decisions.
Ready to be the next AI success story?
Now it’s your turn.
The future of business is already intelligent. Those who anticipate it reap the greatest benefits. Talk to our specialists and discover how to apply AI agents strategically and safely in your company. Transform. Grow with AI.












Comments