Prompt Anatomy — ভালো Prompt-এর কাঠামো

লেসন ৬ / ৪৬

❌ খারাপ প্রম্পট vs ✅ ভালো প্রম্পট

❌ "Marketing সম্পর্কে লিখো"

✅ "You are a senior B2B SaaS marketing strategist.
    Write a 500-word LinkedIn post about why SMBs should
    adopt AI tools in 2025. Audience: business owners
    (non-technical). Tone: professional, encouraging,
    data-backed. Include 3 specific use cases.
    End with a question that drives engagement."

পার্থক্য? দ্বিতীয় prompt-এ কে, কী, কাদের জন্য, কী tone-এ, কত লম্বা, কী structure — সব পরিষ্কার।

🏗️ RTCFE Framework ⭐

  1. Role — কে আপনি? (persona)
  2. Task — কী করতে হবে?
  3. Context — background, constraint
  4. Format — output-এর কাঠামো
  5. Examples — নমুনা (few-shot)

🎭 Role / Persona

Role assign করলে model সংশ্লিষ্ট domain থেকে উত্তর দেয়।

"You are an expert Python developer with 10 years of
experience in data engineering, specializing in pandas
and PySpark."

"Act as a UX writer for a fintech app targeting
non-technical users in Bangladesh."

🎯 Task — নির্দিষ্ট কাজ

❌ "Code-এ help করো"
✅ "Refactor this function to use async/await and add
    error handling for network failures. Keep the
    function signature unchanged."

📚 Context

Background দিলে model related output দেয়।

"Background: আমাদের team TypeScript strict mode use করে।
Kubernetes-এ ২০০টা microservice চলে। Function প্রতি ৫
মিনিটে cron job হিসেবে run হয়। Memory limit 512MB।"

📐 Format

Output-এর কাঠামো স্পষ্ট বলুন।

"Output as:
1. Markdown table with columns: Pros | Cons | Verdict
2. Then 3-paragraph summary
3. Then bullet list of next steps

Do not include preamble or meta-commentary."

💡 Examples (Few-shot)

২-৫টা example দিলে model pattern ধরতে পারে।

"Convert sentences to formal tone:

Input: gonna grab lunch
Output: I am going to have lunch.

Input: wanna meet up?
Output: Would you like to meet?

Input: thx for the help!
Output: ?"

🔧 বিকল্প Framework

  • CRISPE — Capacity, Role, Insight, Statement, Personality, Experiment
  • RACE — Role, Action, Context, Expectation
  • TASK — Task, Audience, Steps, Knowledge

সব framework-ই একই principle — specific হন, structured হন।

✅ Prompt Quality Checklist

  • ☐ Role / persona স্পষ্ট
  • ☐ Task verb নির্দিষ্ট (analyze, summarize, generate)
  • ☐ Constraint দেওয়া (length, style)
  • ☐ Output format defined
  • ☐ Example আছে (non-trivial হলে)
  • ☐ Tone / audience specified
  • ☐ "Don't do X" negative constraint (যদি দরকার হয়)

📏 Prompt Length

Specific > Short। ১০০-৫০০ শব্দের prompt-ই production quality output দেয়। কিন্তু redundant হবেন না — প্রতিটা line পড়ার মতো হওয়া চাই।

🔁 Iterate ⭐

প্রথম prompt খুব কমই সেরা হয়। Refine করুন, variation test করুন, winner save করুন। Version control-এ রাখুন।

🎓 Practice Exercise

নিচের vague prompt-কে RTCFE দিয়ে improve করুন:

"Write about climate change"

আপনার improved version:
R: ...
T: ...
C: ...
F: ...
E: ...