5

ការប្រើប្រាស់ AI Agent កម្រិតខ្ពស់
Advanced AI Agent Techniques

រៀនបច្ចេកទេសកម្រិតខ្ពស់ដើម្បីឱ្យ AI គិតវិភាគ ដោះស្រាយបញ្ហាស្មុគស្មាញ និងធ្វើការសម្រេចចិត្ត។
Master advanced techniques to make AI think, analyze complex problems, and assist in decision making.

១. ការគិតជាជំហានៗ (Chain of Thought Prompting)

សម្រាប់កិច្ចការស្មុគស្មាញ AI អាចនឹងផ្តល់ចម្លើយមិនល្អប្រសិនបើអ្នកសួរត្រង់ៗ។ វិធីសាស្រ្ត Chain of Thought គឺការប្រាប់ឱ្យ AI គិតមួយជំហានម្តងៗ មុននឹងផ្តល់ចម្លើយចុងក្រោយ។

For complex tasks, AI might give poor answers if asked directly. Chain of Thought is telling the AI to think step-by-step before giving the final answer.

ឧទាហរណ៍ (Example): ការរៀបចំផែនការថវិកា
❌ Prompt ធម្មតា:
"Create a budget for a 2-day training for 50 people."
(លទ្ធផល៖ AI អាចនឹងផ្តល់តួលេខប៉ាន់ស្មានមិនច្បាស់លាស់។)
✅ COT Prompt:
"Create a budget for a 2-day training for 50 people. Think step-by-step:
1. Calculate venue rental cost.
2. Calculate food and beverage (coffee/lunch) per person.
3. Estimate printing materials cost.
4. Add a 10% contingency fund.
Finally, present the total in a table."
បកប្រែ៖ "បង្កើតថវិកាសម្រាប់ការបណ្តុះបណ្តាល ២ ថ្ងៃសម្រាប់មនុស្ស ៥០ នាក់។ គិតមួយជំហានម្តងៗ៖ ១. គណនាថ្លៃជួលទីតាំង ២. គណនាថ្លៃអាហារនិងភេសជ្ជៈ ៣. ប៉ាន់ស្មានថ្លៃបោះពុម្ពឯកសារ ៤. បូកបន្ថែមមូលនិធិបម្រុង ១០%។ ចុងក្រោយបង្ហាញសរុបជាតារាង។"

២. ការផ្តល់ឧទាហរណ៍គំរូ (Few-Shot Prompting)

វិធីដែលល្អបំផុតដើម្បីឱ្យ AI យល់ពីទម្រង់ដែលអ្នកចង់បាន គឺការផ្តល់ឧទាហរណ៍ (Examples) នៅក្នុង Prompt របស់អ្នក។

ឧទាហរណ៍៖ ការបម្លែងទិន្នន័យ (Data Extraction)

Prompt: Extract the names and ages from the text below. Example 1: Input: "John is 25 years old." Output: Name: John, Age: 25 Example 2: Input: "Sarah celebrated her 30th birthday." Output: Name: Sarah, Age: 30 Task: Input: "Michael is forty." Output:

AI Result: Name: Michael, Age: 40

ឧទាហរណ៍៖ ការបកប្រែតាមស្ទីល (Tone Translation)

Prompt: Translate to Khmer giving two options: Formal and Informal. Word: "Eat" Formal: ពិសា (Pisa) Informal: ញ៉ាំ (Nham) Word: "Sleep" Formal: សម្រាក (Samrak) Informal: គេង (Keng) Word: "Talk"

AI Result:
Formal: ជម្រាប (Chumreap) / មានប្រសាសន៍ (Mean Prusas)
Informal: និយាយ (Niyay)

៣. ការត្រួតពិនិត្យខ្លួនឯង (Self-Correction / Reflexion)

បច្ចេកទេសនេះគឺការប្រាប់ឱ្យ AI ត្រួតពិនិត្យចម្លើយរបស់ខ្លួនឡើងវិញ មុននឹងផ្តល់លទ្ធផលចុងក្រោយ។ វាជួយកាត់បន្ថយកំហុសបានយ៉ាងច្រើន។

This technique involves asking the AI to review its own answer before providing the final result. It significantly reduces errors.

រូបមន្ត (Formula):

1. Generate a first draft.
2. Critique the draft (Identifying errors or missing parts).
3. Generate a final improved response.

ឧទាហរណ៍ Prompt:
"Write a short email declining a wedding invitation.
Then, review your email. Is it polite enough? Is it too long?
Finally, rewrite it to be shorter and warmer."

៣. ការវិភាគនិងការសម្រេចចិត្ត (Analysis & Decision Making)

AI អាចដើរតួជា "ទីប្រឹក្សា" ដើម្បីជួយអ្នកវិភាគលើជម្រើសផ្សេងៗ (Pros & Cons) មុននឹងសម្រេចចិត្ត។

