> 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/what-is-prompt-engineering.md).

# What is Prompt Engineering

ধরুন আপনি Google-এ কিছু সার্চ করলেন — Best restaurants near me\
যদি লিখতেন শুধু restaurant তাহলে কি হতো? Google হয়তো random রেস্টুরেন্ট দেখাতো। কিন্তু আপনি যত specific বা পরিষ্কারভাবে লিখবেন, ফলাফল ততই আপনার জন্য relevant হবে।

এটাই আসলে Prompt এর খেলা। আর এই Prompt-কে smart ভাবে তৈরি করার science-ই হলো **Prompt Engineering**

***

### Prompt কী?

**Prompt** হলো সেই নির্দেশনা বা input যা আমরা AI Model (যেমন ChatGPT, Gemini, Claude ইত্যাদি) কে দেই, যাতে সে আমাদের কাঙ্ক্ষিত output দেয়।

একটা Prompt হতে পারে:

* এক লাইনের প্রশ্ন → Summarize this article in 3 points
* বিস্তারিত নির্দেশনা → Act as a career advisor and suggest me 3 job roles suitable for a person who knows Python, Django, and React
* এমনকি role-play এর মতোও হতে পারে → You are a fitness trainer. Make me a 7-day workout plan

অর্থাৎ, Prompt হলো AI-কে দেওয়া নির্দেশনার ভাষা। যত স্পষ্টভাবে লিখবেন, output তত নিখুঁত হবে।

***

### Prompt Engineering কী?

**Prompt Engineering** হলো সেই কৌশল বা art & science, যার মাধ্যমে আমরা AI model-কে এমনভাবে Prompt দেই যাতে সে সর্বোচ্চ কার্যকর, সঠিক এবং দরকারি উত্তর দেয়।

এখানে শুধু প্রশ্ন করা নয়, বরং:

* Context দেওয়া
* Role নির্ধারণ করা (যেমন: Act as a programmer)
* Constraint দেওয়া (যেমন: Write within 500 words)
* Step-by-step চিন্তা করানো (Explain step by step)

সব মিলিয়ে, Prompt Engineering হলো **Effective communication with AI**।

***

### কেন Prompt Engineering প্রয়োজন?

যত শক্তিশালী AI হোক, যদি Prompt ভালো না হয় → Output হবে vague, ভুল বা অপ্রাসঙ্গিক।

বাস্তব উদাহরণ ১:

* Prompt 1: Write about Dhaka → AI লিখবে সাধারণ তথ্য, boring হবে।
* Prompt 2: Write a 150-word travel guide about Dhaka focusing on food, culture, and historical places. Make it fun & engaging → এবার output হবে অনেক বেশি useful এবং reader-friendly

বাস্তব উদাহরণ ২:\
আপনি একজন software engineer, চান AI দিয়ে একটি SQL query লিখাতে।

* যদি লিখেন: Write a query for employee → অসম্পূর্ণ result আসবে।
* কিন্তু যদি লিখেন:\
  Write a SQL query to select employee name, email, and salary from the employees table where salary > 50,000 ordered by salary DESC → Perfect result আসবে।

এজন্যই Prompt Engineering হলো **AI era-এর নতুন skillset**

***
