AI Engineering Design Patterns · 30 Tough Questions
Each with intent, framework, and bonus points: context engineering / long tasks / grep vs RAG / ACI tool design / eval infrastructure / LLM-as-Judge / sandbox isolation
THE QUESTION THIS PAGE ANSWERS
ANSWER FIRSTWhat is the key idea behind “AI Engineering Design Patterns · 30 Tough Questions”?
Each with intent, framework, and bonus points: context engineering / long tasks / grep vs RAG / ACI tool design / eval infrastructure / LLM-as-Judge / sandbox isolation
Make the claim earn its place. Use this page as a decision aid, not a definition to memorize. Connect the idea to one real task, one observable result, and one failure that would change your mind.
Write one question you could answer with evidence after trying this idea.
A conclusion that sounds complete but leaves the key assumption untested.
- Give the definition first: Prompt engineering optimizes how instructions are written. Context engineering manages all the Tokens sent to the model at each reasoning step: System Prompt, tool definitions, conversation history, retrieval results, user state — all of it.
- Explain the motivation: Context is a scarce resource. Three hard constraints: Context Rot (the longer the context, the lower retrieval accuracy), limited attention budget (irrelevant Tokens dilute useful information), and quadratic complexity (doubling the context quadruples attention computation).
- State the goal: Find the minimum high-signal Token set. Every Token must contribute to the reasoning — the mindset of "stuff in as many as possible" doesn't work.
- Give three handles: System Prompt at the right altitude (role + principles, don't pile on 50 rules); lean tool set; Few-shot of 2-3 carefully chosen representative examples — don't pad with edge cases to look thorough.
- State the dilemma first: Open a new window, and the Agent loses all memory — it will redo work it already completed. Stay in the old window, and Tokens pile up, attention dilutes, and performance keeps dropping. Claude Code, Cursor, and Devin work on this problem every day.
- Pillar 1 — Compaction: When the window is near full, use one LLM call to produce a structured summary. Keep architecture decisions and open bugs; discard redundant tool outputs and intermediate steps of completed tasks. Pick the wrong items to discard and the Agent will repeat its mistakes.
- Pillar 2 — Structured notes: Proactively write key information to external files; new windows read them back to restore memory. Claude Code's TODO file and the game notes Claude maintains while playing Pokémon are both examples of this.
- Pillar 3 — Sub-Agents: Delegate deep exploration. A sub-Agent burns 30K Tokens in its own window reading code and reasoning, then returns only a 1,500-Token conclusion to the main Agent. The main context stays clean at all times.
- Accept the premise: The goal is to put the right information into the context window — RAG is just one means among many. For data that changes frequently like a codebase, just-in-time retrieval is often more appropriate.
- Explain JIT retrieval: Use glob/grep to search on demand, keeping the context lean and containing only what's currently needed. The cost is one extra tool-call latency; the gain is eliminating the maintenance burden of building and synchronizing an index.
- Give a hybrid strategy: Preload high-frequency information (project conventions, core rules, user preferences); fetch long-tail information on demand. Analogous to browser caching: hot data in memory, cold data fetched on request.
- Clarify when RAG is right: RAG suits relatively static knowledge bases, but naive chunking loses context. Contextual Retrieval adds a context prefix to each Chunk, combined with BM25 dual-path retrieval and Reranking, reducing retrieval failure rate by 67%.
- Establish the frame: A tool's name, parameters, and description are the Agent's user interface. Traditional APIs are deterministic; Agent tools are non-deterministic — when they're used and how depends entirely on design quality. Tool design deserves the same investment as HCI design.
- Give a diagnostic checklist: Go through four principles. Does parameter order give the model thinking space (simple direction first, complex content after)? Does the format align with training data (standard unified diff beats a custom DSL)? Are you forcing the model to count line numbers mechanically? Is there mistake-proofing (Poka-yoke)?
- Give a concrete example: On SWE-bench, changing the file path parameter to accept only absolute paths (not relative paths) was a single parameter change that transformed tool calls from frequently erring to nearly perfect.
- State the description standard: Write as if documenting for a smart junior developer with no context. Cover the five-pack: example usage, edge cases, input format, how it differs from other tools, and when not to use it.
- Lead with the conclusion: Migration speed depends on eval infrastructure. Teams with a solid eval suite run the tests, confirm no regressions, and switch in a few days. Teams without one spend weeks on manual verification. Our slowness is tech debt in infrastructure.
- Explain what evals buy you: Change a Prompt, swap a model, tune a parameter — and know in minutes what the overall impact is. Prevent fixing one bug and creating three. Be first in line to benefit every time a new model launches.
- Give a launch plan: Start with 20 test cases covering core scenarios. 20 well-designed cases beats 500 that are still in the planning document by an entire generation.
- Manage expectations while you're at it: Competitors who integrate fast aren't necessarily testing rigorously. Public benchmark scores are inflated (the model can recognize exams) — use your own business scenario cases. Your eval environment must match production; sandbox configuration differences alone can cause 6 percentage points of error.
- List all three Grader types: Code Grader (assertions, unit tests, regex — millisecond latency, zero cost, fully reproducible, but too strict on reasonable variants); Model Grader (can evaluate subjective quality, but has cost and bias); Human Grader (highest quality, but doesn't scale).
- Answer the LLM-as-Judge question directly: Its reliability depends entirely on the Rubric. "Rate quality from 0 to 1" is nearly useless — you need to be specific at every score level: what does 0 look like, what is 0.3 missing, what conditions must all be met to score 1.
- Give the combination: Code Grader as the foundation for deterministic scenarios, Model Grader to extend to subjective quality, humans periodically spot-checking and calibrating for Model Grader drift. All three layers are indispensable.
- Add a commonly missed point: What you evaluate should be the Outcome — the final state of the environment. The Agent saying it's done doesn't count; you need to check whether the file was actually changed correctly and whether the API was actually called correctly.
- Agree with the other person's stance first: Prompt-based defenses are unreliable; security must rely on structural design. The goal is that even if the model is completely manipulated by Prompt Injection, the attacker still cannot obtain credentials.
- Classify the risks: Three categories, each with separate defenses: intentional user abuse; model-initiated loss of control (over-acting, executing real operations based on hallucinations); external attacks (injection instructions embedded in web pages and documents, without the user's knowledge).
- Give the credential solution: First principle: generated code and secrets are always isolated in separate containers. Two modes: Token injected into resource access path (Agent-usable but invisible — e.g., embedded in Git remote URL); Vault proxy forwarding (proxy injects Token per session, Agent never sees a single character).
- Give the execution environment solution: OS-level sandbox with triple isolation (file system, network, process), layered with three-level trust control: manual approval for high-risk tools, session-level authorization, global policy as the final backstop (production databases are never reachable).
- Give the definition first: A Workflow is an LLM and tools walking a predefined code path — the developer already decided A, then B, then C when writing the code. An Agent is the model dynamically deciding the flow, independently judging which tool to call at each step and when to stop.
- Lay out the core difference: In a Workflow, a given input means a given path — easy to reproduce and debug. In an Agent, the same input may take different paths; behavior is uncertain, and production issues are hard to reproduce.
- Give the decision criterion: When the task breakdown is clear and the steps are fixed, use a Workflow — typical cases are copywriting pipelines and data-cleaning flows. When the task is open-ended and needs on-the-spot decisions, use an Agent — typical cases are coding assistants like Claude Code and Devin.
- Cite the production consensus: Anthropic reviewed a large number of production cases; the most successful implementations didn't use complex frameworks — they used simple, composable patterns.
- Establish the principle first: Complexity is a cost. Every layer you add has to answer the same question: is the gain from this layer worth the extra latency, spend, and debugging difficulty?
- Lay out the four-rung ladder: First optimize a single LLM call (Prompt, Few-shot, Temperature); if that's not enough, add RAG; if still not enough, use a Workflow to break the steps apart; only go to an Agent when you truly need flexible decisions.
- Price full autonomy: Handing control from code to the model means unknown loop counts, uncontrollable cost, and hard-to-reproduce behavior. Those costs only pay off when there's a matching gain.
- Give an over-engineering anti-pattern: Using an Agent framework for a problem that one Prompt plus one search can solve — the latency, cost, and uncertainty the framework introduces far outweigh the gain.
- Prompt Chaining: Use it when a task splits into a fixed sequence of steps. You can insert quality gates between steps — for example, check that the copy contains brand-critical information before it goes to translation. The cost is latency: you're trading latency for accuracy.
- Routing: When input types vary, classify first, then split. Simple FAQs go to a fast, cheap model like Haiku; refunds go to Sonnet plus order tools. The value is separation of concerns and cost tiering.
- Parallelization: Two sub-patterns. Sectioning runs independent sub-tasks in parallel — say, security, performance, and style reviews of the same code at once. Voting runs the same task multiple times and takes the majority — spending money for confidence.
- Close with the other two: Orchestrator-Workers has the orchestrator dynamically split tasks at runtime — use it when sub-tasks can't be fixed in advance; it's the closest to an Agent. Evaluator-Optimizer loops generate-then-judge, and fits cases like translation that have a clear quality bar.
- Start with Routing: Add a classifier. Simple FAQs go to a cheap small model; refunds, complaints, and other hard cases get the strong model plus tools. The bulk of support traffic is simple questions — this cut saves the most money.
- Govern tool returns: Check whether you're returning everything. Dumping 847 full records in one go burns 50,000+ Tokens; switch to the top 10 core fields plus a pagination hint, and 800 Tokens is enough — with higher information density.
- Take the cache dividend: Put stable content like the System Prompt and tool definitions in the prefix and keep them unchanged. Once you hit the Prompt Cache, the cost of the repeated portion drops sharply.
- Close the verification loop: Run evals after each change to confirm quality didn't drop, then report with data: how much cost fell, core metrics held flat.
- Lay out the two extremes: Too vague ("you are a helpful assistant") leaves the model with no sense of direction, so output stays generic. Too specific (50 rules plus 100 edge cases) locks the model down — it can't adapt when something new shows up.
- Give the sweet spot: A clear role, plus 5–10 core principles, plus clear boundaries — then trust the model to judge inside that frame. Like a good manager: give direction, don't issue every next instruction.
- Price the rules: 60 rules are Tokens themselves — they eat the attention budget. When rules fight each other, model behavior gets even harder to predict.
- Give a landing move: Sort rules into principles, format, and boundaries, then merge. You can usually compress to a dozen or so, then run evals to confirm behavior didn't regress.
- Explain the principle first: Externalize short-term memory (the context window) into long-term memory (the file system). After a window reset, the first thing a new session does is read the notes to restore state — memory continues across windows.
- The format must be fixed and structured: Free-form prose costs extra Tokens just to understand when you read it back. Use fixed columns: done, not done, key decisions, known issues — later reasoning pulls straight from the columns.
- Set the read/write rhythm: Write after every key step, don't wait until the window is almost full; read as the first step of every window reset or new session. If the rhythm slips, the notes drift from actual progress.
- Separate the job from Compaction: Compaction shrinks old information so you can keep using it — good for uninterrupted conversations. Notes are stored outside and fetched later — good for tasks that may be interrupted and need to continue across sessions. Real products use both together.
- Explain the mechanism: Think Tool is a side-effect-free tool. Its only job is to let the Agent write its thinking down mid-execution. Packaging "stop and think" as a tool call lets the model naturally insert a stretch of reasoning into the rhythm of the tool chain.
- Explain the scenarios: Three cases see the most lift: long chains of 5+ tool calls; policy-dense environments (20 refund policies plus 6 exceptions); serial decisions where each step depends on the last. The common thread: early information gets drowned by later context.
- Cite the numbers: τ-bench airline support went from 0.570 to 0.878 — a 54% lift; retail support lifted 11%. Airline change-and-cancel policy is far more complex than retail. The denser the policy, the more Think Tool is worth.
- Draw the boundary: Using it for one-and-done operations like checking weather or reading a file is pure overhead; pure generation tasks that don't call tools don't need it; problems you can think through in one shot are better handed to Extended Thinking.
- Own the bill first: Returning everything is a disaster. 847 full records are about 52,000 Tokens. The model can't process that, and it dilutes attention on everything else in the window.
- Give four slimming strategies: Summarize (return stats only), truncate (top N by default), paginate (with a page parameter), filter (support conditions) — combine them by scenario.
- Returns should carry the next clue: Returning only "success" is bad design. Return what the Agent needs for the next step — ticket ID, link, owner — and you skip a follow-up lookup call.
- Bake pagination into the return body: Include total, showing, page, plus a hint like "use page=2 to see more," and the Agent knows how to fetch the rest.
- Name it first: Wrong-selection rate rising with tool count means the boundaries between tools have gone fuzzy. Put search, find, and lookup — three near-identical tools — side by side, and wrong picks are a disease of the tool set. The model is just exposing the symptom.
- Merge the duplicates: If two tools overlap in more than half their use cases, merge them. Better one tool with a few extra parameters than two that are easy to confuse.
- Add namespaces: Group related tools with a shared prefix — jira_create_issue, jira_list_issues, git_diff, db_query. The Agent can see at a glance which tools operate the same system, and the wrong-pick rate drops sharply.
- Accept with data: Tool-selection errors can be measured by evals. Run the same suite before and after governance, compare the hit rate, and prove the cuts were the right ones.
- Prototype: Have Claude Code generate the tool prototype from the requirement — definition, parameter validation, API call logic. Humans only describe what they want.
- Evaluate: Build evals on four dimensions: did the Agent pick the right tool, were parameters filled correctly, was the return understood correctly, and end-to-end task success rate.
- Optimize: Have Claude Code read the eval results and auto-analyze failures. It can produce precise conclusions like "43% of errors are the Agent confusing search and list because the descriptions are too similar," then rewrite the descriptions, add distinguishing notes and examples.
- Define the human's role: Humans set the eval standard and do final acceptance; the machine writes and revises. Loop until you hit the bar — iteration is an order of magnitude faster than hand-tuning.
- Week one, define success: The first value of writing evals is forcing the team to answer "what counts as good." Pick the core user scenarios and write 20 carefully designed Tasks, each with input and a success criterion. 20 is enough to start — don't wait for a grand plan of 500.
- Build the minimum loop: The Harness spins up the sandbox, runs the task, collects results; the Grader scores; a set of Tasks makes a Suite you can run in one click. First align the team on the language: Task, Trial, Grader, Suite.
- Save the Transcript: Record the full trajectory of every run — each reasoning step, each tool call, intermediate results. When something fails you can tell whether it picked the wrong tool or filled the wrong parameter, and the eval can actually steer improvement.
- Hook it into the change process: From then on, Prompt changes, model swaps, and parameter tweaks all run the Suite first — you see the blast radius in minutes. The team's reporting language upgrades from "feels worse" to specific scores.
- Explain why so many runs: Model output is stochastic. A single run of the same task is noise. The same Task needs multiple Trials to have statistical meaning. Saving that money is making product decisions with dice.
- Price the cost of no evals: Fix one bug, create three; you only find out when users complain. One "the Agent got worse" investigation means three days of commit archaeology. Engineer time is far more expensive than API fees.
- Price what evals earn: Change a Prompt or swap a model and know the impact in minutes. When a new model ships, run the Suite, confirm no drop, and switch — you're first in line for the dividend every time.
- Give a cost-down plan: 20 carefully chosen cases cover the core scenarios. Deterministic checks sit on millisecond, zero-cost code Graders; the expensive model Grader is only used for subjective quality.
- Name it first: Improving one dimension is not improving the whole. In a real case, a System Prompt change to cut wordiness raised conciseness and dropped the coding eval about 3%: as the model got concise, it also skipped key comments and error handling.
- Process error one: No line-by-line ablation. Prompt changes should alter one line at a time and measure the impact alone, so you know what each sentence contributes.
- Process error two: You only measured the target dimension. Before shipping, run the full eval suite — conciseness, code quality, over-engineering, together — so you don't fix one thing and break another.
- Cite a sibling incident: Even a seemingly harmless config change like the default reasoning-effort value has caused multi-dimension regressions. The conclusion: every change — Prompt, parameters, infrastructure — goes through evals the same way.
- Failure mechanism one — the model recognizes the exam: On BrowseComp, Claude Opus 4.6 can infer it's running a benchmark, recognize the question pattern, then search for answers or call similar items it saw in training data. A static question bank in a networked environment may be measuring recall, not ability.
- Failure mechanism two — discriminating power decays: The stronger the model, the better it is at recognizing evals. Fixed benchmarks keep losing their ability to separate frontier models, and public-set scores get systematically inflated.
- Failure mechanism three — infrastructure noise: Change only CPU and memory limits, and scores can move 6 percentage points. Same model, same task, different sandbox config — the ranking can flip.
- Give the alternative: Use private cases from your own business, dynamically generated test items, and limited networking; align the eval environment with production; when you report a score, report the environment config with it.
- Failure mode one — One-shotting: The Agent tries to finish every feature in one go and the window runs out mid-way. The next Agent to take over faces a half-built mess and can only guess what the last one did. Time gets burned putting basic features back together, and progress stalls.
- Failure mode two — Premature Completion: The Agent sees a few features implemented and declares done — it actually only did 30% of the core. No task list, so it doesn't know what's missing; no end-to-end tests to prove it actually runs.
- Give an analogy: Like an engineering team that fully amnesias on every shift change — everyone who sits down has to understand a pile of half-finished code from zero. That's a long-running Agent with no handoff mechanism.
- Name the essence: The core challenge of long tasks is handoff; doing the work is the easy part. What Agents lack is a way to keep continuity when context breaks. The direction of the fix is a progress file plus incremental commits.
- Split the two roles: Initializer runs only the first turn, taking you from zero to something: write init.sh to set up the environment, write the progress file, expand high-level requirements into a detailed feature list, make the first git commit. The Coding Agent reads the progress file each turn, does one feature, then updates progress and commits.
- Keep the feature list in JSON: Models are less likely to casually rewrite structured JSON; Markdown lists get rewritten on a whim. Each feature carries a category, a step list, and a passes field.
- Accept with end-to-end tests: Explicitly require the Agent to actually open the page and click buttons with browser automation. Unit tests alone aren't enough. E2E passing is what counts as passes.
- Spell out the value of one-at-a-time: At the end of every turn the code is in a mergeable state, the commit is a rollback point, the progress file is the handoff letter, and the window never gets stuffed to bursting.
- Admit half of it first: A Harness encodes assumptions about the current model's abilities, and assumptions go stale. Real case: Sonnet 4.5 had context anxiety — performance dropped as conversations got longer, so the team added a context-reset mechanism. After switching to Opus 4.5 the anxiety disappeared, and the mechanism started slowing things down.
- Give the classification: Workarounds for a specific model and specific Prompt tricks will go stale. Sandbox isolation, permission layering, eval systems, and Session logs are lasting architecture — the stronger the model, the more you need them.
- Schedule by class: Lasting assets first; skip temporary patches if you can. The principle: don't write code today that tomorrow may not need.
- Flip the role of evals: When a model upgrades, evals are exactly what lets us confirm in days whether the new model works and which old patches can die. The eval investment in these three months is what saves the manual verification on every future upgrade.
- Lay out the three components: Session is an append-only persistent event log; Harness is the brain, running the loop that calls the model and routes tools; Sandbox is the hand, the container that executes code and edits files.
- Pets become cattle: When all three are crammed in one container, a container crash loses the session and the task fails completely. After the split, a sandbox crash is just one tool-call error — the model decides to retry, the system spins a new container, and work continues.
- Explain the brain's recovery path: A Harness crash isn't fatal either. A new Harness starts with wake(sessionId), reads the full event stream back from Session to restore context, and the task is unaffected.
- Cite the performance gain: The brain can start processing without waiting for the container to be ready — median TTFT dropped 60%, p95 dropped over 90%. Once components are decoupled you can also have one brain control multiple hands in parallel, or one hand relay across multiple brains.
- Give the analogy first: The Context Window is RAM — fast, small, gone when you're done — it holds the curated content for the current reasoning step. Session is disk — large, survives power loss — it holds the complete record of every raw event.
- Explain why you separate them: Compaction and trimming are both irreversible, and when you compress it's hard to predict which Tokens will matter later. A detail that looks irrelevant today may be the basis of a key decision tomorrow — lose it and it's gone forever.
- Give the right posture: All raw events go into Session, append-only, never deleted. The window is just a temporary viewfinder onto Session. Losing Context is fine — you can rebuild it anytime.
- Spell out the engineering dividend: The Harness uses getEvents to query any interval on demand, filter specific event types, and keep the prefix stable to improve Prompt Cache hit rate. Swap the model or the Harness and Session doesn't move.
- Lead with the conclusion: You can cut most of them, not all of them. Auto Mode's production data: a classifier plus a sandbox cut permission dialogs by about 83%, with no drop in safety.
- Explain the classifier: Assign a risk level to every action. Safe operations like reading files and searching code go through; only genuinely suspicious ones pop a dialog. Dialogs go from "ask by default" to "ask on exception."
- Explain the sandbox backstop: Even if the classifier mis-allows a dangerous action, the code still runs in an environment with triple isolation — file system, network, process — and can't hurt the real system.
- Keep a high-risk deny list: Deleting files, writing databases, sending email — those always need a human. Those dialogs are exactly where user trust comes from.
- Catch the supply-chain risk: The Agent trusts tool descriptions returned by MCP. A malicious server that tweaks a description can steer behavior. The Agent thinks it's using a "search files" tool; what's actually running is a delete.
- Catch the injection risk: Even a non-malicious server isn't safe. Content it forwards (a scraped page, say) may hide injection instructions, and when the Agent processes that data it can be talked into unintended actions.
- Give the governance move: Vet every MCP integration the way you vet a third-party SDK. Minimize how many you connect. Treat everything MCP returns as untrusted data.
- Give the architectural backstop: Store OAuth Tokens in an external Vault and forward through a proxy, so the sandbox never sees credentials; isolate the network to limit exfiltration. Even if injection succeeds, the attacker can't steal anything or send it out.
- Set the tone first: Promises are kept by structure, not by the model behaving. The design goal: even if the model is fully steered by an injected instruction, the production database is still unreachable.
- Give three layers of trust control: Tool level — high-risk actions need human approval every time. Session level — each session has a limited authorization scope, reclaimed automatically when it ends. Global level — org policy hard-codes that production databases are never reachable; no session grant can override it. The contract's "never" maps to the global layer.
- Add network isolation: The Agent runs in a restricted sandbox; network access is controlled; the production database address is unreachable at the network layer — it doesn't even get a chance to try.
- Give auditability: Session logs are append-only and record every step. The customer can come audit anytime. A promise plus evidence is what you can actually sign.
- Give that sentence: Do the simplest thing that works. Every clever pattern points back to it: start from the simplest plan, and add complexity only when it clearly pays off.
- String the chapter with it: If one Prompt can do it, don't reach for a Workflow; if a Workflow can do it, don't reach for an Agent. For context, find the minimum high-signal Token set. If tools can be merged, don't split them.
- Add the second layer: The core of Agent engineering is state management. What information appears in the window, when, and in what form — that's all an engineer can control. The model's intelligence is given by pretraining; you can't control that.
- Add the time dimension: Models get stronger; engineering gets simpler. Helper logic like retries, error correction, and formatting becomes redundant as models improve. Spend the effort on lasting architecture: evals, sandboxes, Session.
Why “AI Engineering Design Patterns · 30 Tough Questions” can find relevant content
“Each with intent, framework, and bonus points: context engineering / long tasks / grep vs RAG / ACI tool design / eval infrastructure / LLM-as-Judge / sandbox isolation” moves retrieval beyond storing material: the real question is how to find what is relevant. That decision shapes the input quality of RAG, recommendation, and image-search systems.
Similarity is not the answer
In the flow described by “Each with intent, framework, and bonus points: context engineering / long tasks / grep vs RAG / ACI tool design / eval infrastructure / LLM-as-Judge / sandbox isolation”, embeddings place items in a comparable semantic space and a neighbor index narrows the search. The final answer still depends on whether the retrieved chunks cover the question, whether the distance metric fits, and whether the evidence is current.
- State the goal: Find the minimum high-signal Token set. Every Token must contribute to the reasoning — the mindset of "stuff in as many as possible" doesn't work
- Give three handles: System Prompt at the right altitude (role + principles, don't pile on 50 rules); lean tool set; Few-shot of 2-3 carefully chosen representative examples — don't…
- Pillar 2 — Structured notes: Proactively write key information to external files; new windows read them back to restore memory. Claude Code's TODO file and the game notes Claude ma…
Separate findable from relevant
Turn “Each with intent, framework, and bonus points: context engineering / long tasks / grep vs RAG / ACI tool design / eval infrastructure / LLM-as-Judge / sandbox isolation” into a small test: prepare queries with known answers, record relevance, misses, and distractors, then decide whether chunking, the index, or reranking needs to change.
Take the example one step further
The lesson starts with “State the goal: Find the minimum high-signal Token set. Every Token must contribute to the reasoning — the mindset of "stuff in as many as possible" doesn't work” and then moves to “Give three handles: System Prompt at the right altitude (role + principles, don't pile on 50 rules); lean tool set; Few-shot of 2-3 carefully chosen representative examples — don't pad with edge cases to look t…”. Reading those two pieces together makes the distinction clearer: which points are facts in the lesson, and which judgments depend on their conditions.
Carry the judgment into the next situation
The same logic applies to retrieval: define what counts as relevant, check whether recall covers the question, and then inspect whether ranking, chunking, or freshness pushed useful evidence out.
- “AI Engineering Design Patterns · 30 Tough Questions”: State the goal: Find the minimum high-signal Token set. Every Token must contribute to the reasoning — the mindset of "stuff in as many as possible" doesn't work
- “Take it further”: Give three handles: System Prompt at the right altitude (role + principles, don't pile on 50 rules); lean tool set; Few-shot of 2-3 carefully chosen representative examples — don't pad with edge cases to look t…
- “The closing point”: Accept the premise: The goal is to put the right information into the context window — RAG is just one means among many. For data that changes frequently like a codebase, just-in-time retrieval is often more ap…
The final “The closing point” brings the discussion to “Accept the premise: The goal is to put the right information into the context window — RAG is just one means among many. For data that changes frequently like a codebase, just-in-time retrieval is often more ap…”. The useful thing to carry forward is knowing which judgments must be revisited when input, scale, or risk changes.
I turned one judgment from this article into a small experiment I could run today. Knowing what to observe next is more useful than simply remembering the conclusion.
After reading this, I first looked for the conditions behind the idea instead of copying the method into a project. That order made the later trade-offs much clearer.
When this judgment reaches real work, which constraint should be added first? I am curious which step matters most between reading and the first practical attempt.
No discussion on this article yet.