Context Management 101: AI ต้องมีโต๊ะทำงานContext Management 101: AI needs a workbench
เข้าใจว่า context คืออะไร ทำไมข้อมูลเยอะเกินไปทำให้ AI ทำงานแย่ลงได้ และวิธีคิดว่า context คือโต๊ะทำงานชั่วคราวของ AILearn what context is, why too much information can hurt, and how to think of context as the AI's temporary workbench.
AI does not automatically know your real situation.
It only sees what is in the conversation, uploaded files, tool results, system instructions, and anything else the app puts into its context window.
Think of context as the AI's temporary workbench.
If the workbench has the right documents, notes, examples, and constraints, the AI can work well. If the workbench is empty, messy, or full of unrelated things, the AI has to guess.
What context means
Context is the information available to the model while it answers.
Common context includes:
- your task
- your goal
- pasted source material
- uploaded files
- previous messages
- examples of good output
- constraints and rules
- tool results
- project instructions
Prompting is what you ask. Context management is deciding what the model should see before and during the work.
More context is not always better
A common beginner mistake is to paste everything.
That feels safe, but it can create problems:
- important details get buried
- old requirements conflict with new ones
- irrelevant text changes the model's focus
- the model wastes effort summarizing instead of deciding
- the answer becomes vague because the input is vague
The goal is not maximum context. The goal is useful context.
Signal and noise
Use this mental model:
| Type | Meaning | Example |
|---|---|---|
| signal | helps the AI complete the task | goal, source text, rules, examples |
| noise | distracts or confuses the AI | unrelated chat, stale notes, duplicate files |
| missing context | should be present but is not | audience, deadline, output format |
Context management is the habit of increasing signal, reducing noise, and spotting missing context.
The five pieces AI usually needs
For most useful tasks, provide these five pieces:
Task: what you want done
Goal: why this matters
Source: what the answer should be based on
Constraints: rules, limits, tone, format
Output: what the final answer should look like
Example:
Task: Turn these messy notes into a 1-page workshop outline.
Goal: Help beginners understand Git before using AI coding agents.
Source: Paste notes below.
Constraints: Thai first, simple language, no sales copy.
Output: Sections with title, objective, exercise, and homework.
This is already better than:
Make this better.
Context changes during the work
Context is not a one-time setup.
As the conversation continues, the model sees more messages. Some are useful. Some become stale.
You should refresh context when:
- the goal changes
- the answer starts drifting
- the chat gets long
- a decision has been made
- old assumptions are no longer true
- you move from planning to writing or implementation
A useful phrase is:
Reset the working context. Here is the current state:
Then give a short updated brief.
Practice: separate signal from noise
Imagine you want AI to write a workshop lesson.
Mark each item as signal, noise, or missing context:
1. The lesson topic is context management.
2. The learner is a Thai beginner.
3. The chat includes a random discussion about lunch.
4. The output should be MDX with English and Thai sections.
5. The deadline is not mentioned.
6. A pasted article is from 2021 and may be outdated.
7. The previous workshop uses a 101-106 lesson structure.
Then write a better task brief:
Task:
Goal:
Source:
Constraints:
Output:
AI ไม่ได้รู้สถานการณ์จริงของคุณโดยอัตโนมัติ
มันเห็นเฉพาะสิ่งที่อยู่ในบทสนทนา ไฟล์ที่อัปโหลด ผลลัพธ์จาก tool system instructions และสิ่งอื่นที่แอปส่งเข้า context window
ให้คิดว่า context คือโต๊ะทำงานชั่วคราวของ AI
ถ้าบนโต๊ะมีเอกสาร note ตัวอย่าง และข้อจำกัดที่ถูกต้อง AI จะทำงานได้ดี ถ้าโต๊ะว่าง รก หรือเต็มไปด้วยเรื่องไม่เกี่ยวข้อง AI ต้องเดา
context คืออะไร
context คือข้อมูลที่ model เห็นตอนตอบ
context ที่พบบ่อย เช่น:
- task ของคุณ
- goal ของงาน
- source material ที่ paste เข้าไป
- ไฟล์ที่อัปโหลด
- ข้อความก่อนหน้า
- ตัวอย่าง output ที่ดี
- constraints และ rules
- ผลลัพธ์จาก tool
- project instructions
Prompting คือสิ่งที่คุณสั่ง Context management คือการตัดสินใจว่า model ควรเห็นอะไร ก่อนและระหว่างทำงาน
context เยอะกว่าไม่ได้แปลว่าดีกว่า
ข้อผิดพลาดของมือใหม่คือ paste ทุกอย่าง
มันดูปลอดภัย แต่สร้างปัญหาได้:
- detail สำคัญถูกฝัง
- requirement เก่าขัดกับ requirement ใหม่
- ข้อความไม่เกี่ยวข้องทำให้ model เสีย focus
- model เสียแรง summarize แทนที่จะตัดสินใจ
- คำตอบกว้างเพราะ input กว้าง
เป้าหมายไม่ใช่ context มากที่สุด เป้าหมายคือ context ที่มีประโยชน์ที่สุด
signal และ noise
ใช้ mental model นี้:
| ประเภท | ความหมาย | ตัวอย่าง |
|---|---|---|
| signal | ช่วยให้ AI ทำ task สำเร็จ | goal, source text, rules, examples |
| noise | ทำให้ AI เสียสมาธิหรือสับสน | chat ไม่เกี่ยวข้อง, note เก่า, file ซ้ำ |
| missing context | ควรมีแต่ยังไม่มี | audience, deadline, output format |
Context management คือนิสัยเพิ่ม signal ลด noise และมองหา context ที่ยังขาด
ห้าชิ้นที่ AI มักต้องใช้
งานส่วนใหญ่ควรให้ห้าส่วนนี้:
Task: อยากให้ทำอะไร
Goal: ทำไปเพื่ออะไร
Source: คำตอบควรอิงจากอะไร
Constraints: กฎ ข้อจำกัด tone format
Output: คำตอบสุดท้ายควรหน้าตาแบบไหน
ตัวอย่าง:
Task: เปลี่ยน note ที่กระจัดกระจายให้เป็น outline workshop 1 หน้า
Goal: ช่วย beginner เข้าใจ Git ก่อนใช้ AI coding agent
Source: paste note ด้านล่าง
Constraints: Thai first, ภาษาง่าย, ไม่ใช่ sales copy
Output: แต่ละ section มี title, objective, exercise, homework
ดีกว่าแบบนี้มาก:
ช่วยทำให้อันนี้ดีขึ้นหน่อย
context เปลี่ยนระหว่างทำงาน
context ไม่ใช่สิ่งที่ตั้งครั้งเดียวแล้วจบ
เมื่อคุยต่อ model เห็นข้อความเพิ่มขึ้น บางส่วนยังมีประโยชน์ บางส่วนเริ่มเก่า
ควร refresh context เมื่อ:
- goal เปลี่ยน
- คำตอบเริ่มหลุดทิศ
- chat ยาวมาก
- ตัดสินใจบางอย่างแล้ว
- assumption เก่าไม่จริงแล้ว
- ย้ายจาก planning ไป writing หรือ implementation
ประโยคที่ใช้ได้คือ:
Reset the working context. Here is the current state:
แล้วให้ brief ปัจจุบันแบบสั้น
แบบฝึกหัด: แยก signal จาก noise
สมมติคุณอยากให้ AI เขียน lesson workshop
ให้จัดแต่ละข้อเป็น signal, noise, หรือ missing context:
1. หัวข้อ lesson คือ context management
2. learner เป็น beginner คนไทย
3. ใน chat มีคุยเรื่องอาหารกลางวันปนอยู่
4. output ควรเป็น MDX มี English และ Thai sections
5. deadline ไม่ได้บอก
6. article ที่ paste มาเป็นปี 2021 และอาจเก่าแล้ว
7. workshop ก่อนหน้าใช้โครงสร้าง lesson 101-106
จากนั้นเขียน task brief ใหม่:
Task:
Goal:
Source:
Constraints:
Output:
เข้าสู่ระบบเพื่อบันทึกความคืบหน้าSign in to track your progress
เข้าสู่ระบบSign in→