Prompting
A prompt is the brief that you give an AI model. A clear brief gives you test cases, bug reports, and test data that you can use. A vague brief gives you text that you must write again. This page shows the parts of a good brief and how a tester uses them.
6 min read6 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 5 sources5টি সোর্স · updated Oct 2026আপডেট: Oct 2026
Build a brief, part by partব্রিফ বানান, অংশে অংশে
Add Role, Context, Task, Examples, Format, and Limits one at a time and watch the test-case output tighten.Role, Context, Task, Examples, Format আর Limits একটা একটা করে যোগ করুন, আর দেখুন টেস্ট কেসের আউটপুট ক্রমে ঠিকঠাক হয়।
You’ll learnআপনি শিখবেন
- The six parts of a briefব্রিফের ছয়টা অংশ
- Why a reason helps the model aimকারণ বললে মডেল কেন নিশানা পায়
- Why to give 3 to 5 diverse examplesকেন 3 থেকে 5টা ভিন্ন উদাহরণ দিতে হয়
- What alike examples do to the outputএকই রকম উদাহরণ আউটপুটে কী করে
In plain words
OpenAI defines prompt engineering as the work of writing effective instructions for a model Source 1সোর্স 1. Its guide also says that it is part art and part science to get the output you want Source 1সোর্স 1.
The Claude docs give a useful picture. Think of the model as a brilliant new employee who does not know your norms or your workflows Source 2সোর্স 2. A new colleague does good work when the brief says what to do, why, and in what form. A model is the same.
The docs also give a simple check. Hand your prompt to a colleague who knows little about the task, and let them try to do the work from it alone. If the colleague is confused, the model will be confused too Source 2সোর্স 2.
For a tester, prompting is the base skill. Every other skill in this module (context, research, agents, evals) starts with a clear brief. The site page Prompting shows the same ideas inside Claude Code.
সহজ English
OpenAI says prompt engineering is writing good instructions for a model Source 1সোর্স 1. It also says that getting the output you want is part art and part science Source 1সোর্স 1.
The Claude docs give a good picture. Think of the model as a very smart new employee. This person does not know your rules or how your team works Source 2সোর্স 2. A new colleague does good work when you say what to do, why, and in what form. A model is the same.
The docs give a simple check too. Give your prompt to a colleague who knows little about the task. Let them try to do the work from it alone. If they are confused, the model will be confused too Source 2সোর্স 2.
For a tester, prompting is the first skill. All other skills in this module start with a clear brief.
বাংলা ব্যাখ্যা
OpenAI-এর মতে prompt engineering হলো মডেলের জন্য কার্যকর নির্দেশনা লেখার কাজ Source 1সোর্স 1। তাদের গাইড এটাও বলে যে চাওয়া আউটপুট পাওয়া কিছুটা শিল্প, কিছুটা বিজ্ঞান Source 1সোর্স 1।
Claude-এর ডকস একটা কাজের ছবি দেয়। মডেলকে একজন খুব মেধাবী নতুন কর্মী ভাবুন, যিনি আপনার নিয়ম বা কাজের ধারা জানেন না Source 2সোর্স 2। নতুন সহকর্মী ভালো কাজ করেন যখন ব্রিফে থাকে কী করতে হবে, কেন, আর কোন আকারে। মডেলও তেমন।
ডকস একটা সহজ পরীক্ষাও দেয়। আপনার prompt এমন একজন সহকর্মীকে দেখান, যিনি কাজটা প্রায় জানেন না। তাঁকে সেটা মেনে কাজ করতে বলুন। তিনি বিভ্রান্ত হলে মডেলও বিভ্রান্ত হবে Source 2সোর্স 2।
একজন টেস্টারের জন্য prompting হলো ভিত্তির দক্ষতা। এই মডিউলের বাকি সব দক্ষতা একটা পরিষ্কার ব্রিফ দিয়ে শুরু হয়।
How it works
A good brief has a few parts. This order is the tutorial's own choice:
Role one sentence: who the model acts as
Context the product, the users, and why the task matters
Task what to do, as numbered steps
Examples 3 to 5 input -> output pairs
Format table, JSON, Gherkin, or a fixed template
Limits what to do when information is missingRole. A role in the system prompt focuses the model's behavior and tone. Even one sentence helps Source 2সোর্স 2. In the OpenAI API, developer messages carry the rules and business logic of the system Source 1সোর্স 1.
Context. Say why an instruction matters. The reason gives the model more about your goal, so it can aim its answer Source 2সোর্স 2. The Gemini docs say that background tells the model the limits and the specifics of what you ask Source 3সোর্স 3.
Task. Clear and specific instructions are an effective way to steer a model Source 3সোর্স 3. Use numbered steps when the order or the completeness of the steps matters Source 2সোর্স 2.
Examples. A prompt with no examples is zero-shot. A prompt with a few examples is few-shot Source 3সোর্স 3. The Claude docs suggest 3 to 5 examples that are relevant and diverse, so that they cover edge cases. Put them in <example> tags Source 2সোর্স 2.
Structure. XML tags such as <instructions>, <context>, and <input> keep each kind of content apart, so the model misreads less Source 2সোর্স 2.
Format. You can tell the model the format of its response Source 3সোর্স 3.
Limits. Give the model explicit permission to say "I don't know". This can strongly cut false information Source 4সোর্স 4.
Expect to iterate. A prompt can need a few rounds before the answers are consistent Source 3সোর্স 3.
সহজ English
A good brief has a few parts. The order here is the tutorial's own choice: role, context, task, examples, format, and limits.
Role. Tell the model who it acts as. Even one sentence helps the model's behavior and tone Source 2সোর্স 2. In the OpenAI API, developer messages hold the rules of the system Source 1সোর্স 1.
Context. Say why an instruction matters. Then the model knows more about your goal Source 2সোর্স 2. Context helps the model understand the limits and details of the task Source 3সোর্স 3.
Task. Clear and specific instructions steer the model well Source 3সোর্স 3. Use numbered steps when the order matters Source 2সোর্স 2.
Examples. A prompt with no examples is called zero-shot. A prompt with a few examples is called few-shot Source 3সোর্স 3. The Claude docs suggest 3 to 5 examples. They should match your real task and be different from each other, so that they cover edge cases. Put them in <example> tags Source 2সোর্স 2.
Structure. XML tags like <instructions> and <input> keep each kind of content apart. Then the model makes fewer reading mistakes Source 2সোর্স 2.
Format. You can tell the model the shape of its answer Source 3সোর্স 3.
Limits. Tell the model that it may say "I don't know". This can cut false answers a lot Source 4সোর্স 4.
Expect to try more than once. A prompt can need a few rounds before the answers are steady Source 3সোর্স 3.
বাংলা ব্যাখ্যা
একটা ভালো ব্রিফের কয়েকটা অংশ থাকে। এখানকার ক্রমটা টিউটোরিয়ালের নিজের বাছাই: role, context, task, examples, format, আর limits।
Role. মডেল কার ভূমিকায় কাজ করবে তা বলুন। এক বাক্যও মডেলের আচরণ আর সুর ঠিক করতে সাহায্য করে Source 2সোর্স 2। OpenAI API-তে developer message সিস্টেমের নিয়ম আর business logic বহন করে Source 1সোর্স 1।
Context. একটা নির্দেশনা কেন দরকার তা বলুন। তাহলে মডেল আপনার লক্ষ্য ভালো বোঝে Source 2সোর্স 2। Context মডেলকে কাজের সীমা আর খুঁটিনাটি বুঝতে সাহায্য করে Source 3সোর্স 3।
Task. পরিষ্কার আর নির্দিষ্ট নির্দেশনা মডেলকে ভালোভাবে চালায় Source 3সোর্স 3। ধাপের ক্রম গুরুত্বপূর্ণ হলে সংখ্যা দেওয়া ধাপ ব্যবহার করুন Source 2সোর্স 2।
Examples. উদাহরণ ছাড়া prompt-কে বলে zero-shot। কয়েকটা উদাহরণসহ prompt-কে বলে few-shot Source 3সোর্স 3। Claude-এর ডকস 3 থেকে 5টা উদাহরণের পরামর্শ দেয়। উদাহরণগুলো আসল কাজের সাথে মিলবে আর একটা আরেকটা থেকে আলাদা হবে, যাতে edge case ধরা পড়ে। এগুলো <example> ট্যাগে রাখুন Source 2সোর্স 2।
Structure. <instructions>, <input>-এর মতো XML ট্যাগ প্রতিটা ধরনের কনটেন্ট আলাদা রাখে। তাতে মডেল কম ভুল পড়ে Source 2সোর্স 2।
Format. উত্তরের ফরম্যাট কী হবে তা আপনি মডেলকে বলে দিতে পারেন Source 3সোর্স 3।
Limits. মডেলকে স্পষ্ট করে বলুন যে সে "I don't know" বলতে পারে। এতে ভুল তথ্য অনেক কমতে পারে Source 4সোর্স 4।
একবারে নিখুঁত হবে না। স্থির উত্তর পেতে একটা prompt কয়েকবার ঠিক করতে হতে পারে Source 3সোর্স 3।
How a tester uses it
Test cases from a user story. Put the story in <requirement> tags. Ask for boundary values and negative cases as a table with fixed columns: ID, step, data, expected result. Add 3 good cases from your own suite as examples, so the model copies your style Source 2সোর্স 2. The site page Test Design shows which techniques to ask for.
Bug reports in one shape. Give your bug template and one good report as an example. Then paste raw notes from an exploratory session and ask for one report for each issue. Ask for a numbered list of steps, because the order of the steps matters Source 2সোর্স 2.
A second look at a test plan. Paste the plan and ask what risks it misses. Allow the answer "not enough information" Source 4সোর্স 4, so the model does not invent gaps that are not there.
Test data. Ask for JSON with a fixed set of fields Source 3সোর্স 3. List the edge values that you want: empty strings, the maximum length, Unicode names, and dates on a leap day.
Tutorial advice
This is the tutorial's own advice. Keep your best prompts in the test repository, next to the tests that they helped to write. Give each prompt a short name and a date. When a prompt gives a bad result, fix the prompt in the file, not only in the chat, so the whole team gets the fix.
সহজ English
Test cases from a user story. Put the story in <requirement> tags. Ask for boundary values and negative cases in a table with fixed columns: ID, step, data, and expected result. Add 3 good cases from your own tests as examples. Then the model copies your style Source 2সোর্স 2.
Bug reports in one shape. Give your bug template and one good report as an example. Paste your rough notes from a test session. Ask for one report for each problem. Ask for numbered steps, because the order of the steps matters Source 2সোর্স 2.
A second look at a test plan. Paste the plan. Ask what risks it misses. Let the model answer "not enough information" Source 4সোর্স 4. Then it does not make up gaps.
Test data. Ask for JSON with a fixed set of fields Source 3সোর্স 3. Name the edge values that you want: empty text, the longest text, Unicode names, and leap-day dates.
This is the tutorial's own advice. Keep your best prompts in the test repository, next to the tests that they helped to write. Give each prompt a short name and a date. When a prompt gives a bad result, fix it in the file, not only in the chat. Then the whole team gets the fix.
বাংলা ব্যাখ্যা
User story থেকে test case. Story-টা <requirement> ট্যাগে রাখুন। নির্দিষ্ট কলামসহ একটা টেবিলে boundary value আর negative case চান: ID, step, data, expected result। আপনার নিজের suite থেকে 3টা ভালো কেস উদাহরণ হিসেবে দিন। তাহলে মডেল আপনার ধরন অনুসরণ করে Source 2সোর্স 2।
এক ধাঁচের bug report. আপনার bug template আর একটা ভালো রিপোর্ট উদাহরণ হিসেবে দিন। তারপর exploratory session-এর কাঁচা নোট পেস্ট করুন। প্রতিটা সমস্যার জন্য একটা করে রিপোর্ট চান। ধাপগুলো সংখ্যা দিয়ে চান, কারণ ধাপের ক্রম গুরুত্বপূর্ণ Source 2সোর্স 2।
Test plan-এ দ্বিতীয় চোখ। Plan-টা পেস্ট করে জিজ্ঞেস করুন কোন ঝুঁকি বাদ পড়েছে। "not enough information" উত্তরের অনুমতি দিন Source 4সোর্স 4। তাহলে মডেল এমন ফাঁক বানাবে না যা আসলে নেই।
Test data. নির্দিষ্ট field-সহ JSON চান Source 3সোর্স 3। কোন edge value চান তা লিখে দিন: খালি string, সর্বোচ্চ দৈর্ঘ্য, Unicode নাম, আর leap day-এর তারিখ।
এটা টিউটোরিয়ালের নিজের পরামর্শ। আপনার সেরা prompt-গুলো test repository-তে রাখুন, যে টেস্ট লিখতে সেগুলো সাহায্য করেছে তার পাশে। প্রতিটা prompt-কে একটা ছোট নাম আর তারিখ দিন। কোনো prompt খারাপ ফল দিলে শুধু চ্যাটে নয়, ফাইলেই সেটা ঠিক করুন। তাহলে পুরো টিম সেই সংশোধন পায়।
Tools to try
Each tool below has a chat app and an API. The same brief works in all three, but each vendor's guide has its own tips.
| Tool | What it does | One fact |
|---|---|---|
| ChatGPT (OpenAI) | Chat app and API for OpenAI models | In the API, developer messages give the rules and business logic of the system Source 1সোর্স 1 |
| Claude (Anthropic) | Chat app and API for Claude models | The docs suggest XML tags to keep instructions, context, examples, and inputs apart Source 2সোর্স 2 |
| Gemini (Google) | Chat app and API for Gemini models | The docs recommend few-shot examples in every prompt Source 3সোর্স 3 |
Try the same test-case prompt in two tools, and compare the answers. The difference shows you which parts of your brief were not clear.
সহজ English
Each tool here has a chat app and an API. The same brief works in all three. Each vendor's guide has its own tips.
- ChatGPT (OpenAI): in the API, developer messages give the rules of the system Source 1সোর্স 1.
- Claude (Anthropic): the docs suggest XML tags to keep instructions, context, examples, and inputs apart Source 2সোর্স 2.
- Gemini (Google): the docs recommend few-shot examples in every prompt Source 3সোর্স 3.
Try the same test-case prompt in two tools. Compare the answers. The difference shows which parts of your brief were not clear.
বাংলা ব্যাখ্যা
নিচের প্রতিটা টুলের একটা chat app আর একটা API আছে। একই ব্রিফ তিনটাতেই চলে, তবে প্রতিটা vendor-এর গাইডে নিজস্ব কিছু টিপস আছে।
- ChatGPT (OpenAI): API-তে developer message সিস্টেমের নিয়ম আর business logic দেয় Source 1সোর্স 1।
- Claude (Anthropic): ডকস instructions, context, examples আর inputs আলাদা রাখতে XML ট্যাগের পরামর্শ দেয় Source 2সোর্স 2।
- Gemini (Google): ডকস প্রতিটা prompt-এ few-shot উদাহরণ রাখার পরামর্শ দেয় Source 3সোর্স 3।
একই test-case prompt দুটো টুলে চালিয়ে উত্তর মিলিয়ে দেখুন। পার্থক্যটা দেখায় আপনার ব্রিফের কোন অংশ পরিষ্কার ছিল না।
Common mistakes
A one-line ask. "Write tests for login" gives generic cases. Fix: say the output format and the constraints that you want Source 2সোর্স 2.
A list of "don'ts" only. Fix: say what the model must do in place of what it must not do Source 2সোর্স 2. "Use only the fields in the schema" works better than "don't invent fields".
Examples that all look the same. The model copies their pattern, also the parts that you did not mean. Fix: use diverse examples that cover edge cases Source 2সোর্স 2.
Trust in the first answer. A model can state wrong facts with confidence. Fix: ask the model to find a supporting quote for each claim, and to remove a claim that has no quote Source 4সোর্স 4. These steps reduce errors but do not remove them, so check every critical fact yourself Source 4সোর্স 4.
No way to tell "good" from "bad". Fix: before you tune a prompt, write clear success criteria and a way to test against them Source 5সোর্স 5. See Checking AI Quality (Evals). If an app depends on the prompt, OpenAI suggests pinning it to a specific model snapshot Source 1সোর্স 1.
সহজ English
A one-line ask. "Write tests for login" gives general cases. Fix: say the format and the limits that you want Source 2সোর্স 2.
Only "don'ts". Fix: say what the model must do, not what it must not do Source 2সোর্স 2. "Use only the fields in the schema" works better than "don't make up fields".
Examples that all look the same. The model copies their pattern, even the parts that you did not mean. Fix: use different examples that cover edge cases Source 2সোর্স 2.
Trust in the first answer. A model can say wrong facts in a sure voice. Fix: ask the model to find a quote for each claim, and to remove a claim with no quote Source 4সোর্স 4. This lowers the errors but does not remove all of them. So check every important fact yourself Source 4সোর্স 4.
No way to tell good from bad. Fix: before you change a prompt, write clear success rules and a way to test them Source 5সোর্স 5. If an app depends on the prompt, OpenAI suggests that you fix the app to one model snapshot Source 1সোর্স 1.
বাংলা ব্যাখ্যা
এক লাইনের অনুরোধ। "Write tests for login" সাধারণ মানের কেস দেয়। সমাধান: কোন ফরম্যাট আর কোন সীমা চান তা বলুন Source 2সোর্স 2।
শুধু "করো না"-র তালিকা। সমাধান: মডেলকে কী করতে হবে তা বলুন, কী করবে না তা নয় Source 2সোর্স 2। "don't invent fields"-এর চেয়ে "Use only the fields in the schema" ভালো কাজ করে।
সব উদাহরণ একই রকম। মডেল তাদের ধাঁচ নকল করে, এমনকি যে অংশ আপনি বোঝাতে চাননি সেটাও। সমাধান: edge case ঢাকে এমন ভিন্ন ভিন্ন উদাহরণ দিন Source 2সোর্স 2।
প্রথম উত্তরেই ভরসা। মডেল আত্মবিশ্বাসের সাথে ভুল তথ্য বলতে পারে। সমাধান: প্রতিটা দাবির জন্য মডেলকে একটা সমর্থক উদ্ধৃতি খুঁজতে বলুন, আর উদ্ধৃতি না পেলে দাবিটা সরিয়ে দিতে বলুন Source 4সোর্স 4। এতে ভুল কমে, কিন্তু পুরো দূর হয় না। তাই প্রতিটা গুরুত্বপূর্ণ তথ্য নিজে যাচাই করুন Source 4সোর্স 4।
ভালো আর খারাপ আলাদা করার উপায় নেই। সমাধান: prompt বদলানোর আগে পরিষ্কার success criteria আর সেগুলো টেস্ট করার একটা উপায় লিখুন Source 5সোর্স 5। কোনো app যদি prompt-এর ওপর নির্ভর করে, OpenAI সেটাকে একটা নির্দিষ্ট model snapshot-এ বেঁধে রাখার পরামর্শ দেয় Source 1সোর্স 1।
How to start
- Pick one task that you do each week, for example test cases for a new story.
- Write the brief with the six parts: role, context, task, examples, format, and limits.
- Give the brief to a colleague first. If they are confused, the model will be too Source 2সোর্স 2.
- Run it on three real stories. Note what is wrong in each answer, and change one part of the brief at a time. A few rounds are normal Source 3সোর্স 3.
- Save the final prompt in your repository, and read Context Engineering next, so you stop pasting the same background each time.
সহজ English
- Pick one task that you do each week, for example test cases for a new story.
- Write the brief with the six parts: role, context, task, examples, format, and limits.
- Show the brief to a colleague first. If they are confused, the model will be too Source 2সোর্স 2.
- Run it on three real stories. Note what is wrong in each answer. Change one part of the brief at a time. A few rounds are normal Source 3সোর্স 3.
- Save the final prompt in your repository. Then read the page on context engineering, so you stop pasting the same background each time.
বাংলা ব্যাখ্যা
- প্রতি সপ্তাহে করেন এমন একটা কাজ বাছুন, যেমন নতুন story-র জন্য test case।
- ছয়টা অংশ দিয়ে ব্রিফ লিখুন: role, context, task, examples, format, আর limits।
- আগে ব্রিফটা একজন সহকর্মীকে দেখান। তিনি বিভ্রান্ত হলে মডেলও হবে Source 2সোর্স 2।
- তিনটা আসল story-তে চালান। প্রতিটা উত্তরে কী ভুল তা লিখে রাখুন। একবারে ব্রিফের একটা অংশ বদলান। কয়েকবার ঠিক করা স্বাভাবিক Source 3সোর্স 3।
- চূড়ান্ত prompt-টা আপনার repository-তে রাখুন। তারপর context engineering-এর পেজটা পড়ুন, যাতে প্রতিবার একই পটভূমি পেস্ট করতে না হয়।
Key words
| Word | Meaning |
|---|---|
| Prompt engineering | Writing effective instructions for a model Source 1সোর্স 1 |
| Zero-shot prompt | A prompt with no examples Source 3সোর্স 3 |
| Few-shot prompt | A prompt with a few examples Source 3সোর্স 3 |
| System prompt | The place for the model's role, which focuses its behavior and tone Source 2সোর্স 2 |
| XML tags | Tags such as <context> that keep each kind of content apart Source 2সোর্স 2 |
| Hallucination | Text that is factually wrong or does not match the given context Source 4সোর্স 4 |