เริ่มโปรเจคด้วยการค้นหาสิ่งที่เราไม่รู้

man-and-a-cave
Photo by Maksym Kaharlytskyi on Unsplash

ก่อนจะเริ่มโปรเจคอะไร เราควรจะค้นหาสิ่งที่เราไม่รู้ (Unknown) ก่อนจะเริ่มทำโปรเจค เพื่อช่วยให้ประหยัดเวลาที่เราทำงานร่วมกับ AI แต่จะทำอย่างไรนั้นลองอ่านต่อด้านล่างได้เลยครับ


สารบัญ


เริ่มด้วยสิ่งที่ไม่รู้

พอดีผมเพิ่งไปเจอบทความของคุณ Thariq จาก Anthropic A Field Guide to Fable: Finding Your Unknowns ถึงจะเป็นบทความที่เขียนเพื่อใช้กับ Fable แต่ผมคิดว่าสามารถนำมาประยุกต์ใช้กับ AI model อื่นได้

Map vs Territory
Map VS Territory

คุณ Thariq เริ่มจากเปรียบเทียบระหว่าง Map กับ Territory โดย Map คือสิ่งที่เรา Provide ให้ AI เช่น prompt skill context ส่วน Territory คือ Code จริงที่ AI ต้องเผชิญระหว่างการ Implement ความต่างระหว่างสองสิ่งนี้คือ Unknown หรือสิ่งที่เราไม่รู้นั่นเอง


ทำความรู้จักกับสิ่งที่ไม่รู้

4 types of problem
4 Types of Problem

คุณ Thariq ได้แบ่งปัญหาออกเป็น 4 ประเภทคือ

  1. Known Knowns สิ่งที่เรารู้อยู่แล้วและเป็นสิ่งที่เรา prompt บอก AI
  2. Known Unknowns สิ่งที่เรายังไม่ได้ตัดสินใจแน่ชัดว่าจะจัดการยังไง แต่เรารู้ว่ามี
  3. Unknown Knowns สิ่งที่เรารู้แน่ชัดอยู่แล้วว่าคืออะไร แค่ไม่ได้จดบันทึกไว้
  4. Unknown Unknowns สิ่งที่เราไม่รู้ ไม่ได้คิดว่าจะมี สิ่งที่เราคาดไม่ถึง

คุณ Thariq บอกว่า Engineer เก่งๆจะรู้วิธีจัดการกับสิ่งที่ไม่รู้ การลดสิ่งที่ไม่รู้และวางแผนล่วงหน้าเกี่ยวกับสิ่งที่ไม่รู้เป็นสกิลอย่างหนึ่ง ซึ่งเราสามารถพัฒนาได้ด้วยการใช้ AI ช่วย


ให้ AI ช่วยจัดการสิ่งที่ไม่รู้

คุณ Thariq บอกว่าการสั่งงาน AI เป็นเรื่องละเอียดอ่อน ถ้าสั่งละเอียดไปก็จะทำตามเกินไปถึงแม้ว่าจะมีวิธีที่ดีกว่า หรือถ้าสั่งแบบกว้างๆไป AI ก็จะทำตาม Best practice แต่อาจจะไม่เหมาะสำหรับโปรเจค

ถ้าคุณไม่ได้จัดการเกี่ยวกับสิ่งที่ไม่รู้ แต่เราสั่งให้ AI ทำงานอะไรบางอย่างก็เปรียบเหมือนว่าเรากำลังขับรถโดยที่ไม่รู้ว่าทางข้างหน้าจะเจออะไร

เราสามารถให้ AI ช่วยในการค้นหาสิ่งที่เราไม่รู้ได้เร็วขึ้นเพราะ AI สามารถค้นหา code และหาข้อมูลจาก internet ได้ไวกว่าเรา สิ่งที่สำคัญคือต้องเริ่มจากว่าตอนนี้เราจะเริ่มทำงานหรือโปรเจคนี้จากอะไรเช่น บอกเกี่ยวกับความคิดของเรา ประสบการณ์และปัญหาของ code เป็นต้น

คุณ Thariq ได้นำเสนอ pattern ที่ใช้ในการค้นหาสิ่งที่ไม่รู้โดยจะแบ่งเป็น 3 ช่วงคือ

  1. ก่อน Implement
  2. ระหว่าง Implement
  3. หลัง Implement

ก่อน Implement

ใช้ค้นหาจุดบอด

เราสามารถใช้ AI ช่วยในการค้นหาจุดบอด (Blindspot) หรือสิ่งที่เราไม่รู้ (Unknown unknowns) หรือไม่ถนัดในโปรเจคนั้นๆ ได้ด้วยคำสั่งต่อไปนี้

ตัวอย่าง Prompt

  • “I’m working on adding a new auth provider but I know nothing about the auth modules in this codebase. Can you do a blindspot pass to help me figure out my relevant unknown unknowns and help me prompt you better.”
  • “I don’t know what color grading is but I need to grade this video. Can you teach me to understand my unknown unknowns about color grading, so that I can prompt better?”

ใช้ Brainstorm และ Prototype

เวลาที่เราทำงานกับสิ่งที่รู้แต่ไม่ได้บันทึกไว้ (Unknown knowns) การที่เราสามารถค้นหาและจัดการ Unknown knowns ก่อนที่จะ implement จะทำง่ายกว่าถ้าเราต้องไปแก้ตอน implement

