Published
Prompt Engineering Techniques: A Practical Guide for Business Applications
Prompt patterns that matter when an LLM runs inside a business process: clear structure, few-shot examples, structured output, versioning and testing like code.
- Written by
- Ali ÖzdurmuşFounder, Veni AI
- Updated
- Reading time
- 6 min read

Prompt engineering is the practice of designing the instructions and context a model receives so that it produces the output you need, reliably. In a business application the prompt is part of the product: it is versioned, tested and reviewed like code. This guide covers the techniques that make the biggest difference.
Prompt Engineering Fundamentals
Prompt Anatomy
An effective prompt consists of the following components:
- System Instruction: Model's role and behavioral rules
- Context: Background information related to the task
- Example(s): Desired output format examples
- Task: Specific request or question
- Output Format: Expected response structure
Basic Prompt Structure
[Role Definition]
You are a {field of expertise} expert.
[Context]
{Relevant information}
[Task]
{Specific request}
[Format]
{Expected output format}Basic Prompt Techniques
1. Zero-Shot Prompting
Direct task definition without giving examples:
Summarize the following text:
{text}Use cases:
- Simple tasks
- General knowledge questions
- Classification
2. Few-Shot Prompting
Task definition with examples:
Text: "This product is great, I am very satisfied"
Sentiment: Positive
Text: "It was a terrible experience, I do not recommend it"
Sentiment: Negative
Text: "It's okay for the price"
Sentiment: ?Best Practices:
- 3-5 examples are usually sufficient
- Add various edge cases
- Order examples randomly
3. Chain-of-Thought (CoT)
Step-by-step thinking:
Question: A store has 15 apples. 8 apples were sold,
then 6 more apples arrived. How many apples are there?
Let's think step by step:
1. Initially there are 15 apples
2. 8 apples sold: 15 - 8 = 7 apples left
3. 6 apples arrived: 7 + 6 = 13 apples
Answer: 13 applesMany current models have built-in reasoning modes. With those, asking for step-by-step reasoning in the prompt matters less than stating the goal, the constraints and the expected output clearly.
4. Self-Consistency
Different reasoning paths for the same question:
Solve this problem in 3 different ways and choose the most consistent answer:
[Problem]5. Tree of Thoughts (ToT)
Branched thought tree:
Problem: {complex problem}
Thought 1: {approach A}
→ Sub-thought 1.1: {detail}
→ Sub-thought 1.2: {detail}
Thought 2: {approach B}
→ Sub-thought 2.1: {detail}
Evaluate and select the most suitable path.Advanced Techniques
ReAct (Reasoning + Acting)
Thinking and action loop:
Question: How many times larger is Istanbul's population than Paris?
Thought: I need to find the population of both cities
Action: [search] Istanbul population
Observation: Istanbul population ~16 million
Thought: Now I need to find Paris population
Action: [search] Paris population
Observation: Paris population ~2.2 million
Thought: I can calculate the ratio
Action: [calculate] 16 / 2.2
Observation: 7.27
Answer: Istanbul's population is approximately 7.3 times larger than Paris.Constitutional AI Prompting
Defining ethical and safety rules:
System: You are a helpful assistant.
Rules:
1. Do not generate harmful content
2. Do not share personal information
3. Do not help with illegal activities
4. Always be honest
User question: {question}Role Prompting
Defining specific area of expertise:
You are a cybersecurity expert with 20 years of experience.
You have worked as a CISO in Fortune 500 companies.
You can explain technical details clearly and understandably.
User's question: {question}Prompt Optimization Strategies
1. Increasing Specificity
❌ Bad:
Write a blog post✅ Good:
Target audience: Software developers
Topic: Docker container security
Length: 1500-2000 words
Tone: Technical but accessible
Format: Introduction, 5 main sections, conclusion2. Determining Output Format
Provide your response in this JSON format:
{
"summary": "string",
"key_points": ["string"],
"next_steps": ["string"],
"confidence_score": number
}3. Negative Prompting
Specifying unwanted behaviors:
Do NOT do the following:
- Give speculative information
- Make claims without citing sources
- Lead the user
- Give excessively long answers4. Use of Delimiters
Clarifying sections:
###CONTEXT###
{context information}
###TASK###
{work to be done}
###FORMAT###
{output format}Model-Specific Optimizations
For OpenAI GPT models
- Use System message effectively
- Use structured outputs with a JSON schema where available
- Temperature: 0.7-1.0 for creative tasks, 0.1-0.3 for analyticalFor Claude
- Use XML tags: <context>, <task>, <format>
- Put important information at the end in long context
- Use extended thinking for complex, multi-step tasksFor Gemini
- Optimize for multimodal prompts
- Up-to-date information with Grounding
- Adjust Safety settingsPrompt Testing and Iteration
A/B Testing Framework
Prompt A: {version 1}
Prompt B: {version 2}
Metrics:
- Accuracy: %
- Consistency: 1-5
- Latency: ms
- Token usage: #Prompt Versioning
prompt_v1.0: First version
prompt_v1.1: Typo corrections
prompt_v2.0: CoT added
prompt_v2.1: Output format changedEnterprise Prompt Management
Creating Prompt Library
/prompts
/classification
- sentiment_analysis.json
- intent_detection.json
/generation
- blog_writer.json
- code_reviewer.json
/extraction
- entity_extraction.json
- data_parsing.jsonPrompt Template System
class PromptTemplate:
def __init__(self, template, variables):
self.template = template
self.variables = variables
def render(self, **kwargs):
return self.template.format(**kwargs)
# Usage
sentiment_prompt = PromptTemplate(
template="Analyze sentiment: {text}",
variables=["text"]
)Common Mistakes and Solutions
Mistake 1: Excessively Vague Prompt
Problem: Model doesn't understand what you want Solution: Add specific instructions and examples
Mistake 2: Very Long Prompt
Problem: Token limit exceeded, costs increase Solution: Remove unnecessary information, use summary
Mistake 3: Conflicting Instructions
Problem: Model behaves inconsistently Solution: Prioritize and clarify rules
Mistake 4: Hallucination
Problem: Model gives made-up information Solution: Grounding, citation requirement, lower temperature
Conclusion
Good prompts are specific, structured and tested. Define the role, give context and examples, fix the output format, and treat every change as a release that runs against an evaluation set. That discipline matters more than any single trick.
Veni AI designs, tests and versions the prompts behind every AI application we build for companies. See our services or talk to our team.


