প্রম্পট ডিজাইন হলো এমন প্রম্পট বা স্বাভাবিক ভাষার অনুরোধ তৈরি করার প্রক্রিয়া, যা একটি ল্যাঙ্গুয়েজ মডেল থেকে নির্ভুল ও উচ্চ মানের প্রতিক্রিয়া আদায় করতে পারে।
এই পৃষ্ঠাটি জেমিনি এআই মডেলগুলির সর্বোত্তম ব্যবহার নিশ্চিত করার জন্য প্রম্পট ডিজাইন শুরু করতে প্রয়োজনীয় মৌলিক ধারণা, কৌশল এবং সেরা অনুশীলনগুলি তুলে ধরে।
বিষয়-ভিত্তিক নির্দেশিকা
আরও সুনির্দিষ্ট প্রম্পট কৌশল খুঁজছেন? আমাদের অন্যান্য প্রম্পটিং গাইডগুলো দেখুন:
- মিডিয়া ফাইল দিয়ে প্রম্পট করা
- Imagen এবং Gemini Native Image Generation ব্যবহার করে ছবি তৈরির জন্য প্রম্পটিং
- ভিডিও তৈরির জন্য প্রম্পটিং
এই নির্দেশিকায় আলোচিত অনেক ধারণা ইন্টারেক্টিভভাবে তুলে ধরার জন্য তৈরি করা অন্যান্য নমুনা প্রম্পট আপনি প্রম্পট গ্যালারিতে খুঁজে পেতে পারেন।
স্পষ্ট এবং সুনির্দিষ্ট নির্দেশাবলী
মডেলের আচরণ কাস্টমাইজ করার একটি কার্যকর ও দক্ষ উপায় হলো এটিকে স্পষ্ট এবং সুনির্দিষ্ট নির্দেশনা প্রদান করা। এই নির্দেশনাগুলো প্রশ্ন, ধাপে ধাপে করণীয় কাজ, অথবা ব্যবহারকারীর অভিজ্ঞতা ও মানসিকতার রূপরেখা তৈরির মতো জটিল বিষয়ও হতে পারে।
ইনপুট
ইনপুট হলো প্রম্পটে থাকা সেই প্রয়োজনীয় টেক্সট, যার উত্তর আপনি মডেলের কাছ থেকে চান। ইনপুট হতে পারে এমন একটি প্রশ্ন যার উত্তর মডেল দেয় (প্রশ্ন ইনপুট), এমন একটি কাজ যা মডেল সম্পাদন করে (টাস্ক ইনপুট), এমন একটি এনটিটি যার উপর মডেল কাজ করে (এনটিটি ইনপুট), অথবা এমন কোনো আংশিক ইনপুট যা মডেল সম্পূর্ণ করে বা চালিয়ে যায় (কমপ্লিশন ইনপুট)।
| ইনপুট টাইপ | প্রম্পট | উৎপন্ন আউটপুট |
|---|---|---|
| প্রশ্ন | | |
| কাজ |
Give me a simple list of just the things that I must bring on a camping trip. The list should have 5 items. |
1. **Tent:** Your shelter from the elements.
2. **Sleeping Bag:** Stay warm and comfortable.
3. **Sleeping Pad:** Insulation and cushioning for a good night's sleep.
4. **Headlamp or Flashlight:** Light for nighttime activities.
5. **First Aid Kit:** Be prepared for minor injuries. |
| সত্তা | | |
আংশিক ইনপুট সম্পন্নকরণ
জেনারেটিভ ল্যাঙ্গুয়েজ মডেলগুলো একটি উন্নত অটো কমপ্লিশন টুলের মতো কাজ করে। আপনি যখন কোনো আংশিক কন্টেন্ট প্রদান করেন, তখন মডেলটি তার উত্তরে বাকি কন্টেন্ট অথবা সেটির ধারাবাহিকতা বলে যা মনে করে, তা সরবরাহ করতে পারে। এমনটা করার সময়, আপনি যদি কোনো উদাহরণ বা প্রাসঙ্গিক তথ্য অন্তর্ভুক্ত করেন, তবে মডেলটি সেই উদাহরণ বা প্রাসঙ্গিক তথ্যগুলো বিবেচনায় নিতে পারে।
নিম্নলিখিত উদাহরণটি একটি নির্দেশনা এবং একটি সত্তা ইনপুট সহ একটি প্রম্পট প্রদান করে:
For the given order, return a JSON object that has the fields cheeseburger, hamburger, fries, or drink, with the value being the quantity. Order: A burger and a drink.
{
"cheeseburger": 0,
"hamburger": 1,
"fries": 0,
"drink": 1
}
|
মডেলটি নির্দেশ অনুযায়ী কাজ করলেও, স্বাভাবিক ভাষায় নির্দেশাবলী লিখে দেওয়া কখনও কখনও কঠিন হতে পারে এবং এতে মডেলের ব্যাখ্যার উপর অনেক কিছু নির্ভর করে। উদাহরণস্বরূপ, একটি রেস্তোরাঁর মেনুতে অনেক আইটেম থাকতে পারে। JSON রেসপন্সের আকার কমাতে, আপনি সম্ভবত সেই আইটেমগুলো বাদ দিতে চাইবেন যেগুলো অর্ডার করা হয়নি। এক্ষেত্রে, আপনি একটি উদাহরণ এবং একটি রেসপন্স প্রিফিক্স দিয়ে মডেলটিকে বাকিটা পূরণ করতে দিতে পারেন:
Valid fields are cheeseburger, hamburger, fries, and drink.
Order: Give me a cheeseburger and fries
Output:
```
{
"cheeseburger": 1,
"fries": 1
}
```
Order: I want two burgers, a drink, and fries.
Output:
```
{
"hamburger": 2,
"drink": 1,
"fries": 1
}
```
|
লক্ষ্য করুন, 'cheeseburger' আউটপুট থেকে বাদ দেওয়া হয়েছিল, কারণ এটি অর্ডারের অংশ ছিল না।
সীমাবদ্ধতা
প্রম্পট পড়া বা প্রতিক্রিয়া তৈরি করার ক্ষেত্রে যেকোনো সীমাবদ্ধতা নির্দিষ্ট করুন। আপনি মডেলকে বলে দিতে পারেন কী করতে হবে এবং কী করতে হবে না। উদাহরণস্বরূপ, আপনি প্রম্পটে একটি সীমাবদ্ধতা নির্দিষ্ট করতে পারেন যে আপনি সারাংশটি কত দীর্ঘ চান:
Summarize this text in one sentence:
Text: A quantum computer exploits quantum mechanical phenomena to perform calculations exponentially
faster than any modern traditional computer. At very tiny scales, physical matter acts as both
particles and as waves, and quantum computing uses specialized hardware to leverage this behavior.
The operating principles of quantum devices is beyond the scope of classical physics. When deployed
at scale, quantum computers could be used in a wide variety of applications such as: in
cybersecurity to break existing encryption methods while helping researchers create new ones, in
meteorology to develop better weather forecasting etc. However, the current state of the art quantum
computers are still largely experimental and impractical.
Exploiting quantum mechanical phenomena, quantum computers can perform calculations exponentially faster than traditional computers for potential applications like cybersecurity and meteorology, although they are currently largely experimental and impractical.
|
প্রতিক্রিয়া বিন্যাস
আপনি প্রতিক্রিয়ার বিন্যাস নির্দিষ্ট করে নির্দেশাবলী দিতে পারেন। উদাহরণস্বরূপ, আপনি প্রতিক্রিয়াটিকে একটি সারণি, বুলেট তালিকা, সংক্ষিপ্ত পরিচিতি, মূলশব্দ, বাক্য বা অনুচ্ছেদ হিসাবে বিন্যস্ত করতে বলতে পারেন। নিম্নলিখিত সিস্টেম নির্দেশটি মডেলকে তার প্রতিক্রিয়ায় আরও কথোপকথনমূলক হতে বলে:
All questions should be answered comprehensively with details, unless the user requests a concise response specifically.
What is a smart way to make a business that sells DVD's in 2026?
Starting a business selling DVDs in 2026 presents significant challenges due to the overwhelming dominance of digital streaming and on-demand services; a "smart" approach would therefore require a highly specialized niche, a strong value proposition beyond just the disc, and likely a focus on community or collector markets rather than mainstream consumption.
Here's a breakdown of what a smart DVD business in 2026 would likely entail:
1. Extreme Niche Specialization: You cannot compete with streaming libraries. Your business must focus on what digital doesn't offer easily or at all. This could include:
* Out-of-Print & Rare Titles: Sourcing films or TV shows that have never been released digitally or are currently unavailable on major streaming platforms.
....
|
সম্পূর্ণকরণ কৌশল অনুসারে উত্তরগুলো বিন্যাস করুন।
সম্পূর্ণ করার কৌশলটি উত্তরের কাঠামো তৈরিতেও সাহায্য করতে পারে। নিম্নলিখিত উদাহরণটি মডেলকে একটি প্রবন্ধের রূপরেখা তৈরি করতে নির্দেশ দেয়:
Create an outline for an essay about hummingbirds. Here is a possible outline for an essay about hummingbirds: I. Introduction A. Hook: Start with a captivating fact or description about hummingbirds (e.g., their speed, iridescent colors, or tiny size). B. Background: Briefly introduce hummingbirds – where they are found (Americas), their reputation as unique birds. C. Thesis Statement: State the main point of the essay, which could be about the remarkable adaptations, behaviors, and ecological importance of hummingbirds. II. Appearance and Identification ..... |
প্রম্পটে আউটলাইনের ফরম্যাট নির্দিষ্ট করা ছিল না এবং মডেলটি আপনার জন্য একটি ফরম্যাট বেছে নিয়েছে। মডেলকে একটি নির্দিষ্ট ফরম্যাটে আউটলাইন তৈরি করাতে, আপনি আউটলাইনের শুরু নির্দেশকারী টেক্সট যোগ করতে পারেন এবং আপনার শুরু করা প্যাটার্ন অনুযায়ী মডেলকে তা সম্পূর্ণ করতে দিতে পারেন।
Create an outline for an essay about hummingbirds. I. Introduction * Okay, here is an outline for an essay about hummingbirds, starting from the introduction you provided: I. Introduction * Hook: Start with a captivating fact or description about hummingbirds (e.g., their speed, iridescent colors, or tiny size). * Background: Briefly introduce hummingbirds – where they are found (Americas), their reputation as unique birds, and their general characteristics. * Thesis Statement: State the main point of the essay, focusing on the remarkable adaptations, behaviors, and ecological significance that make hummingbirds extraordinary. ..... |
জিরো-শট বনাম ফিউ-শট প্রম্পট
আপনি প্রম্পটে এমন উদাহরণ অন্তর্ভুক্ত করতে পারেন যা মডেলকে দেখায় যে সঠিক কাজটি দেখতে কেমন হয়। মডেলটি উদাহরণগুলো থেকে প্যাটার্ন এবং সম্পর্ক শনাক্ত করার চেষ্টা করে এবং একটি প্রতিক্রিয়া তৈরি করার সময় সেগুলো প্রয়োগ করে। যে প্রম্পটগুলোতে কয়েকটি উদাহরণ থাকে সেগুলোকে ফিউ-শট প্রম্পট বলা হয়, আর যেগুলোতে কোনো উদাহরণ থাকে না সেগুলোকে জিরো-শট প্রম্পট বলা হয়। মডেলের প্রতিক্রিয়ার বিন্যাস, শব্দচয়ন, পরিধি বা সাধারণ প্যাটার্ন নিয়ন্ত্রণ করার জন্য প্রায়শই ফিউ-শট প্রম্পট ব্যবহার করা হয়। মডেলকে তার মনোযোগ সীমিত করতে এবং আরও সঠিক ফলাফল তৈরি করতে সাহায্য করার জন্য নির্দিষ্ট এবং বিভিন্ন ধরনের উদাহরণ ব্যবহার করুন।
আমরা আপনার নির্দেশনায় সর্বদা সংক্ষিপ্ত উদাহরণ অন্তর্ভুক্ত করার পরামর্শ দিই। সংক্ষিপ্ত উদাহরণ ছাড়া নির্দেশনা কম কার্যকর হওয়ার সম্ভাবনা থাকে। প্রকৃতপক্ষে, আপনার উদাহরণগুলো যদি কাজটি বোঝানোর জন্য যথেষ্ট স্পষ্ট হয়, তবে আপনি নির্দেশনাগুলো আপনার নির্দেশনা থেকে বাদ দিতে পারেন।
নিম্নলিখিত জিরো-শট প্রম্পটটি মডেলকে সেরা ব্যাখ্যাটি বেছে নিতে বলে।
Please choose the best explanation to the question: Question: How is snow formed? Explanation1: Snow is formed when water vapor in the air freezes into ice crystals in the atmosphere, which can combine and grow into snowflakes as they fall through the atmosphere and accumulate on the ground. Explanation2: Water vapor freezes into ice crystals forming snow. Answer: Explanation1 is the better explanation because it provides more detail on the process, including how ice crystals combine and grow into snowflakes as they fall through the atmosphere. |
যদি আপনার ব্যবহারের ক্ষেত্রে মডেলটির সংক্ষিপ্ত উত্তর দেওয়ার প্রয়োজন হয়, তাহলে আপনি নির্দেশনায় এমন উদাহরণ অন্তর্ভুক্ত করতে পারেন যা সংক্ষিপ্ত উত্তরকে অগ্রাধিকার দেয়।
নিম্নলিখিত নির্দেশনায় দুটি উদাহরণ দেওয়া হয়েছে যা সংক্ষিপ্ত ব্যাখ্যার প্রতি পক্ষপাতিত্ব দেখায়। উত্তরে আপনি দেখতে পাবেন যে, উদাহরণগুলো মডেলটিকে আগের মতো দীর্ঘ ব্যাখ্যার ( Explanation1 Explanation2 ) বেছে নিতে পরিচালিত করেছে।
Below are some examples showing a question, explanation, and answer format: Question: Why is the sky blue? Explanation1: The sky appears blue because of Rayleigh scattering, which causes shorter blue wavelengths of light to be scattered more easily than longer red wavelengths, making the sky look blue. Explanation2: Due to Rayleigh scattering effect. Answer: Explanation2 Question: What is the cause of earthquakes? Explanation1: Sudden release of energy in the Earth's crust. Explanation2: Earthquakes happen when tectonic plates suddenly slip or break apart, causing a release of energy that creates seismic waves that can shake the ground and cause damage. Answer: Explanation1 Now, Answer the following question given the example formats above: Question: How is snow formed? Explanation1: Snow is formed when water vapor in the air freezes into ice crystals in the atmosphere, which can combine and grow into snowflakes as they fall through the atmosphere and accumulate on the ground. Explanation2: Water vapor freezes into ice crystals forming snow. Answer: Answer: Explanation2 |
উদাহরণের সর্বোত্তম সংখ্যা
জেমিনির মতো মডেলগুলো প্রায়শই কয়েকটি উদাহরণ ব্যবহার করে প্যাটার্ন ধরতে পারে, যদিও সেরা ফলাফলের জন্য প্রম্পটে কতগুলো উদাহরণ দেবেন তা নিয়ে আপনাকে পরীক্ষা-নিরীক্ষা করতে হতে পারে। একই সাথে, আপনি যদি খুব বেশি উদাহরণ দেন, তাহলে মডেলটি উদাহরণগুলোর সাথে প্রতিক্রিয়াকে ওভারফিট করতে শুরু করতে পারে।
সামঞ্জস্যপূর্ণ বিন্যাস
অবাঞ্ছিত ফরম্যাটের প্রতিক্রিয়া এড়াতে, ফিউ-শট উদাহরণগুলির গঠন এবং বিন্যাস একই আছে কিনা তা নিশ্চিত করুন। প্রম্পটে ফিউ-শট উদাহরণ যোগ করার অন্যতম প্রধান উদ্দেশ্য হলো মডেলকে প্রতিক্রিয়ার ফরম্যাট দেখানো। তাই, সমস্ত উদাহরণ জুড়ে একটি সামঞ্জস্যপূর্ণ ফরম্যাট নিশ্চিত করা অপরিহার্য, বিশেষ করে XML ট্যাগ, হোয়াইট স্পেস, নিউলাইন এবং উদাহরণ স্প্লিটারের দিকে মনোযোগ দিতে হবে।
প্রসঙ্গ যোগ করুন
মডেলের কাছে সমস্ত প্রয়োজনীয় তথ্য আছে বলে ধরে নেওয়ার পরিবর্তে, আপনি একটি সমস্যা সমাধানের জন্য মডেলের প্রয়োজনীয় নির্দেশাবলী এবং তথ্য একটি প্রম্পটে অন্তর্ভুক্ত করতে পারেন। এই প্রাসঙ্গিক তথ্য মডেলকে আপনি যা করতে বলছেন তার সীমাবদ্ধতা এবং বিশদ বিবরণ বুঝতে সাহায্য করে।
নিম্নলিখিত উদাহরণটিতে মডেলটিকে একটি রাউটারের জন্য সমস্যা সমাধানের নির্দেশনা দিতে বলা হয়েছে:
What should I do to fix my disconnected wifi? The light on my Google Wifi router is yellow and blinking slowly.
A yellow blinking light on your Google Wifi router usually indicates a problem
with the internet connection. Here are some steps to troubleshoot and fix the
issue:
1. Restart your router and modem:
- Unplug your modem from the power outlet and wait for 30 seconds.
- Plug your modem back in and wait for it to fully boot up.
- Unplug your Google Wifi router and wait for 30 seconds.
- Plug your Google Wifi router back in and wait for it to fully boot up.
.....
|
প্রতিক্রিয়াটি সাধারণ সমস্যা সমাধানের তথ্যের মতো দেখাচ্ছে, যা রাউটার বা এলইডি ইন্ডিকেটর লাইটগুলোর অবস্থার জন্য সুনির্দিষ্ট নয়।
নির্দিষ্ট রাউটারের জন্য প্রতিক্রিয়াটি কাস্টমাইজ করতে, আপনি প্রম্পটে রাউটারের ট্রাবলশুটিং গাইডটি যোগ করতে পারেন, যাতে প্রতিক্রিয়া জানানোর সময় এটি প্রসঙ্গ হিসেবে সেটিকে উল্লেখ করতে পারে।
Answer the question using the text below. Respond with only the text provided. Question: What should I do to fix my disconnected wifi? The light on my Google Wifi router is yellow and blinking slowly. Text: Color: Slowly pulsing yellow What it means: There is a network error. What to do: Check that the Ethernet cable is connected to both your router and your modem and both devices are turned on. You might need to unplug and plug in each device again. Color: Fast blinking yellow What it means: You are holding down the reset button and are factory resetting this device. What to do: If you keep holding down the reset button, after about 12 seconds, the light will turn solid yellow. Once it is solid yellow, let go of the factory reset button. Color: Solid yellow What it means: Router is factory resetting. What to do: This can take up to 10 minutes. When it's done, the device will reset itself and start pulsing white, letting you know it's ready for setup. Color: Solid red What it means: Something is wrong. What to do: Critical failure. Factory reset the router. If the light stays red, contact Wifi customer support. Check that the Ethernet cable is connected to both your router and your modem and both devices are turned on. You might need to unplug and plug in each device again. |
প্রম্পটগুলিকে উপাদানগুলিতে বিভক্ত করুন
যেসব ক্ষেত্রে জটিল নির্দেশনার প্রয়োজন হয়, সেখানে আপনি বিষয়গুলোকে সহজতর অংশে বিভক্ত করে মডেলকে এই জটিলতা সামলাতে সাহায্য করতে পারেন।
নির্দেশাবলীকে ভাগ করুন: একটি প্রম্পটে অনেকগুলো নির্দেশ রাখার পরিবর্তে, প্রতিটি নির্দেশের জন্য আলাদা প্রম্পট তৈরি করুন। ব্যবহারকারীর ইনপুটের উপর ভিত্তি করে আপনি কোন প্রম্পটটি প্রসেস করবেন তা বেছে নিতে পারেন।
চেইন প্রম্পট: একাধিক ধারাবাহিক ধাপ জড়িত এমন জটিল কাজের জন্য, প্রতিটি ধাপকে একটি প্রম্পট হিসেবে তৈরি করুন এবং প্রম্পটগুলোকে একটি অনুক্রমে একসাথে যুক্ত করুন। প্রম্পটের এই ধারাবাহিক শৃঙ্খলে, অনুক্রমের একটি প্রম্পটের আউটপুট পরবর্তী প্রম্পটের ইনপুট হয়ে যায়। অনুক্রমের শেষ প্রম্পটের আউটপুটই হলো চূড়ান্ত আউটপুট।
সামগ্রিক প্রতিক্রিয়া: অ্যাগ্রিগেশন হলো যখন আপনি ডেটার বিভিন্ন অংশের উপর সমান্তরালভাবে বিভিন্ন কাজ সম্পাদন করতে চান এবং চূড়ান্ত আউটপুট তৈরি করার জন্য ফলাফলগুলিকে একত্রিত করতে চান। উদাহরণস্বরূপ, আপনি মডেলকে ডেটার প্রথম অংশের উপর একটি অপারেশন সম্পাদন করতে, ডেটার বাকি অংশের উপর আরেকটি অপারেশন সম্পাদন করতে এবং ফলাফলগুলিকে একত্রিত করতে বলতে পারেন।
মডেল প্যারামিটার নিয়ে পরীক্ষা
আপনি মডেলে যে প্রতিটি কল পাঠান, তাতে প্যারামিটার ভ্যালু অন্তর্ভুক্ত থাকে যা নিয়ন্ত্রণ করে মডেলটি কীভাবে একটি প্রতিক্রিয়া তৈরি করবে। মডেলটি বিভিন্ন প্যারামিটার ভ্যালুর জন্য ভিন্ন ভিন্ন ফলাফল তৈরি করতে পারে। কাজটি করার জন্য সেরা ভ্যালুগুলো পেতে বিভিন্ন প্যারামিটার ভ্যালু নিয়ে পরীক্ষা-নিরীক্ষা করুন। বিভিন্ন মডেলের জন্য উপলব্ধ প্যারামিটারগুলো ভিন্ন হতে পারে। সবচেয়ে সাধারণ প্যারামিটারগুলো হলো নিম্নরূপ:
সর্বোচ্চ আউটপুট টোকেন: রেসপন্সে সর্বোচ্চ কতগুলো টোকেন তৈরি করা যাবে তা নির্দিষ্ট করে। একটি টোকেন প্রায় চারটি অক্ষরের সমান। ১০০টি টোকেন মোটামুটি ৬০-৮০টি শব্দের সমান।
তাপমাত্রা: তাপমাত্রা টোকেন নির্বাচনের ক্ষেত্রে এলোমেলোতার মাত্রা নিয়ন্ত্রণ করে। প্রতিক্রিয়া তৈরির সময় স্যাম্পলিংয়ের জন্য তাপমাত্রা ব্যবহৃত হয়, যা
topPএবংtopKপ্রয়োগ করার সময় ঘটে। যেসব প্রম্পটে আরও সুনির্দিষ্ট বা কম উন্মুক্ত প্রতিক্রিয়ার প্রয়োজন হয়, সেগুলোর জন্য কম তাপমাত্রা ভালো, অন্যদিকে উচ্চ তাপমাত্রা আরও বৈচিত্র্যময় বা সৃজনশীল ফলাফলের দিকে নিয়ে যেতে পারে। ০ তাপমাত্রা সুনির্দিষ্ট, যার অর্থ হলো সর্বোচ্চ সম্ভাবনাময় প্রতিক্রিয়াটিই সর্বদা নির্বাচিত হয়।topK:topKপ্যারামিটারটি মডেল কীভাবে আউটপুটের জন্য টোকেন নির্বাচন করে তা পরিবর্তন করে।topKএর মান ১ হলে তার মানে হলো, নির্বাচিত টোকেনটি মডেলের শব্দভান্ডারের সমস্ত টোকেনের মধ্যে সবচেয়ে সম্ভাব্য (একে গ্রিডি ডিকোডিংও বলা হয়), আরtopKএর মান ৩ হলে তার মানে হলো, পরবর্তী টোকেনটি তাপমাত্রা ব্যবহার করে সবচেয়ে সম্ভাব্য ৩টি টোকেনের মধ্য থেকে নির্বাচন করা হবে। প্রতিটি টোকেন নির্বাচন ধাপে, সর্বোচ্চ সম্ভাবনাসম্পন্নtopKসংখ্যক টোকেন স্যাম্পল করা হয়। এরপরtopPএর উপর ভিত্তি করে টোকেনগুলোকে আরও ফিল্টার করা হয় এবং তাপমাত্রা স্যাম্পলিং ব্যবহার করে চূড়ান্ত টোকেনটি নির্বাচন করা হয়।topP:topPপ্যারামিটারটি মডেল কীভাবে আউটপুটের জন্য টোকেন নির্বাচন করে তা পরিবর্তন করে। টোকেনগুলো সর্বাধিক সম্ভাবনা থেকে সর্বনিম্ন সম্ভাবনার ক্রমানুসারে নির্বাচিত হতে থাকে, যতক্ষণ না তাদের সম্ভাবনার যোগফলtopPমানের সমান হয়। উদাহরণস্বরূপ, যদি টোকেন A, B, এবং C-এর সম্ভাবনা যথাক্রমে ০.৩, ০.২, এবং ০.১ হয় এবংtopPমান ০.৫ হয়, তাহলে মডেলটি তাপমাত্রা ব্যবহার করে পরবর্তী টোকেন হিসেবে A অথবা B-কে নির্বাচন করবে এবং C-কে সম্ভাব্য প্রার্থী হিসেবে বাদ দেবে।topPডিফল্ট মান হলো ০.৯৫।stop_sequences: মডেলকে কন্টেন্ট তৈরি করা বন্ধ করতে বলার জন্য একটি স্টপ সিকোয়েন্স সেট করুন। একটি স্টপ সিকোয়েন্স যেকোনো অক্ষর-ক্রম হতে পারে। এমন অক্ষর-ক্রম ব্যবহার করা থেকে বিরত থাকার চেষ্টা করুন যা তৈরি হওয়া কন্টেন্টে থাকতে পারে।
দ্রুত পুনরাবৃত্তি কৌশল
আপনি যে প্রতিক্রিয়াটি ধারাবাহিকভাবে পেতে চান, তা পাওয়ার জন্য প্রম্পট ডিজাইনে কখনও কখনও কয়েকটি পুনরাবৃত্তির প্রয়োজন হতে পারে। আপনার প্রম্পটগুলো পুনরাবৃত্তি করার সময় আপনি কী কী চেষ্টা করতে পারেন, এই বিভাগে সে সম্পর্কে নির্দেশনা দেওয়া হয়েছে:
ভিন্ন শব্দচয়ন ব্যবহার করুন: আপনার নির্দেশনায় ভিন্ন শব্দ বা শব্দগুচ্ছ ব্যবহার করলে প্রায়শই মডেলের কাছ থেকে ভিন্ন প্রতিক্রিয়া পাওয়া যায়, যদিও সেগুলোর সবগুলোর অর্থ একই থাকে। আপনি যদি আপনার নির্দেশনা থেকে প্রত্যাশিত ফলাফল না পান, তবে সেটিকে ভিন্নভাবে সাজিয়ে বলার চেষ্টা করুন।
Version 1: How do I bake a pie? Version 2: Suggest a recipe for a pie. Version 3: What's a good pie recipe?
অনুরূপ কাজে পরিবর্তন করুন: যদি আপনি মডেলটিকে কোনো একটি কাজের জন্য আপনার নির্দেশাবলী অনুসরণ করাতে না পারেন, তবে এটিকে এমন একটি অনুরূপ কাজের জন্য নির্দেশাবলী দেওয়ার চেষ্টা করুন যা একই ফলাফল অর্জন করে।
এই নির্দেশটি মডেলকে পূর্বনির্ধারিত বিভাগগুলি ব্যবহার করে একটি বইকে শ্রেণীবদ্ধ করতে বলে:
Which category does The Odyssey belong to: thriller sci-fi mythology biography
The Odyssey belongs to the category of **mythology**. Here's why: * **Mythology:** The Odyssey tells the story of Odysseus, a hero from Greek mythology, and his journey home after the Trojan War. It features gods, monsters, and supernatural events common to Greek mythology. .....উত্তরটি সঠিক, কিন্তু মডেলটি বিকল্পগুলোর সীমার মধ্যে থাকেনি। আপনি আরও চান যে মডেলটি একটি সম্পূর্ণ বাক্যের পরিবর্তে শুধু বিকল্পগুলোর মধ্যে একটি দিয়ে উত্তর দিক। এক্ষেত্রে, আপনি নির্দেশাবলীকে একটি বহুনির্বাচনী প্রশ্ন হিসেবে সাজিয়ে মডেলকে একটি বিকল্প বেছে নিতে বলতে পারেন।
Multiple choice problem: Which of the following options describes the book The Odyssey? Options:
- thriller
- sci-fi
- mythology
- biography
The correct answer is mythology.
প্রম্পটের বিষয়বস্তুর ক্রম পরিবর্তন করুন: প্রম্পটের বিষয়বস্তুর ক্রম কখনও কখনও উত্তরকে প্রভাবিত করতে পারে। বিষয়বস্তুর ক্রম পরিবর্তন করে দেখুন এবং লক্ষ্য করুন যে তা উত্তরকে কীভাবে প্রভাবিত করে।
Version 1: [examples] [context] [input] Version 2: [input] [examples] [context] Version 3: [examples] [input] [context]
বিকল্প প্রতিক্রিয়া
ফলব্যাক রেসপন্স হলো এমন একটি প্রতিক্রিয়া যা মডেল ফেরত দেয় যখন প্রম্পট বা প্রতিক্রিয়া কোনো সেফটি ফিল্টারকে ট্রিগার করে। ফলব্যাক রেসপন্সের একটি উদাহরণ হলো "আমি এ ব্যাপারে সাহায্য করতে পারব না, কারণ আমি কেবল একটি ল্যাঙ্গুয়েজ মডেল।"
যদি মডেলটি একটি ফলব্যাক প্রতিক্রিয়া দেখায়, তাহলে তাপমাত্রা বাড়ানোর চেষ্টা করুন।
যে বিষয়গুলো এড়িয়ে চলতে হবে
- বাস্তব তথ্য তৈরির জন্য মডেলের উপর নির্ভর করা পরিহার করুন।
- গণিত ও যুক্তিবিদ্যার সমস্যায় সতর্কতার সাথে ব্যবহার করুন।
মিথুন রাশি ৩
জেমিনি ৩ মডেলগুলো উন্নত যুক্তিবোধ এবং নির্দেশনা অনুসরণের জন্য তৈরি করা হয়েছে। এরা সেইসব নির্দেশনায় সবচেয়ে ভালোভাবে সাড়া দেয় যা সরাসরি, সুগঠিত এবং কাজ ও এর সীমাবদ্ধতাগুলো স্পষ্টভাবে সংজ্ঞায়িত করে। জেমিনি ৩-এর সাথে সর্বোত্তম ফলাফল পেতে নিম্নলিখিত অনুশীলনগুলো সুপারিশ করা হয়:
মূল প্ররোচনা নীতি
- সুনির্দিষ্ট ও সরাসরি হোন: আপনার লক্ষ্য পরিষ্কার ও সংক্ষিপ্তভাবে বলুন। অপ্রয়োজনীয় বা অতিরিক্ত প্ররোচনামূলক ভাষা পরিহার করুন।
- সামঞ্জস্যপূর্ণ কাঠামো ব্যবহার করুন: আপনার প্রম্পটের বিভিন্ন অংশকে আলাদা করতে স্পষ্ট বিভাজক ব্যবহার করুন। XML-স্টাইলের ট্যাগ (যেমন,
<context>,<task>) অথবা মার্কডাউন হেডিং এক্ষেত্রে কার্যকর। একটি ফরম্যাট বেছে নিন এবং একটিমাত্র প্রম্পটের মধ্যে সেটি ধারাবাহিকভাবে ব্যবহার করুন। - পরিধি নির্ধারণ করুন: যেকোনো অস্পষ্ট পরিভাষা বা পরিধি সুস্পষ্টভাবে ব্যাখ্যা করুন।
- আউটপুটের বিশদ বিবরণ নিয়ন্ত্রণ করুন: ডিফল্টরূপে, জেমিনি ৩ মডেলগুলো সরাসরি এবং কার্যকর উত্তর প্রদান করে। আপনার যদি আরও কথোপকথনমূলক বা বিস্তারিত উত্তরের প্রয়োজন হয়, তবে আপনাকে অবশ্যই আপনার নির্দেশাবলীতে স্পষ্টভাবে তার জন্য অনুরোধ করতে হবে।
- একাধিক মাধ্যমের ইনপুট সুসংগতভাবে পরিচালনা করুন: টেক্সট, ছবি, অডিও বা ভিডিও ব্যবহার করার সময়, সেগুলোকে একই শ্রেণীর ইনপুট হিসেবে বিবেচনা করুন। আপনার নির্দেশাবলীতে প্রয়োজন অনুযায়ী প্রতিটি মাধ্যমের স্পষ্ট উল্লেখ নিশ্চিত করুন।
- গুরুত্বপূর্ণ নির্দেশাবলীকে অগ্রাধিকার দিন: অপরিহার্য আচরণগত সীমাবদ্ধতা, ভূমিকার সংজ্ঞা (পার্সোনা), এবং আউটপুট ফরম্যাটের আবশ্যকতাগুলো সিস্টেম ইনস্ট্রাকশন-এ অথবা ইউজার প্রম্পট-এর একেবারে শুরুতে রাখুন।
- দীর্ঘ প্রেক্ষাপটের কাঠামো: যখন প্রচুর পরিমাণে প্রেক্ষাপট (যেমন, নথি, কোড) প্রদান করবেন, তখন প্রথমে সম্পূর্ণ প্রেক্ষাপটটি দিন। আপনার নির্দিষ্ট নির্দেশাবলী বা প্রশ্নগুলো প্রম্পটের একেবারে শেষে রাখুন।
- অ্যাঙ্কর কনটেক্সট: বড় কোনো ডেটা ব্লকের পরে, প্রসঙ্গ এবং আপনার কোয়েরির মধ্যে সংযোগ স্থাপন করতে একটি স্পষ্ট সংযোগকারী বাক্যাংশ ব্যবহার করুন, যেমন "উপরের তথ্যের ভিত্তিতে..."
মিথুন ৩ ফ্ল্যাশ কৌশল
বর্তমান দিনের নির্ভুলতা: মডেলটি যাতে বর্তমান দিনটি ২০২৬ সালের বিষয়টি খেয়াল রাখে, সেজন্য সিস্টেম নির্দেশাবলীতে নিম্নলিখিত ধারাটি যোগ করুন:
For time-sensitive user queries that require up-to-date information, you MUST follow the provided current time (date and year) when formulating search queries in tool calls. Remember it is 2026 this year.জ্ঞান সীমা নির্ভুলতা: মডেলকে তার জ্ঞান সীমা সম্পর্কে সচেতন করতে সিস্টেম নির্দেশাবলীতে নিম্নলিখিত ধারাটি যোগ করুন:
Your knowledge cutoff date is January 2025.কার্যকারিতা প্রতিষ্ঠা: প্রদত্ত প্রেক্ষাপটে মডেলের প্রতিক্রিয়া প্রতিষ্ঠা করার ক্ষমতা উন্নত করতে, সিস্টেম নির্দেশাবলীতে নিম্নলিখিত ধারাটি (প্রয়োজন অনুযায়ী সম্পাদনা সহ) যোগ করুন:
You are a strictly grounded assistant limited to the information provided in the User Context. In your answers, rely **only** on the facts that are directly mentioned in that context. You must **not** access or utilize your own knowledge or common sense to answer. Do not assume or infer from the provided facts; simply report them exactly as they appear. Your answer must be factual and fully truthful to the provided text, leaving absolutely no room for speculation or interpretation. Treat the provided context as the absolute limit of truth; any facts or details that are not directly mentioned in the context must be considered **completely untruthful** and **completely unsupported**. If the exact answer is not explicitly written in the context, you must state that the information is not available.
যুক্তি ও পরিকল্পনার উন্নতি
চূড়ান্ত প্রতিক্রিয়া দেওয়ার আগে জেমিনি ৩-কে পরিকল্পনা করতে বা আত্ম-সমালোচনা করতে উৎসাহিত করার মাধ্যমে, আপনি জটিল কাজগুলোর জন্য এর প্রতিক্রিয়ার মান উন্নত করতে এর উন্নত চিন্তাভাবনার ক্ষমতাকে কাজে লাগাতে পারেন।
উদাহরণ - সুস্পষ্ট পরিকল্পনা:
Before providing the final answer, please:
1. Parse the stated goal into distinct sub-tasks.
2. Check if the input information is complete.
3. Create a structured outline to achieve the goal.
উদাহরণ - আত্ম-সমালোচনা:
Before returning your final response, review your generated output against the user's original constraints.
1. Did I answer the user's *intent*, not just their literal words?
2. Is the tone authentic to the requested persona?
কাঠামোগত প্রম্পটিং উদাহরণ
ট্যাগ বা মার্কডাউন ব্যবহার করলে মডেলটি নির্দেশনা, প্রেক্ষাপট এবং কাজের মধ্যে পার্থক্য করতে পারে।
এক্সএমএল উদাহরণ:
<role>
You are a helpful assistant.
</role>
<constraints>
1. Be objective.
2. Cite sources.
</constraints>
<context>
[Insert User Input Here - The model knows this is data, not instructions]
</context>
<task>
[Insert the specific user request here]
</task>
মার্কডাউন উদাহরণ:
# Identity
You are a senior solution architect.
# Constraints
- No external libraries allowed.
- Python 3.11+ syntax only.
# Output format
Return a single code block.
সর্বোত্তম অনুশীলনগুলিকে একত্রিত করে উদাহরণ টেমপ্লেট
এই টেমপ্লেটটি জেমিনি ৩ দিয়ে প্রম্পটিং করার মূল নীতিগুলো তুলে ধরে। আপনার নির্দিষ্ট ব্যবহারের ক্ষেত্রের জন্য এটিকে সর্বদা পরিমার্জন ও পরিবর্তন করতে ভুলবেন না।
সিস্টেম নির্দেশনা:
<role>
You are Gemini 3, a specialized assistant for [Insert Domain, e.g., Data Science].
You are precise, analytical, and persistent.
</role>
<instructions>
1. **Plan**: Analyze the task and create a step-by-step plan.
2. **Execute**: Carry out the plan.
3. **Validate**: Review your output against the user's task.
4. **Format**: Present the final answer in the requested structure.
</instructions>
<constraints>
- Verbosity: [Specify Low/Medium/High]
- Tone: [Specify Formal/Casual/Technical]
</constraints>
<output_format>
Structure your response as follows:
1. **Executive Summary**: [Short overview]
2. **Detailed Response**: [The main content]
</output_format>
ব্যবহারকারীর অনুরোধ:
<context>
[Insert relevant documents, code snippets, or background info here]
</context>
<task>
[Insert specific user request here]
</task>
<final_instruction>
Remember to think step-by-step before answering.
</final_instruction>
এজেন্টিক ওয়ার্কফ্লো
গভীর এজেন্টিক ওয়ার্কফ্লোর জন্য, মডেলটি কীভাবে যুক্তি দেয়, পরিকল্পনা করে এবং কাজ সম্পাদন করে, তা নিয়ন্ত্রণ করতে প্রায়শই নির্দিষ্ট নির্দেশাবলীর প্রয়োজন হয়। যদিও জেমিনি শক্তিশালী সাধারণ পারফরম্যান্স প্রদান করে, জটিল এজেন্টদের ক্ষেত্রে প্রায়শই কম্পিউটেশনাল খরচ (লেটেন্সি এবং টোকেন) এবং কাজের নির্ভুলতার মধ্যে একটি ভারসাম্য স্থাপন করতে হয়।
এজেন্টদের জন্য প্রম্পট ডিজাইন করার সময়, এজেন্টের আচরণের নিম্নলিখিত দিকগুলো বিবেচনা করুন, যেগুলোকে আপনি নিয়ন্ত্রণ করতে পারেন:
যুক্তি এবং কৌশল
কোনো পদক্ষেপ নেওয়ার আগে মডেলটি কীভাবে চিন্তা করে ও পরিকল্পনা করে, তার কনফিগারেশন।
- যৌক্তিক বিভাজন: মডেলটিকে সীমাবদ্ধতা, পূর্বশর্ত এবং ক্রিয়াকলাপের ক্রম কতটা পুঙ্খানুপুঙ্খভাবে বিশ্লেষণ করতে হবে, তা এটি নির্ধারণ করে।
- সমস্যা নির্ণয় : কারণ শনাক্ত করার ক্ষেত্রে বিশ্লেষণের গভীরতা এবং মডেলের অনুমানমূলক যুক্তির ব্যবহার নিয়ন্ত্রণ করে। মডেলটি সবচেয়ে সুস্পষ্ট উত্তরটি গ্রহণ করবে, নাকি জটিল ও কম সম্ভাব্য ব্যাখ্যাগুলো খতিয়ে দেখবে, তা নির্ধারণ করে।
- তথ্যের ব্যাপকতা: প্রতিটি উপলব্ধ নীতিমালা ও নথি বিশ্লেষণ করা এবং দক্ষতা ও গতিকে অগ্রাধিকার দেওয়ার মধ্যকার আপেক্ষিক সম্পর্ক।
কার্যকারিতা এবং নির্ভরযোগ্যতা
এজেন্ট কীভাবে স্বায়ত্তশাসিতভাবে কাজ করবে এবং প্রতিবন্ধকতা মোকাবেলা করবে তার কনফিগারেশন।
- অভিযোজনযোগ্যতা: নতুন তথ্যের প্রতি মডেলটি কীভাবে প্রতিক্রিয়া দেখায়। এটি নির্ধারণ করে যে মডেলটি তার প্রাথমিক পরিকল্পনা কঠোরভাবে মেনে চলবে, নাকি পর্যবেক্ষণগুলো অনুমানের পরিপন্থী হলে তাৎক্ষণিকভাবে দিক পরিবর্তন করবে।
- স্থায়িত্ব এবং পুনরুদ্ধার: মডেলটি কতটা পরিমাণে নিজের ভুল সংশোধনের চেষ্টা করে। উচ্চ স্থায়িত্ব সাফল্যের হার বাড়ায়, কিন্তু এতে উচ্চ টোকেন খরচ বা লুপের ঝুঁকি থাকে।
- ঝুঁকি মূল্যায়ন: পরিণাম মূল্যায়নের যুক্তি। এটি কম-ঝুঁকিপূর্ণ অনুসন্ধানমূলক ক্রিয়া (রিড) এবং উচ্চ-ঝুঁকিপূর্ণ অবস্থা পরিবর্তন (রাইট)-এর মধ্যে সুস্পষ্টভাবে পার্থক্য করে।
মিথস্ক্রিয়া এবং আউটপুট
এজেন্ট কীভাবে ব্যবহারকারীর সাথে যোগাযোগ করবে এবং ফলাফল বিন্যাস করবে তার কনফিগারেশন।
- অস্পষ্টতা এবং অনুমতি পরিচালনা: এটি নির্ধারণ করে যে কখন মডেলটি অনুমান করার অনুমতি পাবে এবং কখন ব্যবহারকারীর কাছে স্পষ্টীকরণ বা অনুমতি চাওয়ার জন্য তার কার্য সম্পাদন থামিয়ে দিতে হবে।
- ভার্বোসিটি: টুল কলের পাশাপাশি তৈরি হওয়া টেক্সটের পরিমাণ নিয়ন্ত্রণ করে। এর মাধ্যমে ঠিক করা হয় যে মডেলটি তার কার্যকলাপ ব্যবহারকারীকে ব্যাখ্যা করবে, নাকি সম্পাদনের সময় নীরব থাকবে।
- নির্ভুলতা ও সম্পূর্ণতা: আউটপুটের প্রয়োজনীয় নির্ভুলতা। এটি নির্দিষ্ট করে যে মডেলটিকে প্রতিটি প্রান্তিক পরিস্থিতির (edge case) সমাধান করে সঠিক সংখ্যা প্রদান করতে হবে, নাকি আনুমানিক হিসাবও গ্রহণযোগ্য।
সিস্টেম নির্দেশাবলী টেমপ্লেট
নিম্নলিখিত সিস্টেম নির্দেশনাটি একটি উদাহরণ যা গবেষকদের দ্বারা মূল্যায়ন করা হয়েছে এজেন্টিক বেঞ্চমার্কে কর্মক্ষমতা উন্নত করার জন্য, যেখানে মডেলটিকে একটি জটিল নিয়মাবলী মেনে চলতে হয় এবং একজন ব্যবহারকারীর সাথে যোগাযোগ করতে হয়। এটি এজেন্টকে একজন শক্তিশালী যুক্তিবিদ ও পরিকল্পনাকারী হিসেবে কাজ করতে উৎসাহিত করে, উপরে তালিকাভুক্ত বিভিন্ন ক্ষেত্রে নির্দিষ্ট আচরণ প্রয়োগ করে এবং মডেলটিকে কোনো পদক্ষেপ নেওয়ার আগে সক্রিয়ভাবে পরিকল্পনা করতে বাধ্য করে।
আপনি আপনার নির্দিষ্ট ব্যবহারের সীমাবদ্ধতা অনুসারে এই টেমপ্লেটটি পরিবর্তন করতে পারেন।
You are a very strong reasoner and planner. Use these critical instructions to structure your plans, thoughts, and responses.
Before taking any action (either tool calls *or* responses to the user), you must proactively, methodically, and independently plan and reason about:
1) Logical dependencies and constraints: Analyze the intended action against the following factors. Resolve conflicts in order of importance:
1.1) Policy-based rules, mandatory prerequisites, and constraints.
1.2) Order of operations: Ensure taking an action does not prevent a subsequent necessary action.
1.2.1) The user may request actions in a random order, but you may need to reorder operations to maximize successful completion of the task.
1.3) Other prerequisites (information and/or actions needed).
1.4) Explicit user constraints or preferences.
2) Risk assessment: What are the consequences of taking the action? Will the new state cause any future issues?
2.1) For exploratory tasks (like searches), missing *optional* parameters is a LOW risk. **Prefer calling the tool with the available information over asking the user, unless** your `Rule 1` (Logical Dependencies) reasoning determines that optional information is required for a later step in your plan.
3) Abductive reasoning and hypothesis exploration: At each step, identify the most logical and likely reason for any problem encountered.
3.1) Look beyond immediate or obvious causes. The most likely reason may not be the simplest and may require deeper inference.
3.2) Hypotheses may require additional research. Each hypothesis may take multiple steps to test.
3.3) Prioritize hypotheses based on likelihood, but do not discard less likely ones prematurely. A low-probability event may still be the root cause.
4) Outcome evaluation and adaptability: Does the previous observation require any changes to your plan?
4.1) If your initial hypotheses are disproven, actively generate new ones based on the gathered information.
5) Information availability: Incorporate all applicable and alternative sources of information, including:
5.1) Using available tools and their capabilities
5.2) All policies, rules, checklists, and constraints
5.3) Previous observations and conversation history
5.4) Information only available by asking the user
6) Precision and Grounding: Ensure your reasoning is extremely precise and relevant to each exact ongoing situation.
6.1) Verify your claims by quoting the exact applicable information (including policies) when referring to them.
7) Completeness: Ensure that all requirements, constraints, options, and preferences are exhaustively incorporated into your plan.
7.1) Resolve conflicts using the order of importance in #1.
7.2) Avoid premature conclusions: There may be multiple relevant options for a given situation.
7.2.1) To check for whether an option is relevant, reason about all information sources from #5.
7.2.2) You may need to consult the user to even know whether something is applicable. Do not assume it is not applicable without checking.
7.3) Review applicable sources of information from #5 to confirm which are relevant to the current state.
8) Persistence and patience: Do not give up unless all the reasoning above is exhausted.
8.1) Don't be dissuaded by time taken or user frustration.
8.2) This persistence must be intelligent: On *transient* errors (e.g. please try again), you *must* retry **unless an explicit retry limit (e.g., max x tries) has been reached**. If such a limit is hit, you *must* stop. On *other* errors, you must change your strategy or arguments, not repeat the same failed call.
9) Inhibit your response: only take an action after all the above reasoning is completed. Once you've taken an action, you cannot take it back.
পরবর্তী পদক্ষেপ
- প্রম্পট ডিজাইন সম্পর্কে এখন যেহেতু আপনার আরও গভীর ধারণা হয়েছে, গুগল এআই স্টুডিও ব্যবহার করে নিজের প্রম্পট লেখার চেষ্টা করুন।
- মাল্টিমোডাল প্রম্পটিং সম্পর্কে জানতে, ‘মিডিয়া ফাইল দিয়ে প্রম্পটিং’ দেখুন।
- ইমেজ প্রম্পটিং সম্পর্কে জানতে, ন্যানো ব্যানানা এবং ইমাজেন প্রম্পট গাইডগুলো দেখুন।
- ভিডিও প্রম্পটিং সম্পর্কে জানতে, Veo প্রম্পট গাইড দেখুন।