Prompt:
"Act as a Legal Advisor for the Ministry. I will paste a draft MOU (Memorandum of Understanding) below. Please analyze it for:
1. **Ambiguous Terms:** Highlight any vague words that could cause misunderstanding.
2. **Risks:** Identify potential risks for our side.
3. **Recommendations:** Suggest specific edits to protect our interests."
បកប្រែ៖ "ដើរតួជាទីប្រឹក្សាច្បាប់។ ខ្ញុំនឹងដាក់សេចក្តីព្រាង MOU ខាងក្រោម។ សូមវិភាគ៖ ១. ពាក្យគន្លឹះមិនច្បាស់លាស់ ២. ហានិភ័យសម្រាប់ភាគីយើង ៣. អនុសាសន៍ដើម្បីការពារផលប្រយោជន៍យើង។"

Prompt:
"I have 3 proposals for supplying IT equipment. I will paste the details of Supplier A, B, and C. Please create a comparison matrix table based on:
- Price
- Warranty Period
- Delivery Time
- Technical Specifications
Then, recommend the best option for long-term value."
បកប្រែ៖ "ខ្ញុំមានសំណើដេញថ្លៃផ្គត់ផ្គង់សំភារៈ IT ចំនួន ៣។ ខ្ញុំនឹងដាក់ព័ត៌មានរបស់អ្នកផ្គត់ផ្គង់ A, B, និង C។ សូមបង្កើតតារាងប្រៀបធៀបលើ៖ តម្លៃ, រយៈពេលធានា, ពេលដឹកជញ្ជូន, និងលក្ខណៈបច្ចេកទេស។ បន្ទាប់មកផ្តល់អនុសាសន៍ថាមួយណាផ្តល់តម្លៃល្អបំផុតសម្រាប់រយៈពេលវែង។"

៤. ការកំណត់ទម្រង់លទ្ធផល (Formatting Output)

បញ្ជាឱ្យ AI បញ្ចេញលទ្ធផលជាទម្រង់ជាក់លាក់ដែលអ្នកអាចយកទៅប្រើបន្តបានងាយស្រួល។

CSV / Excel

"Output the list as a CSV format code block so I can copy to Excel."

Markdown / Table

"Present the data in a Markdown Table with columns for Name, Position, and ID."

Checklist

"Create a checkbox style list for printing."

៥. ករណីសិក្សា HR កម្រិតខ្ពស់ (Advanced HR Applications)

ការអនុវត្តបច្ចេកទេសខាងលើ សម្រាប់កិច្ចការជាក់លាក់នៅក្នុងនាយកដ្ឋានធនធានមនុស្ស (MOI)៖

Goal: បង្កើតតារាងពិន្ទុសម្រាប់ការសម្ភាសន៍ ដើម្បីឱ្យមានតម្លាភាព។

"Create a **Structured Interview Scorecard** for the position of 'Deputy Chief of IT Office'.

Requirements:
1. Generate 3 situational questions dealing with: Data Leaks, Staff Conflict, and Urgent Deadlines.
2. For each question, provide criteria for 'Poor (1pt)', 'Average (3pts)', and 'Excellent (5pts)' answers.
3. Output Format: Markdown Table."
បកប្រែ៖ "បង្កើតតារាងដាក់ពិន្ទុសម្រាប់ការសម្ភាសតំណែង 'អនុប្រធានការិយាល័យ IT'។ តម្រូវការ៖ ១. បង្កើត ៣ សំណួរអំពីស្ថានការណ៍ (ការបែកធ្លាយទិន្នន័យ, ទំនាស់បុគ្គលិក, ការងារបន្ទាន់)។ ២. បង្កើតលក្ខខណ្ឌដាក់ពិន្ទុសម្រាប់ចម្លើយ ខ្សោយ (១ពិន្ទុ), មធ្យម (៣ពិន្ទុ), និងល្អបំផុត (៥ពិន្ទុ)។"

Goal: កំណត់ KPIs សម្រាប់មន្ត្រីដែលផ្តល់សេវាសាធារណៈ។

"Draft 5 Key Performance Indicators (KPIs) for a 'Passport Service Officer'.
Step-by-step reasoning:
1. Identify the core goal (Speed, Accuracy, Politeness).
2. Define the measurement method (e.g., processing time per person).
3. Set a realistic target (e.g., < 15 mins/person).

