ඔයාගේ AI එක බොරු ගොතලා කියන එක නවත්තමු ද?

AI එක බොරු තොරතුරු ගොතලා කියන එක (Hallucination) නවත්තන්නේ කොහොමද? 🛡️🧠
Advanced Prompt Engineering (Part 02)

Part 01 එකෙන් අපි AI එකට Role එකක් දෙන හැටි සහ Few-Shot Examples පාවිච්චි කරලා Output එකේ Pattern එක පාලනය කරන හැටි ඉගෙන ගත්තා මතකයිනේ 🎭📝?

හැබැයි සංකීර්ණ Coding ගැටලුවක් විසඳන්න ගියාම, ගණිතමය තර්කයකදී, හෝ දිගු Document එකක් විශ්ලේෂණය කරද්දී AI එක එකපාරටම වරද්දගන්නවා දැකලා තියෙනවාද 🐛💥?

සමහර වෙලාවට AI එක තමන් නොදන්නා දේවල් පවා හරිම විශ්වාසයෙන් බොරුවට ගොතලා කියනවා (AI Hallucination) 🤥🤖.

අනිවාරෙන්ම ඔයාටත් මේක වෙලා ඇති.

අද Part 02 එකෙන් අපි කතා කරමු AI එකේ තර්කන බුද්ධිය වැඩි කරලා, ඒ වැරදි අවම කරගන්න උදව් වෙන ප්‍රබලතම Advanced Techniques 2 ගැන! 👇🔥


3️⃣ Chain of Thought (CoT) Prompting (පියවරෙන් පියවර සිතීමට සැලැස්වීම) 🔗🪜

➡️ මොකක්ද මේ? 🧠

2022 දී Google Research විද්‍යාඥයන් (Jason Wei et al.) ලෝකයට හඳුන්වා දුන් මේ ක්‍රමයෙන් කරන්නේ, AI එකෙන් කෙලින්ම අවසාන උත්තරය ඉල්ලන්නේ නැතුව, අවසාන උත්තරයට එන තර්කානුකූල පියවර (Step-by-step reasoning) මුලින්ම ලියන්න කියලා බල කිරීමයි 🪜✍️.

➡️ ඇයි මේක මෙච්චර වැදගත්? ⚙️

AI එකක් වැඩ කරන්නේ ඊළඟට එන වචනය (Next Token) අනුමාන කරමින් 🔮. සංකීර්ණ ගණිත ගැටලුවක් හෝ Debugging ප්‍රශ්නයක් එකපාරටම විසඳන්න ගියොත් AI එක ඉක්මන් වෙලා වරද්දගන්නවා 💥.

හැබැයි "Let's think step-by-step" කියලා දුන්නම, AI එක තමන් ලියන පියවරවල් නැවත කියවමින් නිවැරදි තර්කනය ඔස්සේ අවසාන උත්තරයට යනවා ✅🔍.

➡️ ප්‍රායෝගික උදාහරණයක් බලමු: 💡

❌ Basic Prompt:

Fix the bug in this Python code. 🐛

✅ Chain of Thought Prompt:

Analyze this Python code for logic errors. Before giving me the fixed code, think step-by-step: 1) Trace the variable values through each loop iteration, 2) Identify where the logic breaks, 3) Explain why it fails, and finally provide the corrected code.

🐍🛠️ (මෙහෙම කළාම AI එකට Bug එකක් මඟහැරීමේ අවදානම අඩු කරගන්න පුළුවන්! කරලම බලන්නකෝ 🎯✅)


4️⃣ Constraint Setting (සීමාවන් සහ නීති පැනවීම) 🚧🔒

➡️ මොකක්ද මේ? 🛡️

AI එකට කරන්න ඕන දේ වගේම, කරන්න එපා කියන දේවල් (Negative Constraints), දත්ත ලබාගත යුතු සීමාව, සහ Output එක තියෙන්න ඕන Structure එක තදින්ම නියම කිරීමයි 🚧📋.

➡️ ඇයි මේක වැඩ කරන්නේ? 🎯

සීමාවන් දැම්මේ නැත්නම් AI එක අනවශ්‍ය හැඳින්වීම්, පම්පෝරි (Fluff), සහ තමන් නොදන්නා දේවල් පවා ඇත්ත වගේ ගොතලා කියන්න පෙළඹෙනවා 🗣️🚫.

➡️ ඔයාට පාවිච්චි කරන්න පුළුවන් ප්‍රබල Constraints 3ක්: 🔒

1. Anti-Hallucination Rule (බොරු කීම නැවැත්වීම):

"Answer strictly using ONLY the provided notes below. If the answer is not explicitly mentioned in the text, reply 'I do not have enough information in the provided context.'" 🛑📄

2. Negative Constraints (අනවශ්‍ය වචන කැපීම):

"Do not use generic buzzwords. Do not include any introductory greetings or concluding summaries." 🚫✨

3. Strict Output Formatting (ආකෘතිය නියම කිරීම):

"Present the final comparison strictly as a Markdown Table with 3 columns: Concept, Advantage, and Limitation." 📊✅


🏆 The Ultimate Master Prompt Formula (Part 01 + Part 02 එකතුව)

දැන් ඔයා ළඟ Advanced Prompt Engineering වල සම්පූර්ණ බලය තියෙනවා ⚡🔥! මීළඟ පාර ඕනෑම බරපතල වැඩකදී මේ සූත්‍රය (Formula) පාවිච්චි කරන්න:

1. Role Assignment
+
2. Few-Shot Examples
+
3. Chain of Thought
+
4. Strict Constraints
🧩🚀

📋 Copy-Paste කරගන්න පුළුවන් Mini Template එකක්: 👇

"Act as a [Expert Role]. Use the following examples as a style guide: [Example 1, Example 2]. Now, solve this problem: [Your Task]. Think step-by-step and show your reasoning clearly before giving the final answer. Constraints: Do not assume missing facts, avoid fluff, and format the final output as [Table/Bullet Points]."

💻✨


🎯 Today's Mentor Advice:

අනාගත Tech ලෝකයේ දිනන්නේ AI වලට බය වෙන අය නෙවෙයි, AI එකට නිවැරදිව අණ දෙන්න (Command දෙන්න) දන්න අයයි 🚀🧠.

මේ Techniques 4 අද ඉඳන්ම ඔයාගේ Assignment, Coding සහ Research වැඩ වලට පාවිච්චි කරලා බලන්න 🎓💡!


💬 ඔයාගේ අදහස කියන්න:

මේ Part 01 සහ Part 02 පෝස්ට් දෙකෙන් ඔයාට වැඩිපුරම ප්‍රයෝජනවත් වුණු Technique එක මොකක්ද ❓

පහලින් Comment එකක් දාගෙන යන්න 💬👇!

මේ දැනුම ඔයාගේ Uni සහ Tech යාලුවන්ටත් Share කරන්න අමතක කරන්න එපා 🤝📲

Keep Learning. Keep Experimenting. Keep Growing! 🚀🧠

#PromptEngineering #ChainOfThought #AIHallucination #ContextEngineering #ArtificialIntelligence #GenerativeAI #ChatGPT #SinhalaTech #AIForStudents #FutureSkills

Comments

Popular posts from this blog

Pro-Player කෙනෙක් වගේ AI පාවිච්චි කරමුද?