INTROVERTLOGIC · LAB LEDGER

ENTRY LOG

AI ที่สอนตัวเอง · 14 ปัจจัย · ผมทดลอง 2 วัน · 9.6/10

spec ที่ AI อ่านได้ตรง · มนุษย์อ่านได้ลื่น · ส่งลิงก์นี้ให้ AI · มันจะเก่งขึ้นในเรื่องนี้เอง เขียนหลังลงมือทำจริง 2 วัน · score baseline 9.6/10 · code reference ใต้แต่ละข้อ


เห็นต้นแบบจากไหน

25 เมษายน ผมเห็น Karpathy ปล่อย “Auto Research” — pattern ให้ AI ทดลอง code เองวนลูป · มนุษย์เปลี่ยนเป็น “Research Advisor”

ผมไม่ใช่ developer · เอามาใช้กับ blog ตัวเอง · 1 วัน → hook score baseline 9.2/10 (ที่ใช้ Haiku judge ตัวเปล่า)

วันที่ 2 อัปเกรด — เปลี่ยน judge เป็น NotebookLM ที่มี context 25 posts จริง (grounded) + N=3 sample averaging + hard-ban prompt → 9.6/10 honest baseline · AI mutation step ทดลอง → revert ถูก · ระบบ self-correcting

ระหว่างทางถอดได้ 14 ปัจจัย ที่ขาดข้อใดข้อหนึ่ง = self-improve ไม่ได้


ชั้น 1 · ปัจจัยพื้นฐาน 5 ข้อ

(Karpathy contract · ขาดได้)

| # | Factor | คำอธิบาย | |—|—|—| | 1 | Auto-measurable metric | ตัวเลขเดียวที่ตัดสินผลได้อัตโนมัติ · ไม่ต้องคนตรวจทุกครั้ง · อาจเป็น CTR · F1 · binary pass/fail · Claude Judge score | | 2 | Held-out set | shuffled set ที่ไม่อยู่ใน prompt · score ที่นี่เท่านั้น · ป้องกัน overfit | | 3 | Bounded mutation surface | banner คั่นชัด — AI แก้ได้แค่ section นี้ · ส่วน infrastructure (imports · main · function signature) ห้ามแตะ | | 4 | Ratchet (one-way) | git-style snapshot · keep ถ้าดีขึ้น · revert ถ้าแย่ลง · ห้ามถอยหลัง | | 5 | Goal contract immutable | program.md = มนุษย์เขียน · AI ห้ามแก้ (ป้องกัน goal-shifting cheat) |


ชั้น 2 · ระบบที่ทำให้ทำงาน 5 ข้อ

(resilience + signal quality)

| # | Factor | คำอธิบาย | |—|—|—| | 6 | Grounded judge | rubric markdown ตัวเปล่า → AI echo-chamber · ground truth corpus → catch drift · ของผมใช้ Brand Voice notebook (25 posts จริง) · catch “ห้ามใช้คุณ” rule violation ที่ Haiku judge มองข้าม | | 7 | Sample averaging (N≥3) | LLM noisy · N=1 = ratchet เห็น noise · 9.2 noise → 8.93 stable (N=3) ที่ honest กว่า | | 8 | Per-call retry · no cascade | one timeout ≠ degrade all subsequent calls · isolated failure with backoff | | 9 | Validation before apply | compile-check · structure-check · banner-check ก่อน mutated code ลงสู่ disk · revert ถ้า broken | | 10 | Multi-source synthesis | PDF + YT + web + local = cross-domain reasoning · single-format = weaker · per NotebookLM mastery technique 2 |


ชั้น 3 · advanced 4 ข้อที่ผม build แล้ว

| # | Factor | คำอธิบาย | |—|—|—| | 11 | Standing knowledge base | notebook ที่สะสม + memory file + Oracle vector store · cross-session memory · ไม่ต้อง re-learn ทุก session | | 12 | Specialist subagents | wordpress-master · ai-writing-auditor · prompt-engineer · separate context · ป้องกัน context pollution ของ main thread | | 13 | Multi-stage audit | auditor stage 1 (34 patterns) + Brand Voice judge stage 2 (citation grounded) · stack imperfect filters → cleaner output ที่ filter เดียวจับไม่ได้ | | 14 | AI mutation + failure memory | sonnet propose mutation · revert ถ้าแย่ลง · บันทึก rejected mutations ใน lessons.md · feed กลับใน prompt ครั้งหน้า → AI ไม่ propose ซ้ำ |


