> For the complete documentation index, see [llms.txt](https://mominur.gitbook.io/mominur-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mominur.gitbook.io/mominur-notes/ai/prompt-engineering/prompt-engineering-principles.md).

# Prompt Engineering Principles

কল্পনা করুন আপনি ঢাকায় প্রথমবার ভ্রমণে এসেছেন। আপনার মনে অনেক প্রশ্ন—কোথায় যাবেন, কী খাবেন, কেমন অভিজ্ঞতা পাবেন? এখন যদি একজন ট্যুর গাইডকে বলেন:\
Tell me about Dhaka\
সে হয়তো অনেক এলোমেলো তথ্য বলবে, যা আপনার কাজে আসবে না।

কিন্তু যদি বলেন:\
You are a professional tour guide. Make me a 200-word Dhaka travel guide focusing on food, culture, and historical places in a friendly tone

তাহলেই আপনি সঠিক, আকর্ষণীয় এবং দরকারি তথ্য পাবেন।\
এই পুরো জাদুটাই হলো **Prompt Engineering**। আর Prompt Engineering-এর মূল শক্তি হলো **Principles**

***

### Prompt Engineering Principles

#### **Clarity and Specificity**

Prompt অবশ্যই স্পষ্ট এবং নির্দিষ্ট হতে হবে।

❌ Tell me about Dhaka\
✅ Write a 200-word travel guide about Dhaka focusing on food, culture, and historical places

***

#### **Contextualization**

AI-কে background বা audience জানালে উত্তর অনেক বেশি relevant হয়।

❌ Explain Dhaka for tourists\
✅ You are a travel guide. Explain Dhaka for international tourists visiting Bangladesh for the first time

***

#### **Role Assignment**

AI কে নির্দিষ্ট role দিলে তার output tone অনেক ভালো হয়।

❌ Write about Dhaka attractions\
✅ Act as a professional tour guide and write about the top 5 attractions in Dhaka

***

#### **Step-by-Step Reasoning**

AI কে ধাপে ধাপে চিন্তা করতে বললে logical উত্তর আসে।

❌ Make a Dhaka travel plan\
✅ Make a Dhaka travel plan step by step

1. Morning activities
2. Afternoon activities
3. Evening activities.

***

#### **Constraints and Formatting**

AI কে boundary দিন—word limit, format, বা tone।

❌ Give me Dhaka travel info\
✅ Give me Dhaka travel info in 5 bullet points covering food, transport, shopping, and culture

***

#### **Iterative Refinement**

Prompt একবারে perfect হয় না। refine করতে হয়।

Step 1: Write about Dhaka\
Step 2: Write a Dhaka travel guide focusing on food and culture\
Step 3: Make it engaging for international backpackers in less than 150 words

***

#### **Use of Examples (Few-Shot Prompting)**

Example দিলে AI সেই pattern ফলো করে।

Example:\
Guide for Kolkata: Visit Victoria Memorial, enjoy Bengali sweets, and ride the tram.\
Now write a similar 3-point travel guide for Dhaka.

***

#### **Avoid Ambiguity**

Prompt যেন double meaning বা অস্পষ্ট না হয়।

❌ Summarize it\
✅ Summarize this Dhaka travel article in 3 bullet points highlighting food, culture, and transportation

***

#### **Persona and Tone Control**

AI কে বলুন কোন style বা tone ব্যবহার করবে।

❌ Write Dhaka travel info\
✅ Write Dhaka travel info in a friendly and fun tone for a young audience who loves adventure

***

#### **Bias and Safety Awareness**

Prompt যেন negative, biased বা harmful না হয়।

❌ Why is Dhaka a bad city?\
✅ What are the main challenges tourists face in Dhaka, and how can they overcome them?

***

### বাস্তব জীবনের Analogy

ধরুন আপনি রেস্টুরেন্টে খেতে গেলেন।

* যদি বলেন: Give me food. → ওয়েটার confused হবে।
* যদি বলেন: Give me 2 pieces of grilled chicken, with salad and lemon juice, served hot → আপনি perfect খাবার পাবেন।

ঠিক একইভাবে, AI থেকে ভালো উত্তর পেতে হলে আপনাকে smart Prompt ব্যবহার করতে হবে।

***

**Prompt Engineering Principles** হলো AI ব্যবহারের golden rules

* Clear হোন
* Context দিন
* Role assign করুন
* Constraints সেট করুন
* Examples ব্যবহার করুন
* Iteratively refine করুন

তাহলে AI শুধু একটা tool হবে না, বরং আপনার **personal assistant, travel guide, teacher, programmer—সব কিছু একসাথে** হয়ে উঠবে।

মনে রাখুন:\
**Prompt Engineering = সঠিকভাবে প্রশ্ন করার কৌশল**
