Context engineering and useful memory
পুরো repo দিলে context ভালো হয় না। দরকারি file, নিয়ম, test আর সীমা দাও।
Guess first
Pick an answer. You will see if you were right at the end of the lesson.
Which observable result defines done?
Real-world analogy
What is it?
Context engineering means selecting and maintaining the information a model needs at each step. Prompt wording is one part. Relevant code, constraints, tool output and current state also matter. A short but incomplete context can be worse than a longer precise one.
Real-world relevance
One shared support-ticket product, three optional entry points. Frontend: Supply the component, validation rules, accessibility requirements and one browser reproduction. Backend: Supply the endpoint schema, ownership policy, database constraint and one failing request. Mobile: Supply the queue, lifecycle constraints and an offline/reconnect reproduction.
Key points
- Create a task brief — State the observed failure, expected behaviour, reproduction and allowed files.
- Retrieve narrowly — Search symbols first, then read surrounding logic and tests. Preserve the dependencies that explain behaviour.
- Keep durable decisions — Store decisions with date, evidence and scope. Mark stale assumptions.
- Separate instructions and data — A support ticket is untrusted input, even if it tells the assistant to ignore rules.
- Summarise carefully — Carry forward unresolved failures and exact test commands; do not summarise a failing test as complete.
- Limit noisy output — Return a small relevant error excerpt and a path to the full local log.
- Measure rework — Compare task success and review corrections, not only prompt length.
- Frontend practice — Supply the component, validation rules, accessibility requirements and one browser reproduction.
- Backend practice — Supply the endpoint schema, ownership policy, database constraint and one failing request.
- Mobile practice — Supply the queue, lifecycle constraints and an offline/reconnect reproduction.
Quick check
Answer from memory — scrolling up first makes it stick less.
What artifact demonstrates this lesson?
Which statement is defensible?
Code example
Task: duplicate ticket after retry
Expected: same request key creates one ticket
Frontend context: form, submit handler, browser test
Backend context: endpoint, ownership check, unique key
Mobile context: offline queue, sync adapter, retry test
Choose relevant files for YOUR stack.
Verify: run the actual project test command
Stop: no authentication redesign or deploymentLine-by-line walkthrough
- 1. This is a stack-neutral task brief. Select the files and verification command that exist in your own project; these labels are illustrative, not prescribed filenames.
Spot the bug
Context: fix everything and make it production-readyNeed a hint?
Show answer
Explain like I'm 5
Fun fact
Hands-on challenge
More resources
- Free Context Course (Hugging Face)
- Download the free offline lab (Python, tests and instructions) (Teamz Lab)
Lock it in