ยกตัวอย่างเช่น คุณ Thariq ชอบใช้กับ design โดยให้ AI ทำ design มาหลายๆแบบเพื่อจะได้เลือกอันที่ต้องการ หรือจะใช้ทำ Brainstorm ก่อนเริ่มโปรเจคเพื่อนิยาม scope ของโปรเจค โดย AI จะช่วยให้เราไม่พลาดสิ่งที่สำคัญได้

ตัวอย่าง Prompt

  • “I want a dashboard for this data but I have no visual taste and don’t know what’s possible. Make me an HTML page with 4 wildly different design directions so I can react to them.”
  • “Before wiring anything up, make a single HTML file mocking the new editor toolbar with fake data. I want to react to the layout before you touch the real app.“
  • “Here’s my rough problem: users churn after onboarding. Search the codebase and brainstorm 10 places we could intervene, from cheapest to most ambitious. I’ll tell you which ones resonate.”

ใช้ Interviews

หลังจากใช้ Brainstorm เสร็จแล้วและยังมีสิ่งที่ไม่รู้อยู่ คุณ Thariq มักจะใช้ AI Interview เกี่ยวกับสิ่งที่ไม่รู้หรือกำกวม และเราต้องพยายามให้ context ก่อนจะให้ AI Interview

ตัวอย่าง Prompt

  • “Interview me one question at a time about anything ambiguous, prioritize questions where my answer would change the architecture.”

ใช้ References

บางครั้งที่เราไม่รู้จะอธิบายให้ AI ยังไงเราสามารถ reference code/library เพื่อให้ AI ไปทำตามได้

ตัวอย่าง Prompt

  • “This Rust crate in vendor/rate-limiter implements the exact backoff behavior I want. Read it and reimplement the same semantics in our TypeScript API client.”

ใช้สร้าง Implementation Plans

เวลาที่เราพร้อมจะ implement แล้ว คุณ Thariq มักจะบอกให้ AI ช่วยสร้าง Implementation Plans เพื่อให้เรารีวิวก่อน implement จริง

ตัวอย่าง Prompt

  • “Write an implementation plan in HTML, but lead with the decisions I’m most likely to tweak with: data model changes, new type interfaces, and anything user-facing. Bury the mechanical refactoring at the bottom, I trust you on that part.”

ระหว่าง Implement

ใช้สร้าง Implementation Notes

ถึงแม้เราจะ plan มาดีแค่ไหนก็ตาม หลังจากที่ AI เริ่ม implement ตาม plan ก็ยังอาจจะเจอสิ่งที่ไม่รู้ที่คาดไม่ถึงอยู่ดี ดังนั้นคุณ Thariq จึงให้ AI ช่วยสร้าง Implementation Notes ระหว่าง implement เพื่อจดบันทึกการตัดสินใจสำหรับใช้เรียนรู้ในภายหลังได้

ตัวอย่าง Prompt

  • “Keep an implementation-notes.md file. If you hit an edge case that forces you to deviate from the plan, pick the conservative option, log it under ‘Deviations’, and keep going.”

หลัง Implement

ใช้สร้าง Pitch สำหรับอธิบาย

สิ่งที่สำคัญในการ ship feature หรือ product คือการทำให้ได้รับการ buy-in หรือการอนุมัติดังนั้นการมี pitch หรือสิ่งที่อธิบายจะช่วยให้

  • เร่งความเข้าใจของ reviewer ที่เริ่มจากสิ่งที่ไม่รู้เหมือนกับเรา ให้เข้าใจได้เร็วขึ้น
  • เร่งการอนุมัติผ่านได้เร็วขึ้น ในกรณีที่ผู้เชี่ยวชาญต้องการเห็นว่าเราได้เตรียมตัวรับมือกับสิ่งที่ไม่รู้ หรือสิ่งที่เรามักพลาดบ่อยได้ดีแค่ไหน
pitch and explainer
Pitch and Explainer

ตัวอย่าง Prompt

  • “Package the prototype, the spec, and the implementation notes into a single doc I can drop in Slack to get buy-in. Lead with the demo GIF.”

ใช้สร้างคำถาม

หลังจากที่ AI implement เสร็จเรียบร้อยแล้ว เราสามารถให้ AI ช่วยสร้างคำถาม (Quiz) เพื่อทดสอบว่าเราเข้าใจ change ที่ AI สร้างขึ้นหรือไม่

ตัวอย่าง Prompt

  • “I want to make sure I understand everything that’s happened in this change. Give me a HTML report on the changes for me to read and understand with context, intuition, what was done, etc. and a quiz at the bottom on the changes that I must pass.”

สรุป

ถึงแม้ว่า AI Model ใหม่ๆจะฉลาดขึ้นเรื่อยๆ แต่การที่เราจัดการกับสิ่งที่ไม่รู้ล่วงหน้าด้วยวิธีการต่างๆ ไม่ว่าจะเป็นการทำ Explainer, Brainstorm, Interview, Prototype หรือ Reference จะช่วยลดการเสียเวลาที่เกิดจาก AI ตัดสินใจจัดการกับสิ่งที่ไม่รู้ที่ไม่ตรงใจเราหรือทำในสิ่งที่เราไม่ต้องการได้

แถม demo จากคุณ Thariq https://thariqs.github.io/html-effectiveness/unknowns/


Reference

A Field Guide to Fable: Finding Your Unknowns