Toolkit: prompt and context
Four copyable text blocks: a prompt structure, a context budget table, a RAG chunking/reranking checklist and a model selection worksheet.
How to use
Copy these four plain-text blocks into your document or repository and replace bracketed fields. They are templates, not runnable code. Budget percentages are illustrative, not universal settings.
1. Prompt structure
Role: [role], limited to [task scope].
Input: [input type]; ask about missing information rather than guessing.
Constraints:
- Cite [permitted sources]; write “not found” if unsupported.
- Do not invent numbers, dates, licenses or authors.
- Return conclusion, evidence, then unresolved items.
Output:
1) Conclusion (up to three sentences)
2) Evidence (source and date for each)
3) Unknowns (or “none”)
Refusal conditions: [questions outside scope]
2. Context budget
Slot | Illustrative share | Content
System instructions | 10% | Role, constraints, format
Task/examples | 30% | Current task and 1–3 contrasting examples
Retrieved material | 40% | Passages with source IDs
Conversation history | 10% | Recent, summarized turns
Headroom | 10% | Output and retries
Adjust to the task: remove unrelated history and repetition first;
preserve necessary evidence and boundaries, and reserve output space.
3. Chunking/reranking checklist
- [ ] Preserve meaning, titles and source URLs when chunking
- [ ] Split long chunks at sentence boundaries; set [N] for the task
- [ ] Keep tables/code intact where their meaning requires it
- [ ] Keep source, date, version and section metadata
- [ ] Retrieve with BM25/vectors; assess whether reranking is needed
- [ ] Select top [K] supported passages and remove redundant copies
- [ ] Preserve conflicting sources separately
- [ ] Cite passage IDs; say “not found” without evidence
- [ ] Recheck fixed questions after document updates
4. Model-selection worksheet
Constraint | Your answer | Excluded products
Hardware/VRAM/platform | |
Outbound data allowed | |
Commercial/self-hosted licensing | |
Context requirement | |
Concurrency/latency | |
Seat/usage budget | |
Chinese/multilingual needs | |
Required integrations | |
Primary: [ ]; fallback: [ ]; give three specific reasons, not “best overall”.
Common misuses
- Leaving placeholders unfilled does not give a model a concrete task.
- Budget output and retries as well as input.
- Adjusting top-K alone may leave ranking, duplication or evidence problems unresolved.
- Unresolved selection constraints should remain visible rather than becoming hidden launch assumptions.
Filled example: turn event notes into a notice
This is a fictional teaching example, not a model execution record.
Input: Saturday 14:00, community reading room, used-book exchange. No fee, contact number or registration URL was supplied.
Complete prompt: Use only those facts to write a notice under 100 Chinese characters. Add no facts and omit unspecified registration details. Return a title and two sentences.
Acceptable example: Used-book exchange. Join the exchange at the community reading room on Saturday at 14:00.
Check time, venue and event name. Remove or substantiate “free,” a signup link or a telephone number: none was supplied.
Handoff: three facts confirmed; fees and contacts unresolved; next check layout and publication channel. Obtain actual registration details before adding them.
Sources
| Source | URL |
|---|---|
| This site: context, retrieval and selection methods (2026-11-03) | https://tools.specul.com/mcp/guides/planning.html |
Source snapshot: 2026-11-03; item-specific rechecks and their scope are recorded in the text or source notes. Features and terms may change; check the original sources before use.
This page appears in: Use AI well