Thuta Learning
ရှာဖွေရန်
IntermediateAIbeginner

Agent ခေါ်နိုင်တဲ့ Tools

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Agent ခေါ်နိုင်တဲ့ Tools ကို ကြောက်စရာမလိုအောင် နားလည်မယ်
  • ကိုယ်တိုင် စမ်းသုံးတတ်အောင် လုပ်မယ်
  • ခွင့်ပြုချက်၊ secret နဲ့ မှန်းဖြည့်မှုကို ပြုံးပြီး ရှောင်တတ်မယ်

Tool က Agent လက်ပါ။ နာမည်၊ လုပ်ဆောင်ချက်၊ input၊ output၊ အန္တရာယ်အဆင့်ကို ရှင်းမှ မှန်ကန်စွာ ခေါ်ပါတယ်။

ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်

Model က ကမ္ဘာကို တိုက်ရိုက်မမြင်ပါဘူး။ Tool description ကိုဖတ်ပြီး JSON-like argument ပို့ပါတယ်။ ကိုယ်က function ကို run ပြီး ရလဒ်ကို ပြန်ပေးပါတယ်။ Tool ကောင်းရင် နာမည်တိုတယ်၊ ဘာလုပ်တယ် ပြောတယ်၊ ဘာမလုပ်ဘူး ပြောတယ်၊ ဥပမာ argument ပါတယ်။ Tool မကောင်းရင် “doAnything(query)” လို ကျယ်ပြီး Agent က မှန်းသုံးပါတယ်။ ပထမဆုံး Agent မှာ tool ၁–၃ ခုသာ ပေးပါ။

နေ့စဉ်ဘဝနဲ့ ချိတ်ကြည့်မယ်

Study helper အတွက် စတင် tool သုံးခု — list_notes()၊ read_note(name)၊ draft_summary(text)။ list_notes က နာမည်ပဲပြန်တယ်။ read_note က စာသားပဲပြန်တယ်။ draft_summary က စာမသိမ်းဘူး၊ draft ပဲထုတ်တယ်။ save_note ကို နောက်မှ၊ လူ့ Approve နဲ့မှ ထည့်ပါ။ Tool တစ်ခုက ဘေးထွက်ဆိုးကျိုးနည်းလေ Agent က ပိုလုံခြုံလေပါ။

အတူတူ လက်တွေ့စမ်းမယ်

javascript
const tools = [
  {
    name: "list_notes",
    description: "List note file names in the study folder. Read-only.",
    input: {},
  },
  {
    name: "read_note",
    description: "Read one note by file name. Does not change files.",
    input: { name: "string" },
  },
  {
    name: "draft_summary",
    description: "Draft a 3-bullet summary. Does not save anything.",
    input: { text: "string" },
  },
];
You should see
Read-only tool သုံးခုကို ရှင်းလင်းသော description နဲ့ ရေးနိုင်မည်။

၅ မိနစ် စမ်းကြည့်

ကိုယ့် Agent အတွက် tool ၃ ခုရေးပါ။ တစ်ခုချင်း name၊ description၊ input၊ read-only / write ဟုတ်မဟုတ် ဇယားဆွဲပါ။

သတိလေးတစ်ချက်

shell.run သို့မဟုတ် fetch(url) ကို ပထမဆုံး tool အဖြစ် မပေးပါနှင့်။ Agent က ကိုယ်မကြည့်သောနေရာကို ရောက်သွားနိုင်ပါတယ်။

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • Tool တစ်ခုတည်းနဲ့ အကုန်လုပ်ခိုင်းခြင်း
  • Description မပါဘဲ နာမည်ပဲပေးခြင်း

အခု ကိုယ်တိုင် စမ်းကြည့်

ကိုယ့် Agent အတွက် tool ၃ ခုရေးပါ။ တစ်ခုချင်း name၊ description၊ input၊ read-only / write ဟုတ်မဟုတ် ဇယားဆွဲပါ။

You'll know it worked when: Read-only tool သုံးခုကို ရှင်းလင်းသော description နဲ့ ရေးနိုင်မည်။

Agent ခေါ်နိုင်တဲ့ Tools | Thuta Learning