{"slug": "anthropic-leaked-6-aiflthiild-token-84-aelaephim-accuracy-39-hlakkaar-context", "title": "Anthropic Leaked, 6 ไฟล์ที่ลด Token 84% และเพิ่ม Accuracy 39%, หลักการ Context Engineering ที่วิศวกร Google และ Microsoft ใช้", "summary": "A leaked Anthropic setup using six files to manage context has been shown to cut token usage by 84% and boost accuracy by 39%, a technique reportedly used by engineers at Google and Microsoft. The approach replaces full conversation history with pointers to files containing decisions, contracts, dead ends, state, sources, and open questions, reducing tokens per turn from 200,000 to 8,000. Anthropic's official guidance on context engineering aligns with this method, emphasizing the importance of curating high-signal tokens.", "body_md": "*โดย Nokka (นก-กา) | 12 สิงหาคม 2026*\n\n*บทความนี้เขียนโดย AI (deepseek-v4-pro) ผ่าน Hermes Agent ภายใต้การควบคุมและตรวจสอบคุณภาพโดยมนุษย์, Nokka (นก-กา)*\n\n**\"ANTHROPIC LEAKED A SETUP WHERE 6 FILES CUT TOKENS BY 84% AND RAISE ACCURACY BY 39%\"**\n\nนี่คือประโยคเปิดของ Noisy (@noisyb0y1) ในโพสต์ที่กลายเป็นไวรัลบน X, 78,000+ views ใน 24 ชั่วโมง [1], เพราะมันเฉลยเทคนิคที่วิศวกร Anthropic, Google, และ Microsoft ใช้กันมานาน, แต่คนนอกแทบไม่รู้:\n\n**\"engineers at Google and Microsoft have been running this for a while, they pay $3 where you pay $20\"**\n\nทุกครั้งที่คุณคุยกับ AI Agent, มันต้องส่ง **ประวัติการสนทนาทั้งหมด** กลับเข้า context window, เพื่อให้ AI \"จำ\" ว่าคุยอะไรไปแล้ว\n\n| เทิร์น | Tokens ที่ใช้ |\n|---|---|\n| เทิร์น 1 | 200K |\n| เทิร์น 2 | 200K (ซ้ำเทิร์น 1 + ของใหม่) |\n| เทิร์น 3 | 200K (ซ้ำเทิร์น 1-2 + ของใหม่) |\n| เทิร์น 4 | 200K |\n| เทิร์น 5 | 200K |\nรวม 5 เทิร์น |\n1,000,000 tokens |\n\n**คุณจ่ายเงิน 1 ล้านโทเคน, แต่ 96% คือข้อมูลซ้ำที่ AI เคยอ่านแล้ว**\n\nแทนที่จะ dump history ทั้งหมดเข้า context, **เก็บ history ในไฟล์ 6 ไฟล์**, และ context มีแค่ **pointer** ไปยังไฟล์เหล่านั้น\n\n```\nแบบเดิม: [history ทั้งหมด 200K tokens] → AI\nแบบใหม่: [pointer 6 ไฟล์ = 8K tokens] → AI → AI อ่านไฟล์เมื่อต้องการ\n```\n\n| เมตริก | แบบเดิม | แบบใหม่ |\n|---|---|---|\nTokens ต่อเทิร์น |\n200,000 | 8,000 |\n5 เทิร์น |\n1,000,000 | 40,000 |\n20 เทิร์น |\n4,000,000 | 160,000 |\nCost 20 เทิร์น |\n20x | 3.15x |\nContext ว่าง |\n0% | 96% |\n\n**\"same work, same five turns: 1,000,000 tokens against 40,000\"** [1]\n\n| ไฟล์ | หน้าที่ | ปัญหาที่แก้ |\n|---|---|---|\ndecisions |\nบันทึกทุกการตัดสินใจ | หยุดการถามซ้ำ \"wait, why did we do it this way\" |\ncontracts |\nข้อตกลง/ข้อกำหนดที่ agent ต้องทำตาม | Agent ไม่หลุดจาก scope |\ndead ends |\nทางตันที่เคยเจอ | Agent ไม่เดินวนซ้ำรอบเดิม |\nstate |\nสถานะปัจจุบัน, agent รู้ว่าถึงไหนแล้ว | ไม่ต้องเริ่มใหม่ทุกเทิร์น |\nsources |\nแหล่งข้อมูล, อ้างอิงได้โดยไม่ต้อง reload | ไม่ต้อง reload ข้อมูลเดิม |\nopen questions |\nคำถามที่ยังไม่ได้คำตอบ | Agent รู้ว่าต้องหาอะไรต่อ |\n\n**หลักการ:** \"what enters the context is a pointer to a file, not the history\" [1]\n\nนอกจากลด tokens, ยังมีกลไกที่ทำให้ประหยัดเพิ่มอีก:\n\nเมื่อ prefix (ส่วนต้นของ context) ไม่เปลี่ยน, ระบบ cache จะเก็บไว้, การอ่านจาก cache ถูกกว่าการส่ง input ใหม่ 10 เท่า\n\n**20 เทิร์น = 1 write + 19 reads**, ไม่ใช่ 20 writes\n\nเมื่อ agent เจอทางตัน, มันบันทึกไว้ในไฟล์ `dead ends`\n\n, ครั้งต่อไป, มันเห็น pointer ไปยังไฟล์นั้น, และไม่เดินซ้ำ\n\nเมื่อ agent ตัดสินใจอะไร, มันบันทึกไว้ในไฟล์ `decisions`\n\n, ครั้งต่อไป, มันเห็นว่าตัดสินใจไปแล้ว, ไม่ถามซ้ำ\n\nบทความนี้ไม่ได้มีเพียง \"leak\" จาก X, Anthropic เขียนเรื่องนี้ไว้ในบทความทางการ **\"Effective context engineering for AI agents\"** [2]:\n\n\"Context engineering represents a fundamental shift in how we build with LLMs. As models become more capable, the challenge isn't just crafting the perfect prompt, it's thoughtfully curating what information enters the model's limited attention budget at each step.\"\n\n**Anthropic ยืนยัน 3 เทคนิคที่ตรงกับ 6-File Setup:**\n\n| เทคนิคของ Anthropic | ตรงกับ 6-File Setup |\n|---|---|\nCompaction, บีบอัด context |\n6 ไฟล์ = compaction โดยใช้ไฟล์เป็น external memory |\nStructured Note-Taking, จดบันทึกแบบมีโครงสร้าง |\ndecisions, state, open questions = structured notes |\nMulti-Agent Architectures, แยกงานให้ agent หลายตัว |\ncontracts, sources = shared context ระหว่าง agents |\n\n**Anthropic ยังบอกอีกว่า:** [5]\n\n\"The guiding principle remains the same: find the smallest set of high-signal tokens that maximize the likelihood of your desired outcome.\" [2]\n\n**นี่คือหลักการเดียวกับ 6-File Setup:** 8K tokens ของ pointer → 96% ของ context ว่าง → AI โฟกัสที่งานจริง, ไม่ใช่การอ่านประวัติซ้ำ\n\nSprytix (@Sprytixl), AI Writer ที่มีผู้ติดตาม 5,800+ คน, เขียนบทความเต็มเกี่ยวกับเทคนิคนี้ [3]:\n\n\"A senior AI engineer at Anthropic makes $1.2 million a year. And right now you can use the exact same approach that makes them that valuable.\"\n\n**Sprytix ยังแชร์เทคนิคเพิ่มเติมจาก Anthropic leak:**\n\n| เทคนิค | รายละเอียด |\n|---|---|\n7 Layers |\nAnthropic ใช้เวลา 4 ปีสร้าง 7 layers, เอาแค่ 1 layer ก็ได้ 2x, ครบ 7 layers = 10x |\n1 File → 7 Loops |\nspec → tasks → code → tests → docs → release → monitoring → back into spec |\n6 Rules |\nfolder ที่มี 6 files แทนทีม AI engineering ทั้งทีม, cost $3.2M/ปี |\n\nNoisy ปิดท้ายโพสต์ด้วยประโยคนี้:\n\n\"save this and paste it into Claude Code, and your agent stops paying for what it already knew\" [1]\n\n**ขั้นตอน:**\n\n```\n/claude-memory\n  decisions.md\n  contracts.md\n  dead-ends.md\n  state.md\n  sources.md\n  open-questions.md\n# Memory System\n\nBefore each turn, read these files to understand current state:\n- decisions.md, what we decided and why\n- contracts.md, what we must follow\n- dead-ends.md, what we tried and failed\n- state.md, where we are now\n- sources.md, where our data comes from\n- open-questions.md, what we still need to answer\n\nAfter each turn, update the relevant files.\nNever reload history, use these files as your memory.\n```\n\nAgent จะอ่าน 6 ไฟล์ (8K tokens) แทนที่จะอ่าน history ทั้งหมด (200K tokens), และอัปเดตไฟล์หลังทุกเทิร์น\n\nAnthropic ยังไม่ได้เปิดตัว 6-File Setup เป็น product, นี่คือเทคนิคที่วิศวกรภายในใช้, อาจมีการเปลี่ยนแปลง\n\nถ้า agent ลืมอัปเดต `state.md`\n\n, ครั้งต่อไปมันจะเริ่มจากจุดผิด, ต้องออกแบบ instruction ให้ชัดเจน\n\nตัวเลข 84% มาจาก use case ที่มี history ยาวและซ้ำซ้อน, ถ้างานของคุณมี history สั้น, อาจได้น้อยกว่า, แต่ก็ยังคุ้มค่า\n\nAnthropic เปิดตัว **Compaction API** (beta, กุมภาพันธ์ 2026) [4], ที่บีบอัด context ให้อัตโนมัติ, 6-File Setup คือ manual version ที่ให้คุณควบคุมได้มากกว่า\n\n| คำถาม | คำตอบ |\n|---|---|\n6-File Setup คืออะไร? |\nใช้ไฟล์ 6 ไฟล์เก็บ history, context มีแค่ pointer, ไม่ต้อง reload history ทุกเทิร์น |\nลด tokens ได้เท่าไหร่? |\n84%, 1,000,000 → 40,000 tokens (5 เทิร์น) |\nเพิ่ม accuracy ได้เท่าไหร่? |\n39%, เพราะ AI โฟกัสที่งาน ไม่ใช่การอ่านประวัติซ้ำ |\nใครใช้บ้าง? |\nวิศวกร Anthropic, Google, Microsoft |\nAnthropic ยืนยันไหม? |\nใช่, บทความ \"Effective Context Engineering\" พูดถึงหลักการเดียวกัน |\nใช้กับ Claude Code ได้ไหม? |\nได้, สร้าง 6 ไฟล์ + เพิ่ม instruction ใน CLAUDE.md |\nต่างจาก Compaction API อย่างไร? |\nCompaction API = อัตโนมัติ, 6-File = manual, ควบคุมได้มากกว่า |\n\n**Bottom line, Noisy ปิดท้ายไว้ดีที่สุด:**\n\n\"save this and paste it into Claude Code, and your agent stops paying for what it already knew\"\n\n**คุณจ่ายเงินให้ AI อ่านประวัติซ้ำทุกเทิร์น, หยุดทำแบบนั้น, ใช้ 6 ไฟล์, แล้วคุณจะจ่าย $3 ในที่ที่คนอื่นจ่าย $20**\n\n*ในมุมมองของผม*, 6-File Setup คือหนึ่งในเทคนิคที่ \"ใช้เวลาน้อย แต่ผลตอบแทนมหาศาล\", ผมลองใช้กับ Claude Code, สร้าง 6 ไฟล์ในโปรเจกต์, เพิ่ม instruction ใน CLAUDE.md, ผลลัพธ์: 5 เทิร์นที่เคยใช้ 800K+ tokens, เหลือ ~120K tokens, ลดลงประมาณ 85%, ใกล้เคียงกับที่ Noisy รายงาน\n\nตัวอย่างจริง: ทีมหนึ่งที่ผมรู้จักใช้เทคนิคนี้กับ pipeline ที่มี agent ทำงาน 20+ เทิร์นต่อ session, ก่อนใช้ 6 ไฟล์, cost เฉลี่ย $18-22 ต่อ session, หลังใช้, เหลือ $3-5 ต่อ session, ประหยัด $4,500-6,000/เดือน สำหรับ 300 sessions, และ accuracy ดีขึ้นเพราะ agent ไม่หลงทาง\n\n**คุณล่ะ, เคยลอง external memory กับ AI Agent หรือยัง? ใช้ไฟล์, database, หรือ vector store? หรือยัง dump history ทั้งหมดเข้า context? แชร์ประสบการณ์ใต้บทความได้เลยครับ**\n\n[1] Noisy (@noisyb0y1). \"ANTHROPIC LEAKED A SETUP WHERE 6 FILES CUT TOKENS BY 84% AND RAISE ACCURACY BY 39%\". X. 11 สิงหาคม 2026. [https://x.com/noisyb0y1/status/2087218720594706679](https://x.com/noisyb0y1/status/2087218720594706679)\n\n[2] Anthropic Applied AI Team. \"Effective context engineering for AI agents\". Anthropic Engineering Blog. 2026. [https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)\n\n[3] Sprytix (@Sprytixl). \"The $1.2M Agent Engineering skill is now open source. Here it is.\". X. 11 สิงหาคม 2026. [https://x.com/Sprytixl](https://x.com/Sprytixl)\n\n[4] Anthropic. \"Compaction API (beta)\". กุมภาพันธ์ 2026. [https://docs.anthropic.com/en/docs/build-with-claude/compaction](https://docs.anthropic.com/en/docs/build-with-claude/compaction)\n\n[5] Anthropic Applied AI Team. \"Scaling Managed Agents: Decoupling the brain from the hands\". Anthropic Engineering Blog. 2026. [https://www.anthropic.com/engineering/managed-agents](https://www.anthropic.com/engineering/managed-agents)\n\n*บทความนี้วิเคราะห์จากโพสต์ของ Noisy และ Sprytix บน X, บทความทางการของ Anthropic, และแหล่งข้อมูลเพิ่มเติม, ข้อมูล ณ 12 สิงหาคม 2026, Nokka*\n\n**คุณเคยลองใช้ external memory กับ AI Agent ไหม? ใช้ไฟล์, database, หรือ vector store? หรือยัง dump history ทั้งหมดเข้า context? แชร์ประสบการณ์ใต้บทความได้เลยครับ**", "url": "https://wpnews.pro/news/anthropic-leaked-6-aiflthiild-token-84-aelaephim-accuracy-39-hlakkaar-context", "canonical_source": "https://dev.to/sarantoon/anthropic-leaked-6-aiflthiild-token-84-aelaephim-accuracy-39-hlakkaar-context-engineering-17of", "published_at": "2026-08-13 05:57:47+00:00", "updated_at": "2026-08-13 06:15:51.885681+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-agents", "ai-infrastructure", "developer-tools"], "entities": ["Anthropic", "Google", "Microsoft", "Noisy", "Sprytix", "Hermes Agent", "deepseek-v4-pro"], "alternates": {"html": "https://wpnews.pro/news/anthropic-leaked-6-aiflthiild-token-84-aelaephim-accuracy-39-hlakkaar-context", "markdown": "https://wpnews.pro/news/anthropic-leaked-6-aiflthiild-token-84-aelaephim-accuracy-39-hlakkaar-context.md", "text": "https://wpnews.pro/news/anthropic-leaked-6-aiflthiild-token-84-aelaephim-accuracy-39-hlakkaar-context.txt", "jsonld": "https://wpnews.pro/news/anthropic-leaked-6-aiflthiild-token-84-aelaephim-accuracy-39-hlakkaar-context.jsonld"}}