Master Prompt Engineering for DeepSeek and ChatGPT‑4o: Essential Techniques
This guide explains the fundamentals of prompt engineering for large language models such as DeepSeek and ChatGPT‑4o, illustrating clear‑prompt design, giving models time to think, chaining prompts, iterative refinement, and advanced tricks with concrete good and bad examples.
1. Clear and Specific Prompts
Providing detailed, precise instructions is the most fundamental principle. Vague questions produce vague answers, so the prompt should contain as many relevant details as possible.
Good Examples
Recipe request – Prompt: “Please provide a low‑sugar dinner recipe for a diabetic patient, including ingredient weights, cooking steps, and nutritional analysis.” Output: a detailed plan such as broccoli‑chicken salad (200 g chicken, 300 g broccoli) and steamed cod with quinoa, each with carbohydrate content.
Academic writing – Prompt: “Write an introduction on climate‑change impacts on polar bears, using the latest 2018‑2023 research and citing three peer‑reviewed papers.” Output: a structured paragraph that references a 2021 Nature study and other specific data.
Bad Examples
Vague prompt – “Teach me to cook” yields many unrelated recipes.
Generic request – “Write a paper intro” produces a template lacking data.
2. Give the Model Time to Think
Instead of demanding an immediate answer, structure the prompt so the model can reason step‑by‑step.
Good Examples
Math problem – Prompt: “Please solve step‑by‑step: an item costs 200 yuan, price rises 20 % then drops 15 %. Show each calculation.” Output:
Step 1: 200 × 1.2 = 240
Step 2: 240 × 0.85 = 204
Final price: 204 yuan
Business decision – Prompt: “As the CEO of a new tea‑drink brand, analyze entry into Southeast Asia using the framework: 1) market size, 2) competitors, 3) logistics, 4) cultural differences.” Output: structured analysis with Shopee data and Hai‑Cha overseas expansion details.
Bad Examples
Direct command – “Give me the answer now” may output an unchecked number.
Overly broad question – “Should we expand to Southeast Asia?” yields a vague “opportunity and challenge” without depth.
3. Prompt Chaining
Complex tasks are broken into a series of smaller prompts that guide the model stepwise.
Good Examples
Market report
Step 1: “List five core dimensions for a 2023 China new‑energy‑vehicle market analysis.”
Step 2: “For the ‘battery breakthrough’ dimension, compare R&D investment of three leading companies.”
Step 3: “Combine the above into a PPT outline, each slide showing point + data.”
Novel writing
Step 1: “Generate a wuxia outline: era, main characters, core conflict.”
Step 2: “Describe the protagonist’s night raid on a palace with scenery and fight details.”
Step 3: “Add dialogue that matches each character’s personality.”
Bad Examples
Single prompt – “Write a complete new‑energy‑vehicle industry report” produces a shallow overview lacking data.
Generic novel request – “Write a wuxia novel” results in a clichéd template.
4. Iterative Prompting
After the first generation, analyse the result, locate inaccuracies, and refine the prompt for a second pass. Repeating this loop yields increasingly accurate and detailed answers.
Good Examples
Copywriting
v1: “Write an air‑conditioner slogan” → “Cool summer”.
v2: “Emphasize energy saving, use parallelism, include a numeric comparison” → “Save 1 kWh per day, stay cool 24 h”.
Code debugging
v1: “Python quick‑sort implementation” – basic code without comments.
v2: “Add Chinese comments, handle duplicates, provide time‑complexity analysis” – optimized, production‑grade code.
Bad Examples
One‑shot product intro – output contains empty buzzwords such as “premium material”.
Uncorrected command – “The code is wrong, rewrite it” – the model reproduces the same mistake.
5. Summary of Key Techniques and Comparison Experiment
Key techniques:
Clear and specific prompts – include as many relevant details as possible.
Give the model time to think – let it reason stepwise instead of demanding instant answers.
Prompt chaining – decompose complex tasks into sequential sub‑prompts.
Iterative refinement – repeatedly adjust prompts based on previous output.
Comparison experiment
Low‑efficiency prompt: “Introduce neural networks” → textbook definition.
High‑efficiency prompt: “Explain neural networks using a car‑parts analogy, mapping input, hidden, and output layers.” → vivid, easy‑to‑understand metaphor.
Advanced tips
Role‑play: “You are a Michelin‑star chef with 10 years experience, design three high‑protein dishes for fitness enthusiasts.”
Format constraint: “Present a SWOT analysis of cross‑border e‑commerce, max three points per quadrant.”
Avoid oversimplification: “Do not remove technical terms” – ensures concepts like “convolutional neural network” remain.
Empirical data from DeepSeek Lab (2023) shows that a three‑part prompt structure (requirement + format + quality constraints) can improve output accuracy by over 68 %.
6. Conclusion
Prompt engineering involves multiple techniques and scientific principles. Mastering these rules enables more efficient interaction with AI and yields significantly more accurate results.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Mingyi World Elasticsearch
The leading WeChat public account for Elasticsearch fundamentals, advanced topics, and hands‑on practice. Join us to dive deep into the ELK Stack (Elasticsearch, Logstash, Kibana, Beats).
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
