Prompting 103: context คือ prompt ที่แท้จริงPrompting 103: context is the real prompt
เรียนวิธีให้ background, source text, examples และ boundary กับ AI โดยไม่เทข้อมูลทุกอย่างลงไปในแชตLearn how to give AI useful background, source text, examples, and boundaries without dumping everything into the chat.
When AI gives a bland answer, the problem is often not the model.
The problem is that it does not know the work context.
Context is anything the model needs to answer correctly:
- source text
- audience
- goal
- background
- constraints
- examples
- definitions
- current facts
- what has already been tried
Context is not a data dump
More context is not always better.
Weak:
Here is a 40-page document. Summarize it.
Better:
Summarize the pasted policy for new employees.
Focus on:
- what they must do in their first week
- who they should contact
- rules that affect daily work
Ignore:
- legal boilerplate
- internal document history
Output:
- Thai summary
- 8 bullets maximum
- include page references if visible
The better prompt tells AI which parts of the context matter.
Use labels
Labels help the model understand boundaries.
TASK:
Rewrite the announcement.
AUDIENCE:
Thai office workers, age 25-40.
STYLE:
Clear, warm, not playful.
SOURCE TEXT:
[paste draft]
Markdown headings, bullets, and separators are enough for most everyday prompting.
Put source text in a container
When you paste source material, separate it from instructions.
Use only the source text below. If the answer is not in the source, write "not found".
SOURCE:
---
[paste document]
---
QUESTION:
What is the refund deadline?
This reduces accidental mixing between your instruction and the document.
Tell AI what not to use
Sometimes the most important context is a boundary.
Use only the pasted text. Do not use outside knowledge.
Use current web sources. Do not rely only on memory.
Do not invent names, numbers, dates, or policy details.
Different jobs need different boundaries. A brainstorming task can use imagination. A policy task needs source discipline.
Give current facts
Models may not know what changed today. For current information, either provide the facts yourself or ask the AI to search if the tool is available.
Weak:
What is the latest policy?
Better:
I need a current answer. Search official sources first. Cite the source and date. If sources disagree, say so.
If you already have the source:
Use this May 2026 policy update as the source of truth:
[paste source]
Practice: context diet
Take a long messy request and split the context into three groups:
Must include:
Helpful but optional:
Do not include:
Then write a prompt that includes only the first group and maybe one or two items from the second group.
References
- Anthropic: Effective Context Engineering for AI Agents frames modern AI work as managing the right information in the context window.
- OpenAI Prompt Engineering describes context as a way to supply data outside the model's training set and constrain responses to selected resources.
- Dong et al., 2025: Survey of Context Engineering surveys retrieval, processing, and management of context for LLM systems.
เวลา AI ตอบกว้างๆ ปัญหาอาจไม่ใช่ model
ปัญหาอาจเป็นเพราะมันไม่รู้ context ของงาน
Context คือทุกอย่างที่ model ต้องรู้เพื่อให้ตอบถูก:
- source text
- audience
- goal
- background
- constraints
- examples
- definitions
- current facts
- สิ่งที่ลองไปแล้ว
Context ไม่ใช่การเทข้อมูลทั้งหมด
context เยอะขึ้นไม่ได้แปลว่าดีขึ้นเสมอ
อ่อน:
Here is a 40-page document. Summarize it.
ดีขึ้น:
Summarize the pasted policy for new employees.
Focus on:
- what they must do in their first week
- who they should contact
- rules that affect daily work
Ignore:
- legal boilerplate
- internal document history
Output:
- Thai summary
- 8 bullets maximum
- include page references if visible
prompt ที่ดีขึ้นบอก AI ว่าส่วนไหนของ context สำคัญ
ใช้ label
label ช่วยให้ model เห็นขอบเขตชัดขึ้น
TASK:
Rewrite the announcement.
AUDIENCE:
Thai office workers, age 25-40.
STYLE:
Clear, warm, not playful.
SOURCE TEXT:
[paste draft]
สำหรับงานทั่วไป Markdown headings, bullets และเส้นคั่นก็เพียงพอแล้ว
ใส่ source text ใน container
เวลาวางเอกสารหรือข้อความต้นฉบับ ให้แยกออกจาก instruction
Use only the source text below. If the answer is not in the source, write "not found".
SOURCE:
---
[paste document]
---
QUESTION:
What is the refund deadline?
วิธีนี้ลดโอกาสที่ instruction กับ document จะปนกัน
บอกว่าไม่ให้ใช้อะไร
บางครั้ง context ที่สำคัญที่สุดคือ boundary
Use only the pasted text. Do not use outside knowledge.
Use current web sources. Do not rely only on memory.
Do not invent names, numbers, dates, or policy details.
งานแต่ละแบบต้องการ boundary ไม่เหมือนกัน งาน brainstorm ใช้จินตนาการได้ แต่งาน policy ต้องยึด source
ให้ข้อมูลปัจจุบัน
model อาจไม่รู้สิ่งที่เพิ่งเปลี่ยนวันนี้ ถ้าต้องการข้อมูลปัจจุบัน ให้ใส่ข้อเท็จจริงเอง หรือสั่งให้ AI ค้นหาเมื่อเครื่องมือพร้อม
อ่อน:
What is the latest policy?
ดีขึ้น:
I need a current answer. Search official sources first. Cite the source and date. If sources disagree, say so.
ถ้าคุณมี source อยู่แล้ว:
Use this May 2026 policy update as the source of truth:
[paste source]
แบบฝึก: context diet
เลือก request ที่ยาวและรกหนึ่งอัน แล้วแบ่ง context เป็นสามกลุ่ม:
Must include:
Helpful but optional:
Do not include:
จากนั้นเขียน prompt โดยใส่เฉพาะกลุ่มแรก และอาจเพิ่มกลุ่มที่สองแค่หนึ่งหรือสองข้อ
แหล่งอ้างอิง
- Anthropic: Effective Context Engineering for AI Agents อธิบายงาน AI ยุคใหม่ว่าเป็นการจัดการข้อมูลที่เหมาะสมใน context window
- OpenAI Prompt Engineering อธิบาย context ว่าเป็นวิธีใส่ข้อมูลนอก training set และจำกัดคำตอบให้อยู่กับ source ที่เลือก
- Dong et al., 2025: Survey of Context Engineering สำรวจเรื่อง context retrieval, processing และ management สำหรับระบบ LLM
เข้าสู่ระบบเพื่อบันทึกความคืบหน้าSign in to track your progress
เข้าสู่ระบบSign in→