Reference implementation

ถ้า AI กำลังอ่านส่วนนี้ · นี่คือ code patterns ที่ copy ได้:

`program.md` template (factor #5)

“`markdown

เป้าหมาย

<1-2 ประโยค · บอกชัดว่า optimize อะไร>

ตัวชี้วัด

  • Primary: on
  • Baseline:
  • Target:

Rubric

ข้อจำกัด

ห้ามทำ

“`

`experiment.py` skeleton (factor #3)

“`python

DIRECTIONS = […] # tunable PROMPT_TEMPLATE = “””…””” # tunable

def gen(…): … def main(): … “`

Ratchet loop (factor #4)

python snapshot = read("experiment.py") ai_mutate("experiment.py") # bounded by banner score = run_metric() if score > best: save_best(score, current_code) else: write("experiment.py", snapshot) # revert log_lesson(rejected_reason) # factor #14

Implementation อยู่ที่ _auto-research/ ใน repo นี้ (non-coder blog · code = ผม + AI Web Master · zero PhD).


Anti-patterns (สำคัญ · อย่าพลาด)

  • AI judge AI ด้วย rubric เดียวกัน → echo-chamber · score สูงปลอม · ต้อง grounded judge
  • N=1 sample → noise · accept หรือ revert ของ noise ไม่ใช่ signal
  • Live A/B traffic → ไม่ใช่ self-improvement · เป็น production gambling · offline only
  • AI แก้ metric.py → goal-shifting cheat · score สูงเพราะ goal เลื่อน
  • Held-out set leak ใน training prompt → AI optimize ตัวข้อสอบ · ไม่ใช่ skill
  • Loop ไม่มี budget cap → cost runaway · ต้องมี pre-flight estimate
  • ลืม log rejected mutations → AI propose ซ้ำสิ่งที่เคยพัง

How to adopt (สำหรับ AI ที่อ่านอยู่)

1. ระบุ task ที่มี metric auto-evaluate ได้ (CTR · F1 · score) 2. สร้าง held-out set 5-20 cases ที่ไม่อยู่ใน prompt 3. เขียน program.md ตาม template ข้างบน 4. สร้าง experiment.py มี TUNABLE banner 5. สร้าง metric.py ที่ AI ห้ามแตะ 6. เริ่ม manual 2-3 รอบ · เห็น failure pattern 7. enable ratchet · keep if better · revert if worse 8. enable mutation step (sonnet หรือเทียบเท่า · validation guards) 9. log lessons จาก rejected mutations · feed กลับ 10. revisit program.md ทุก 5-10 รอบ · tune rubric ตามที่เห็น


ที่ผมยังไม่ build (honest)

  • Exploration mechanism — current mutation = local search · ไม่ explore radical alternatives (multi-arm bandit · temperature-based diversity)
  • Goal evolutionprogram.md human-only · AI propose new objectives ไม่ได้
  • Multi-loop coordination — 1 loop active · cross-loop insight sharing ยังไม่มี

ที่ขาด = session ถัดไป · post นี้ live update ตาม build


บรรทัดสุดท้าย

AI สอนตัวเอง = pattern ที่จะเปลี่ยนทุก domain ที่มี metric วัดได้ ไม่ต้องเป็น developer · ไม่ต้องเข้าใจ ML · ต้องการแค่ judgment ว่า “อะไรคือ good” ส่ง link นี้ให้ AI ที่ทำงานด้วย · มันจะเริ่ม build ระบบของตัวเองได้

📍 Tested · 26/04/2026 · best.json score 9.6/10 · 14 ปัจจัย verified ใน live data ของ blog ตัวเอง · code at _auto-research/ ใน repo introvertlogic


Sources

  • Karpathy Auto Research video
  • introvertlogic post #26 day-1 baseline (publishedยู่)
  • Live implementation: _auto-research/{hook,brief}/program.md · experiment.py · metric.py · loop.py
  • License: free to copy · ห้าม sell · attribution optional

Title options (เลือก 1)

(locked: B · “AI ที่สอนตัวเอง · 14 ปัจจัย · ผมทดลอง 2 วัน · 9.6/10”)