12/29/2023
LLM Prompting: The Basic Techniques
အေနိန့်ခါ ပြောပြချင်စွာက LLM basic prompt techniques ချေ တိ အကြောင်းပါ။
ပထဆုံး LLM ဆိုစွာ ဇာချင့်လဲ ဆိုစွာချေ ကို အရင်ပြောပြပီးပါမယ်။ LLM အရှည်ကောက်က Large Language Models ကိုပြောစွာပါ။ LLM တိက ဇာတိလဲ ဆိုကေ Chat GPT , Google Bard , Gemini etc. ရို့ပိုင် AI တိပါ။
LLM တိကို သုံးဖို့ယာ ဆိုကေ input အနေနန့် prompt တိကို ထည့်ပီးရပါရေ။ ဥပမာ summarize this paragraph… လို့ input box မှာ ထည့်လိုက်လို့ ရှိကေ response or output အနေနန့် ကိုယ်အကျဉ်းချုံ့ခိုင်းလိုက်တယ် စာပိုဒ်ကို သူအဆင်ပြေပိုင် အကျဉ်းချုံ့ပနာ ပြန်ထုတ်ပီးပါရေ။
အထက်မှာ ဥပမာ ပီးခရေ summarize this paragraph… ဆိုစွာ စွာ prompt ပါယာ။ ယပိုင်ဆိုကေ Prompting techniques တိဇာလို့လိုလဲ ဆိုစွာ အကြောင်းချေကို ဆွေးနွေးကတ်ဖို့ပါ။
LLM ဆိုစွာလေ့ machine တစ်ခုပါ။ machine တိစွာ ဇာနန့် အလုပ်လုပ်လဲ ဆိုကေ pattern တိ နန့် အလုပ်လုပ်တယ် လို့ ယေဘုယျ ပြောလို့ရပါရေ။ ဥပမာ 3 4 လ အချေတစ်ယောက်ကို ဘရဘရီ ထားချင်စွာပိုင် ထား ကေ သူ memorize လုပ်လားဖို့စွာတိကလေ့ ဘရဘရီတိ ဖြစ်လားဖို့ပါ။ ယောအစား ကျွန်တော် ရို့က systematically pattern ချေ တိနန့် စနစ်တကျထားကေ လူကောင်းချေ တစ်ယောက်ဖြစ်အောင် ပုံသွင်းလို့ ရပနာ results ကောင်းတိလေ့ ထွက်လာဖို့စွာပါယာ။ အခုသဘော လေ့ အထက်က ဥပမာ ချေ အတိုင်းပါယာ LLM တိ ကို input ထည့်ရေအခါ ဘရဘရီ မေးချင်စွာ မေးကေ သူကလေ့ ထုတ်ချင်စွာ ထုတ်ပီးဖို့စွာပါယာ အဖြေတိက လေ့ မှန်ချင်မှန်ဖို့ မမှန်ချင်မမှန်ပါမနားယေ။ ယောနန့် ကျွန်တော်ရို့ input ထည့်ခါကနီ prompt techniques တိနန့်ယာ စနစ် တကျ ထည့်ခကေ စနစ်ကျ ရေ output ချေ နန့် ကျွန်တော်ရို့ လိုချင်ရေ အဖြေကိုလဲ ရဖို့စွာပါယာ။
ယောပိုင်ဆိုကေ Prompting basic techniques တိက ဇာတိလဲဆိုကေ
-
Zero-shot prompting
-
One-shot prompting
-
Few-shot prompting
-
Chain-of-thought prompting
-
Zero-shot chain-of-thought prompting တိပါ။
-
Zero-shot prompting
Zero shot prompting ဆိုစွာက မေးရေအခါမှာ prompt ပီးပြီးကေ generate ထုတ်ခိုင်းစွာပါ။ eg . Translate English To French: cheese=>
-
One-shot prompting
One shot prompting ဆိုစွာက မေးရေအခါမှာ prompt တစ်ခုတည်းမဟုတ်ဘဲ နန့် ဥပမာချေ ပီးပနာ မေးစွာပါ။ eg . Translate English To French: cat => chat cheese =>
-
Few-shot prompting
Few shot prompting ဆိုစွာက prompt ပီးပြီး. ကေ ဥပမာ သို့မဟုတ် နမူနာ တစ်ခုထက် ပိုပနာ ပီး စွာမျိုးပါ။ eg. Translate English To French: sea otter => loutre de mer peppermint=> menthe poivrée plush girafe => girafe peluche cheese =>
-
Chain-of-thought prompting
Chain of thought prompting (CoT) ကကျကေ
prompt ပီးရေအခါမှာ ဇာပိုင်ပုံစံမျိုး တွေးရဖို့ ဆိုစွာကို ပါ နမူနာ ပီးပနာ မေးစွာပါ။ ယောပိုင်ဆိုကေ LLM က ကျွန်တော်ရို့ ပီးထားရေ နမူနာ ပုံစံ or pattern ထဲကယာ output ကို ထုတ်ပီးဖို့ဖြစ်တယ် အတွက်နန့် ပိုပနာ တိကျမှန်ကန်ပါရေ။ eg. ကို အောက်မှာ ပုံနန့် ပြပီးထားပါမယ်။ -
Zero-shot chain-of-thought prompting
Zero shot လို့ပြောရေအတွက် နန့် prompt ယာပီးဖို့ ယကေလေ့ တွေးရဖို့ပုံစံ သို့မဟုတ် output ထုတ်ပီးရဖို့ပုံစံချေ ကို ကျွန်တော်ရို့ input မှာ ထည့်ပီးရဖို့ပါ။ eg. Q: A juggler cab juggle 16 balls. Half of the balls are golf balls,and half of the golf balls are blue. How many blue golf balls are there? A. Let’s think step by step
အေ article ချေက ကျကေ LLM တိ ကို သုံးရေအခါမှာ ထိထိ ရောက်ရောက် ဇာပိုင် prompt ပီးရဖို့လဲ techniques ချေ တိပါ။ အားလုံး ဂါရဝပါ။
#crd_org_article https://www.determined.ai/blog/llm-prompting