Final Output: Present as a table with columns: [KPI Name], [Objective], [Measurement Formula], [Target Score]."
បកប្រែ៖ "តាក់តែង ៥ សូចនាករវាស់វែងសមិទ្ធកម្ម (KPIs) សម្រាប់ 'មន្ត្រីសេវាលិខិតឆ្លងដែន'។ ជំហានគិត៖ ១. កំណត់គោលដៅ (ល្បឿន, ភាពសុក្រឹត, ភាពគួរសម)។ ២. កំណត់វិធីវាស់វែង (ឧ. រយៈពេលផ្តល់សេវាម្នាក់)។ ៣. កំណត់មុខសញ្ញា (ឧ. < ១៥នាទី/ម្នាក់)។ បង្ហាញជាតារាង។"

Goal: បង្កើតខ្លឹមសារសម្រាប់ទម្រង់បែបបទរដ្ឋបាល។

"Draft a text template for a 'Request for Mission Order' (ពាក្យស្នើសុំលិខិតបញ្ជាបេសកកម្ម).

Include fields for:
- Official's Name, Rank, and ID.
- Mission Objective & Location.
- Duration (Start/End Date).
- Means of Transportation.
- Budget Request (Per diem, Accommodation).
Ensure the language is formal Khmer Administrative style."
បកប្រែ៖ "តាក់តែងពង្រាងសម្រាប់ **'ពាក្យស្នើសុំលិខិតបញ្ជាបេសកកម្ម'**។ រួមមាន៖ ឈ្មោះ/ឋានន្តរស័ក្តិមន្ត្រី, គោលបំណងនិងទីតាំងបេសកកម្ម, រយៈពេល (ថ្ងៃចាប់ផ្តើម/បញ្ចប់), មធ្យោបាយធ្វើដំណើរ, សំណើថវិកា (សោហ៊ុយ, ការស្នាក់នៅ)។ ប្រើប្រាស់ភាសារដ្ឋបាលផ្លូវការ។"

Goal: វិភាគហានិភ័យ និងរៀបចំផែនការបន្តវេន។

"Scenario: 30% of our Senior Officers in the 'Logistics Department' will retire in the next 3 years.

Task: Create a 3-year 'Succession Plan'.
1. Year 1: Identification of high-potential juniors & Mentorship program setup.
2. Year 2: Leadership training & Job rotation.
3. Year 3: Shadowing & Handover process.

Output as a specific 'Action Plan' list."
បកប្រែ៖ "ស្ថានភាព៖ ៣០% នៃមន្ត្រីជាន់ខ្ពស់ក្នុង 'នាយកដ្ឋានភស្តុភារ' នឹងចូលនិវត្តន៍ក្នុងរយៈពេល ៣ ឆ្នាំទៀត។ កិច្ចការ៖ បង្កើតផែនការបន្តវេន ៣ ឆ្នាំ។ ឆ្នាំទី ១៖ កំណត់អត្តសញ្ញាណមន្ត្រីសក្តានុពល និងរៀបចំកម្មវិធីណែនាំ។ ឆ្នាំទី ២៖ បណ្តុះបណ្តាលភាពជាអ្នកដឹកនាំ។ ឆ្នាំទី ៣៖ ការរៀនតាមរយៈការអនុវត្តផ្ទាល់ និងការផ្ទេរការងារ។ បង្ហាញជាបញ្ជី 'Action Plan'។"

៦. ឧទាហរណ៍ Prompt សម្រាប់ដោះស្រាយបញ្ហា (Problem Solving Prompts)

ការប្រើប្រាស់ AI ដើម្បីដោះស្រាយបញ្ហាជាក់ស្តែងដែលទាមទារការគិតវិភាគ៖

Scenario: មានពាក្យចចាមអារ៉ាមមិនល្អអំពីសេវាធ្វើលិខិតឆ្លងដែនលើ Facebook។

"Context: A negative rumor about 'Passport issuance delays and bribes' is going viral on Facebook.

Task: Create a Crisis Communication Plan.
1. Fact Sheet: List key facts to counter rumors (e.g., standard fees, online queuing).
2. Press Statement: Draft a formal statement for the Ministry Spokesperson.
3. Social Media Responses: Write 3 polite but firm replies to angry comments."
បកប្រែ៖ "បរិបទ៖ មានពាក្យចចាមអារ៉ាមមិនល្អអំពី 'ការយឺតយ៉ាវនិងសំណូកក្នុងការធ្វើលិខិតឆ្លងដែន' កំពុងល្បីលើ Facebook។ កិច្ចការ៖ បង្កើតផែនការទំនាក់ទំនងនៅពេលមានវិបត្តិ។ ១. បញ្ជីការពិត៖ រាយបញ្ជីការពិតដើម្បីបកស្រាយ (ឧ. តម្លៃស្តង់ដារ)។ ២. សេចក្តីថ្លែងការណ៍សារព័ត៌មាន៖ រៀបចំសេចក្តីថ្លែងការណ៍សម្រាប់អ្នកនាំពាក្យ។ ៣. ការឆ្លើយតបលើបណ្តាញសង្គម៖ សរសេរចម្លើយតបដ៏គួរសម ៣ សម្រាប់ឆ្លើយតបការរិះគន់។"

