Prompting-এর কৌশল: roles, examples ও iteration
যে কৌশলগুলো ভালো উত্তর দেয় — উদাহরণ দেওয়া, model-কে ধাপে ধাপে ভাবতে বলা, আর কয়েক চেষ্টায় prompt শোধরানো।
ভিত্তি আপনাকে উত্তর দেয়। কৌশল আপনাকে ভালো উত্তর দেয়। নিচের তিনটি সবচেয়ে দ্রুত ফল দেয়, আর প্রত্যেকটি technology-র নয় English-এর প্রশ্ন: model-কে দেখানো আপনি কী বোঝাতে চান, শুধু বলার বদলে।
একটি উদাহরণ দিন
Prompting-এ সবচেয়ে শক্তিশালী চাল হল model-কে আপনার চাওয়া নমুনাটি দেখানো। English-এ এর জন্য teaching থেকে আসা একটি শব্দ আছে: few-shot — যে prompt-এ এক-দুটি উদাহরণ থাকে।
উদাহরণ ছাড়া আপনি বর্ণনা করেন:
Rewrite this sentence in a formal style.
উদাহরণসহ — আপনি দেখান:
Rewrite this sentence in a formal style, like this:
Informal: "We need to fix this fast." → Formal: "This requires prompt attention."
Now rewrite: "Can you send me the file?"
উদাহরণ formal-এর আপনার কাছে কী মানে তার সব অনুমান সরিয়ে দেয়। Model বিমূর্ত শব্দের ব্যাখ্যা না করে নমুনা পুনরাবৃত্তি করে।
উদাহরণ হল একটি সীমা, যা কংক্রিটভাবে লেখা। formal বলা register-কে খোলা রাখা; «This requires prompt attention» দেখানো তাকে স্থির করা। যখনই professional, concise বা engaging-এর মতো শব্দ খুব অস্পষ্ট লাগে, বর্ণনা বন্ধ করে একটি নমুনা দিন।
ধাপে ধাপে ভাবতে বলুন
কয়েক ধাপের কাজের জন্য — সমাধান, রোগনির্ণয়, তুলনা — এমন একটি বাক্যাংশ যোগ করুন যা model-কে নিজের কাজ দেখাতে বাধ্য করে:
- Think step by step.
- Explain your reasoning before the answer.
- List the steps, then give the conclusion.
এটি বদলে দেয় model কী দেয়: খালি ফলাফলের বদলে একটি শৃঙ্খল, যা যাচাই করা যায়। কৌশলটির নাম chain-of-thought, কিন্তু তা ব্যবহার করতে নামের দরকার নেই।
- দুর্বল: Which supplier should we choose?
- শক্তিশালী: Compare the two suppliers on price, reliability and lead time, think through the trade-offs, then recommend one with your reasoning.
শক্তিশালী সংস্করণ একসঙ্গে দুটি কাজ করে: ভাবতে বাধ্য করে আর উত্তরের রূপ স্থির করে, যাতে model কোনো মানদণ্ড না ফেলে।
Iterate করুন
Prompt প্রথম চেষ্টায় খুব কমই তৈরি হয়। আসল দক্ষতা একটি চক্র: চালান, ফলাফল সমালোচনার চোখে পড়ুন, আর ফারাক মেটাতে prompt আবার লিখুন। প্রতিটি রাউন্ড আগের উত্তরে যা অভাব ছিল তা যোগ করে।
Round 1: Write an email asking for a deadline extension. উত্তর: সঠিক, কিন্তু ফ্যাকাশে email। Round 2: Write an email asking for a deadline extension. It is going to a strict manager, so be respectful, give a concrete reason, and propose a new date.
Iteration সেই জায়গা যেখানে আগের দক্ষতাগুলো মেলে: prompt-এর চারটি অংশ একে একে যোগ হয়, যতক্ষণে উত্তর দেখায় কোনটি বাদ পড়েছে। আর উত্তরের সমালোচনামূলক পড়া সেই একই সঠিকতা যা আপনি প্রযুক্তিগত সমস্যার বর্ণনায় আনতেন।
Model-কে নিজের সমালোচনা করতে বলুন
একটি কাজের শেষ চাল: model-কে নিজের উত্তরটি দুর্বলতা খুঁজতে দেখতে বলুন।
- What is the weakest point in this argument?
- What could be wrong with this answer?
- Rewrite this, then list the assumptions you made.
এটি model-এর আত্মবিশ্বাসের সঙ্গে বলার অভ্যাসের বীমা — যার মধ্যে hallucinationsও আছে। আপনি তাকে সঠিক হতে বলছেন না; বলছেন দেখাতে কোথায় সে ভুল হতে পারে, আর এটি এমন তথ্য যা ব্যবহার করা যায়।
কৌশলগুলো একসঙ্গে
একটি prompt এদের মেলাতে পারে:
Act as a careful editor. Rewrite this paragraph to be clearer. Here is an example of the clarity I want: "The meeting was delayed" → "We moved the meeting to Thursday." Think about what makes the example clearer, then apply that to the paragraph. List the changes you made.
Role, উদাহরণ, যুক্তি আর কাজ দেখানোর অনুরোধ — চার বাক্যে পুরো দল।
নিজে যাচাই করুন
নিচের কুইজটি কৌশলগুলো আর তাদের চালানো বাক্যাংশ যাচাই করে।