Scenario: ចង់ប្តូរការស្នើសុំច្បាប់ឈប់សម្រាកពីក្រដាស មកជាប្រព័ន្ធឌីជីថល។

"Objective: Modernize the 'Leave Request Process' from paper-based to a Mobile App.

Task: Write a Proposal for the Department Director.
1. Problem Statement: Analyze current inefficiencies (lost papers, slow approval).
2. Proposed Solution: Describe the new workflow via App.
3. Change Management: Strategy to train older staff who are not tech-savvy."
បកប្រែ៖ "គោលបំណង៖ ធ្វើទំនើបកម្ម 'នីតិវិធីស្នើសុំច្បាប់ឈប់សម្រាក' ពីក្រដាស មកជាកម្មវិធីទូរស័ព្ទ (App)។ កិច្ចការ៖ សរសេរសំណើជូនប្រធាននាយកដ្ឋាន។ ១. បញ្ហា៖ វិភាគភាពយឺតយ៉ាវបច្ចុប្បន្ន។ ២. ដំណោះស្រាយ៖ បង្ហាញពីលំហូរការងារថ្មី។ ៣. ការគ្រប់គ្រងការផ្លាស់ប្តូរ៖ យុទ្ធសាស្ត្របណ្តុះបណ្តាលមន្ត្រីវ័យចាស់ដែលមិនសូវចេះបច្ចេកវិទ្យា។"

Scenario: អ្នកមានទិន្នន័យគ្រោះថ្នាក់ចរាចរណ៍ច្រើន ហើយត្រូវសង្ខេបជូនរដ្ឋមន្ត្រី។

"Input: I have a 50-page report on 'Annual Traffic Accidents 2025'.

Task: Write a 1-page Executive Summary for the Minister.
1. Key Findings: Top 3 causes of accidents.
2. Comparison: Trend vs 2024 (Up or Down?).
3. Recommendations: 3 High-priority actions for the Ministry to take immediately."
បកប្រែ៖ "ធាតុចូល៖ ខ្ញុំមានរបាយការណ៍ ៥០ ទំព័រអំពី 'គ្រោះថ្នាក់ចរាចរណ៍ឆ្នាំ ២០២៥'។ កិច្ចការ៖ សរសេរសេចក្តីសង្ខេប ១ ទំព័រជូនរដ្ឋមន្ត្រី។ ១. គំហើញសំខាន់៖ មូលហេតុធំៗ ៣ នៃគ្រោះថ្នាក់។ ២. ការប្រៀបធៀប៖ និន្នាការធៀបនឹងឆ្នាំ ២០២៤។ ៣. អនុសាសន៍៖ វិធានការអាទិភាព ៣ ដែលក្រសួងត្រូវចាត់វិធានការជាបន្ទាន់។"

Scenario: រៀបចំកម្មវិធីមួយ ដែលមន្ត្រីចូលនិវត្តន៍ចែករំលែកបទពិសោធន៍ដល់មន្ត្រីក្មេងៗ។

"Project: 'Knowledge Transfer Program' (Senior to Junior Officers).

Task: Create a Program Structure.
1. Matching Criteria: How to pair mentors and mentees?
2. Activities: List 4 activities (e.g., Weekly Coffee, Joint Fieldwork).
3. Evaluation: How to measure if the program is successful?"
បកប្រែ៖ "គម្រោង៖ 'កម្មវិធីផ្ទេរចំណេះដឹង' (មន្ត្រីជាន់ខ្ពស់ទៅមន្ត្រីថ្មី)។ កិច្ចការ៖ បង្កើតរចនាសម្ព័ន្ធកម្មវិធី។ ១. លក្ខណៈវិនិច្ឆ័យ៖ របៀបចាប់គូអ្នកណែនាំនិងអ្នករៀន? ២. សកម្មភាព៖ រាយបញ្ជី ៤ សកម្មភាព (ឧ. កាហ្វេប្រចាំសប្តាហ៍, ចុះមូលដ្ឋានរួមគ្នា)។ ៣. ការវាយតម្លៃ៖ របៀបវាស់វែងភាពជោគជ័យនៃកម្មវិធី?"
បច្ចេកទេសផ្ទៀងផ្ទាត់ (Self-Correction):
ប្រសិនបើអ្នកមិនច្បាស់ពីចម្លើយរបស់ AI អ្នកអាចប្រើ Prompt នេះ៖
"Are you sure about this answer? Please double-check the legal references and provide citations."
(AI នឹងត្រួតពិនិត្យចម្លើយរបស់វាឡើងវិញ ដើម្បីកាត់បន្ថយកំហុស។)