AI Harness · 30 Tough Questions
Each with intent, framework, and bonus points: context overflow / Prompt engineering / injection defense / tool calling / cost accounting / KV Cache / output formats
THE QUESTION THIS PAGE ANSWERS
ANSWER FIRSTWhat is the key idea behind “AI Harness · 30 Tough Questions”?
Each with intent, framework, and bonus points: context overflow / Prompt engineering / injection defense / tool calling / cost accounting / KV Cache / output formats
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.
- First, identify the root cause: The context window is all the Tokens the model can see in one pass. Anything beyond it is truncated, and the model has zero memory of it — not even a vague impression. Forgetting means early turns have been cut off.
- Give three strategies: Direct truncation (drop the earliest turns — zero cost but permanent information loss); summary compression (summarize history before storing, preserving names and preferences); selective retention (vectorize history, use semantic retrieval to inject only relevant turns).
- Match strategy to scenario: Single-turn tool queries like weather checks are fine with truncation. Customer service and long-term learning conversations benefit from summaries after 20+ turns. Complex Agents with very long conversations (100+ turns) should use vector retrieval — fewest Tokens, most accurate answers.
- Puncture the "big window" fallacy: Billing is per Token — stuffing everything in makes costs rise linearly. Long contexts also suffer attention dilution. A large window is a capability ceiling; managing the window is the actual solution.
- Give the formula first: Role + Task + Context + Constraints + Examples + Format. Missing any component degrades quality. The core mindset is to treat Prompts like code.
- Go deep on one technique: For example, Few-Shot. For text classification without examples, the model gives you flowing prose. Give it three "input → label" examples, and it immediately learns the format and standard, outputting a single word that can go straight into your program.
- Have an advanced technique ready: For complex reasoning, add chain-of-thought — make the model work step by step. The reasoning process becomes transparent and accuracy improves dramatically. Breaking complex tasks into multi-step sub-Prompts, each optimized separately, produces far higher quality than asking everything at once.
- End with constraints: Word count, audience, tone, and forbidden words — write them clearly. Constraints are the cheapest way to control output. A Prompt without constraints produces random results.
- Lead with root cause: Prompt injection shares its origin with SQL injection: data and instructions flow through the same channel. The system and user text in the message list are all concatenated into one string fed to the model — it can't distinguish which part is an instruction and which is user data. There is no silver-bullet fix.
- Give a three-layer intercept: Input layer: use regex to filter known attack patterns (patterns like "ignore.*instructions" or "DAN" trigger immediate rejection at zero Token cost). Prompt layer: write security constraints at the end of the System Prompt, declare them highest priority, and state they cannot be overridden by user input. Output layer: scan replies for System Prompt keywords and rewrite or replace on match.
- Standardize rejection language: Whichever layer intercepts the attack, respond in natural product-appropriate phrasing. Never expose the detection logic — this prevents attackers from using trial-and-error feedback to narrow in on a bypass.
- Acknowledge there's no silver bullet: Regex can't stop metaphorical bypasses; model constraints can't stop new variants. Security = layered stacking, each layer catching a portion, each successive layer seeing fewer threats.
- Cut to the essence: The model does nothing but predict text from beginning to end. A "tool call" is the model outputting a structured JSON expressing "I want to call get_weather with parameters city=Beijing, date=tomorrow." This is just text — nothing has happened yet.
- The framework takes over: Your code parses this JSON, performs tool whitelist validation, parameter checking, and permission control, then actually calls the API. All security logic lives in the framework layer — the model has nothing to do with it.
- Inject the result: The API's return data is appended to the message list as a tool_result message, and the model predicts again based on the full context to generate the natural-language reply the user sees. Complete chain: text → framework parses → API → inject result → text.
- Answer the responsibility question: It's the framework's. The model only makes the request; execution and interception are both the engineering code's job. That's why high-risk operations need whitelists, parameter validation, and human confirmation — these are product design decisions.
- First explain the structural cause: In multi-turn conversations, each turn resends the full history. Costs grow with every turn. If users grew 30% but conversations became deeper and longer, a several-fold bill increase is mechanistically expected — and fixable.
- Give the fastest win: Check KV Cache hit rate. Keep the System Prompt stable and don't inject dynamic content into it. Cached history is billed at a discount — in multi-turn scenarios this is the biggest cost driver.
- Give the second win: Slim down the context. Summarize and compress history, drop irrelevant turns, stop using the window as a trash can. Input Tokens drop directly.
- Commit with numbers: Define a cost-per-session metric and report weekly. Week one: fix cache hit rate. Week two: add compression. After systematic optimization, cutting the bill in half is a grounded target.
- Explain the mechanics: Every turn, the model runs Attention over all history Tokens. KV Cache stores the K/V matrices that have already been computed; the next turn only computes new Tokens — trading space for time and money.
- Explain the hit condition: Cache is matched by prefix. The System Prompt sits at the very front — if even one character changes, all cache after it is invalidated.
- Answer the trap: A dynamic timestamp changes every second — every request has a different prefix, hit rate goes to zero, cost +100%. The correct approach is to keep the System Prompt static and pass the time in a user message.
- Add the engineering trap: Cloud inference is distributed. Requests may be routed to nodes without your cache, causing mysterious implicit cache misses. Production systems should use explicit caching (cache_control) to guarantee hits.
- First segment by consumer: If the output goes to a program for parsing, storage, or processing — choose JSON, with stable field structure. If the output is displayed directly to humans — choose Markdown: models handle it best and rendering is cheap.
- Explain the streaming difference: JSON requires the full text before it can be parsed — in a streaming scenario the user just waits. Markdown can display token-by-token, producing the best feel. This is the root cause of poor time-to-first-character in many products.
- Give the middle ground: If you need both structure and streaming, wrap fields in XML tags. The frontend renders each segment as its closing tag arrives — balancing structure and experience.
- Add the cost angle: JSON's brackets, quotes, and field names are all formatting Tokens. The same content costs more than a compact format — for high-frequency endpoints, shaving that 10-30% is worthwhile.
- Name the tension first: An LLM is a plain-text model. It emits text token by token — it doesn't know color, font size, or alignment. Users still expect headings, bold, and lists. The format has to solve layout inside plain text.
- Eliminate the alternatives: HTML tags are heavy — the same passage is about 45 tokens, half of them tags. Word/PDF are binary; you can't stream them character by character. LaTeX is easy for the model to get wrong. Markdown expresses layout with a few characters like # and **, about 20 tokens for the same content — 55% cheaper.
- Put rendering on the frontend: The model only outputs Markdown text. The frontend renders it into rich text with marked.js (6KB, zero dependencies, one line of code) or react-markdown. If you want rich-text polish, let the render layer do the work. The model doesn't need to care about styles.
- Add the streaming trap: During streaming, a code block may not be closed yet — parsing it raw will blow up. In production you detect unclosed backticks, temporarily close them, then render, with a 50ms throttle. Syntax highlighting has to re-run after every re-render.
- Lead with the conclusion: You don't need to train a model. The System Prompt defines role, tone, and constraints. Swap the role definition on the same model and you have a different product. Every AI product is, at heart, a different role written into the System Prompt.
- How to land the voice: Write the star agent's style as a role spec — "warm and direct, 3 to 5 sentences, never say 'as an AI,' end with one actionable suggestion" — then add 2 or 3 real conversation examples for the model to copy. Showing examples beats explaining in words.
- How to land the template: Have the model output structured fields; the frontend renders them into the company template. The product owns the look. The model owns the content. Template redesigns don't require touching the Prompt.
- Give time and cost expectations: A Prompt change can ship to a small-traffic test the same day, with zero training cost. The one thing to watch: keep the role definition stable. Don't stuff dynamic content in, or the cache dies and costs go up.
- Separate the concepts first: Injection mixes instructions into a data channel so the model executes the attacker's commands — "ignore all previous instructions." Jailbreaking coaxes the model off its safety rails into an unrestricted role, like DAN. Jailbreaking is the role-play escape flavor of injection.
- Name the five types: Privilege-escalation instructions (forged identity, fake auth codes, gradual multi-turn privilege upgrades); role-play escape (DAN jailbreaks, grandma-exploit emotional manipulation); Few-Shot malicious injection (planting bias in examples, hijacking the output format); structural-symbol injection (JSON disguised as admin commands, instructions hidden in HTML comments, forged system delimiters); metaphorical disguise (classical-literature wrapping, "I'm teaching programming" excuses, reverse psychology).
- Call out the most dangerous type: Gradual privilege escalation is the most common in the real world: the first few turns are normal questions that lower your guard, then on turn three they claim to be an admin and ask you to drop the restrictions. The defense principle: evaluate safety independently on every turn. Don't relax because the earlier turns looked fine.
- Land it on defense logic: Regex can catch DAN and "ignore.*instructions" and other known keywords. It cannot catch metaphors and new variants. So Prompt-layer constraints and output-layer scanning have to be the backstop.
- Acknowledge, then add the bill: The API really isn't hard. But every tool definition lives in the System Prompt — about 60 tokens per turn. A product with 10 tools and 100 conversation turns a day burns 60,000 tokens on tool definitions alone. The longer the tool list, the higher the chance the model picks the wrong one.
- Review the description together: Good vs. bad descriptions differ by 3× in success rate. Whether the description says "dates must be YYYY-MM-DD" decides if the model gets it right in one call (800 tokens) or guesses the format four times (3,000 tokens). Write the prerequisites too: an email tool should say "if the user gives a name, call find_contact first to look up the address," or the model will invent one.
- Mark the safety properties: Is this tool read-only, or does it change state? Can it run concurrently with other tools? isConcurrencySafe and the read/write flag decide the scheduling strategy and whether you need a human confirm. That's a business call — I have to make it.
- Set the failure policy: How long is the timeout, how many retries, what do you return on failure. 10 seconds for reads, 30 for writes, at most 2 retries, a friendly message on failure — lock those in before you ship.
- Draw the line in one sentence: A regular LLM can only "talk" — question in, answer out, done. An Agent can "do" — it plans, calls tools, observes the result, and corrects itself until the task is finished.
- Cite the source: Lilian Weng's June 2023 post "LLM Powered Autonomous Agents" laid out the classic architecture: the LLM in the center as the brain, surrounded by Planning, Memory, Tools, and Action. Almost every Agent framework today is a shadow of that diagram.
- Attach an example to each: Plan breaks competitive analysis into search, extract, compare, write — and if competitor B has no public pricing, it dynamically switches to third-party reviews. Memory is short-term via the context window, long-term via a vector store that remembers the user across sessions. Act/Reflect is observe-after-execute: the code errors, it diagnoses, it edits, it reruns, until the tests pass.
- Land on the formula: Agent = LLM + tools + a loop. The core is the "think, act, observe, think again" cycle. The better you design the loop, the more reliable the Agent.
- Qualify it with an analogy: MCP is USB for AI tools. Without it, every Agent writes custom glue for every tool: 3 Agents × 3 tools = 9 custom integrations, and a new tool means 3 more. With it, you write the adapter once — 6 standard connections, and a new tool adds 1.
- Three transports: stdio uses a local process's stdin/stdout — simplest, lowest latency, good for local debug. SSE is one-way: the server keeps pushing and the client can't interrupt mid-stream, and it's being phased out. Streamable HTTP is bidirectional streaming, the official recommended standard — use it on new projects.
- Give the adoption call: Tools you want to expose outward are worth putting on MCP — one adapter gets you into every MCP-capable Agent ecosystem. Purely internal private tools can wait. Ship the business first, standardize later.
- Name four red lines: Sensitive data stays inside the wall — customer info, trade secrets, financials don't go into external AI, and a vendor promising "we don't store it" doesn't help, because the transfer itself is already a leak. Credentials never enter the chat — if an API key, password, or token gets pasted, rotate it immediately. High-risk actions require confirmation — dropping a database, transferring money, changing permissions: AI can only recommend, a human hits confirm. Approve before use, label after — AI-generated content going public must be marked; that's a legal requirement under China's Interim Measures for the Administration of Generative AI Services (《生成式人工智能服务管理暂行办法》).
- Give the frontline a judgment test: Default to redaction. If you're not sure you can paste it, redact first. One self-check: if this conversation got screenshotted onto the internet, would we be in trouble? If yes, don't paste it.
- Pair it with tiered controls: L1 scenes like writing email and summarizing — people decide on their own. L2 scenes that affect external customers need human review plus manager approval. L3 scenes where an Agent touches production or money need sandbox testing, security approval, a kill switch, and logs kept for 180 days.
- Make the accountability explicit: The user is the first responsible party — "the AI wrote it, not me" doesn't fly. The approver who signs is jointly liable. A manager who "didn't know a report was using it" is not off the hook either.
- Lay out three strategies: Sequential — one after another, safest, total time is the sum (1.5 + 0.8 + 1.2 = 3.5 seconds). Concurrent — all at once, total time equals the slowest (1.5 seconds), 57% faster. Smart batching — group by safety and run in batches.
- Give the decision rule: Look for state changes and dependencies. Booking a flight may charge a card and change user state — run it alone. Weather and hotels are pure lookups — safe to merge and parallelize. Batch 1 runs the flight; batch 2 runs weather plus hotels together.
- Land it on the mechanism: The framework marks each tool with isConcurrencySafe, and the concurrent-safe ones become a batch that runs together. The mark is a business judgment. The PM has to tell engineering each tool's safety tier.
- Follow up on dependencies: If hotels need to filter by flight arrival time, they depend on the flight result and must be serial. Draw the dependency graph first, then talk scheduling.
- Read out the ledger: The user sees 1 reply. The API ran 5 messages, 2 model calls, 1 external API. The messages are, in order: system instruction, user question, model returning tool_calls, tool role filling the result back in, model giving the final answer.
- Explain the critical hop: In message 3 the model's content is null — only a tool_calls field. That turn the model didn't speak. It submitted a "request form." The framework is what actually calls the API.
- Point out the cost implication: A conversation with tools is at least two model calls. Token use more than doubles versus plain Q&A. When you budget a tool-using feature, use that multiplier. Don't quote a one-call budget.
- Land it on product decisions: Of those 5 messages, which ones the user should feel and which stay silent — that's product design. A spinner while querying, a progress bar on tool results, exposing failure so the user can retry: every step is a decision.
- Give the budget frame first: The model window is 256K. Set the real safe space at 200K, and reserve 56K for the model's reply. Every compression trigger is a percentage of that safe space.
- Lay out four layers of defense: At 60%, trim — drop the huge raw tool returns from early turns and keep a summary; the user feels nothing. At 75%, light compression — replace early long turns with a short summary; mild loss. At 85%, fold — merge several early turns into one session summary; details go, the main thread stays. At 95%, emergency compression — keep only system, a global summary, and the last 3 turns.
- Show them the gain: In the course demo, a 1,200-token raw weather-API JSON compresses to an 80-token summary. With all four layers, the same 200K window can hold 5× more conversation.
- Give the conclusion: Deleting everything is using the fourth-layer emergency drug as the first layer. Do it in four layers and most conversations only ever hit layers one and two. The user never notices.
- Set the tone with an analogy: Short-term memory is the desk — the context window only holds so much. Long-term memory is the filing cabinet — a vector database stores user preferences, project config, historical bugs, and when you need them you retrieve the most relevant few and put them back on the desk.
- Walk the chain: Memory first goes through an embedding model into vectors and into a vector store. The course example is 768-dimension vectors in LanceDB. At question time you embed the question too, and recall by semantic similarity.
- Name the two key parameters: topK=5 caps each recall at 5 items so memory doesn't crowd the window. minScore=0.3 is the similarity floor — if it's not relevant, don't inject it. Those two numbers are product trade-offs you have to call.
- Point at the quality bottleneck: Retrieval quality depends on the embedding model. Whether "fix the login API" and "login API concurrency 500" match the same memory is what decides if this system is an assistant or a decoration.
- Enumerate five ways it dies: Bad parameter format — the model emits illegal JSON. Hallucinated tools — it calls a tool that doesn't exist. Infinite recursion — the same action loops. Insufficient information — it's missing something critical and guesses anyway. API exceptions — the external service is down and nobody handles it.
- Pair each with a guard: Schema validation catches bad format. Tool verification catches hallucinated tools. Loop detection catches infinite recursion. An ask-the-user mechanism treats insufficient information. Timeouts catch API exceptions. One death, one medicine. Don't expect a single magic switch.
- Translate it into product language: For every failure, pre-decide what the user sees. Retry, error, or hand off to a human — the copy and the exit are product design. Users should not sit there staring at a spinner.
- Explain the billing: The model slices the image into pixel blocks and converts them to tokens. The formula is scaled height times width, divided by pixels-per-token, plus 2. Dimensions also snap to multiples of 32 — shrink if over the cap, enlarge if under the floor — and you pay for the aligned size.
- Point at the waste: A casual 4K original uploaded as-is costs tens of times a 512-square thumbnail. If the task is just "is this an invoice," most of those pixels are burning money.
- Give a tiered plan: Match resolution to the task. Coarse classification uses low res, scene understanding uses mid, OCR and chart reading get high res. Pick the right resolution and token count can differ by 10× to 100×.
- Give the shipping action: Add a preprocessing layer on the upload path that auto-compresses to the right tier by feature type. The user feels nothing. The bill drops immediately.
- Lay out three modes: Confirm mode pops a dialog on every dangerous action — safest, most interruptive. Auto mode lets everything through — fastest, and one bad delete is an incident. Smart mode uses an LLM classifier to score risk: low risk goes through, high risk stops for confirm.
- Name the prerequisite work: Smart mode only works if every tool is marked "read-only" or "destructive." That mark is a tool-level product decision. The PM has to call them one by one. Pushing it to engineering is a dereliction.
- Face the new risk: If an LLM judges risk, the LLM can misjudge too. So the most destructive tier (drop a database, transfer money) never enters smart judgment — always human confirm. That's a second lock on misclassification.
- Compensate the experience: Put the confirm dialog in context, and let one confirm remember similar actions, so you cut the interrupt count and only keep the brake where it's actually dangerous.
- Agree first, then distinguish: A Skill is, at heart, experience written as a document — a process note plus tool-call guidance. But it loads on demand: it only injects when a matching task is recognized. Whatever you hard-code into the System Prompt occupies tokens on every request.
- Take SKILL.md apart: Metadata with trigger words decides recall. Applicability conditions are the anti-misfire insurance — if you're not in the target project directory, it exits silently. Steps are an SOP that runs in strict order. Allowed tools draw the safety boundary — a release Skill, for example, disables delete_file and sub-agents.
- Land the value: ReAct without a Skill is a bad loop — several rounds of trial and error. With a Skill it's a good loop: the AI knows what to do first and what to do next before it walks out the door, and finishes in one pass. Shorter loops mean fewer tokens and less latency.
- Give the collaboration split: Step order and safety constraints in a Skill are business experience — product writes those. Load and execution are engineering. Cursor, Claude Code, and Copilot all support the SKILL.md standard. You don't have to invent one.
- Give the core ratio: Agent engineering is 80% scaffolding plus 20% model. Most Agent projects fail because error handling isn't robust. How smart the model is is actually secondary.
- List five capabilities: Timeouts and retries — tool calls get a timeout plus exponential backoff. A max-step limit — max_iterations stops death loops. Input/output validation — JSON Schema blocks illegal parameters. A state machine plus rollback — checkpoint recovery, so failure doesn't restart from zero. Observability and logs — full-chain records, so production issues get located from the log.
- Contrast with a scene: In the course's "check flights plus book a hotel" simulation, a bare Agent dies on one API timeout and the whole order is toast. With scaffolding, it retries on timeout and rolls back to a checkpoint. The user just feels it was a bit slower.
- Land it on the schedule: Put those five capabilities into the engineering requirements at kickoff, on the same timeline as features. Bolting them on after launch is putting the brakes on after you've already started driving.
- Break the instinct first: Capability and price are nonlinear. Ten times the price may buy you 10–20% more capability. On a lot of tasks, users cannot tell a mid-tier model from a flagship.
- Give the selection formula: Selection equals task difficulty × call volume × room for error. Simple, high-frequency, low-tolerance-for-error tasks use a small model. Complex, low-frequency, high-value tasks get the flagship.
- Give the alternative: Take a fraction of the "flagship everywhere" budget and put it into intent recognition plus model routing: 80% of simple questions go to a small model, only the hard ones escalate. You can save 40% to 60% with basically no experience loss.
- Talk with data: Compare on scenario evals, not vendor leaderboards. Run the same batch of real tasks on every candidate and draw the conclusion from our own scenes.
- Give the positioning first: An Agent's core capability comes from the LLM. Its stability comes from engineering guardrails. An Agent with no guardrails is a sports car with no brakes — the more capable, the more dangerous.
- List five guardrails: An iteration cap stops death loops — force the Agent to clock out when it's spinning in place. Output truncation stops blow-ups — chop oversized tool returns. Timeouts stop freezes — a hung external call doesn't take the whole task with it. Interrupt recovery stops corruption — if power or network drops mid-task, resume from a checkpoint. Context emergency compression stops crashes — when the window is almost full, compress to stay alive.
- Give the judgment standard: These five defenses decide whether an Agent is "usable" or "good." Accept an Agent product by walking these five one by one. Miss one, and a matching class of production incident is waiting.
- Break the premise: Cloud LLMs run on many GPU nodes. Requests get randomly routed by a load balancer. Your cache is on node A; the request lands on node B and it's a MISS. Implicit cache's real hit rate is under 30% — pure luck.
- Explain the explicit approach: Add a cache_control line to mark a cache anchor. The platform then routes the request to a node that has the cache, and hit rate approaches 100%. Anthropic, Alibaba Cloud, and OpenAI all support this pattern.
- Do the price math: In the course's discount comparison, an implicit hit bills at 20% of standard price; an explicit hit bills at 10% — 90% off input cost. Explicit wins on both hit rate and discount.
- Give the conclusion: Production must use explicit cache. Betting your savings on random routing is neither reliable nor professional.
- Cut the syntax layer first: Formatting tokens can eat 13% to 20% of a Prompt. For complex objects, YAML instead of JSON saves 15% to 30%. For flat lists, CSV instead of a JSON array — repeating field names N times is the biggest waste — saves 30% to 60%. Stripping Markdown decorations like bold and headings saves another 8% to 13%. In the course's measured case, bold markers alone ate 8.5% of the tokens.
- Then cut the semantic layer: Don't hard-code Few-Shot examples. Retrieve the 3 most relevant ones with vectors each time — 87.5% savings. Compress long documents with LLMLingua-2 before feeding the model — 5× to 20×.
- Tidy the structure while you're at it: Models pay the least attention to the middle, so put the critical information at the head and tail. This step doesn't save money, but it makes every remaining token worth more.
- Name the double payoff: Attention is O(N²). Double the Prompt and compute goes 4×. The money you save by slimming is one payoff. The speed and quality lift is a free second one.
- Show the danger first: Hallucinations sit in the middle of real information, with the same format and citation style as the truth. In the course test, one fabricated fact was hidden among six real quantum-computing history points — names, project names, "Nature's top ten of the year," all invented, and more convincing than the real ones.
- Give the recognition pattern: AI's three forgery moves are fake names, fake projects, fake honors, often paired with real institutions, publishers, and Douban scores to look credible. Any citation specific enough to be a person plus a result — verify first.
- Give scene tiers: Email, brainstorming, translation and polish — use freely. Data analysis, technical research, writing code — verify, then use. Legal, medical, investing are high-hallucination zones — treat them as leads only. A client-facing report is in the verify-first tier. Check every key number and citation before you send.
- Give the action: Search the keywords in the report and cross-check. Delete any citation you can't source. Ten minutes. A lot cheaper than the client catching you.
- Give the split model: The main Agent is the coordinator that breaks up the work; sub-agents each own a job. In the course's auth-module refactor: the researcher is read-only and maps the code; the developer can read and write and makes the changes; the tester can read plus run and verifies.
- Set concurrency discipline: Read-only tasks parallelize for speed. Write tasks stay serial for safety. Two sub-agents editing the same file at once is a disaster, so permissions and order follow the read/write nature.
- Explain isolation: Sub-agents run in independent worker threads, memory-isolated, and the parent can kill a child at any time. The event stream has three signals — subagent_start, subagent_chunk, subagent_end — and the progress bar and interrupt button hang off those.
- Draw the applicability line: Don't split a job a single Agent can finish in one pass. Splitting has scheduling and merge overhead. Only stand up a team when the task naturally chunks and you get a parallelism win.
- Give the essence first: Every Harness technique is, at root, constructing better context so the model understands intent more accurately. RAG, compression, Few-Shot, caching — all different faces of that one job.
- Give three dimensions: Quality — inject precise, high-density information. Structure — put the critical information at the head and tail, put core constraints in the System Prompt. Cost — carry the most useful information in the fewest tokens. Before you fund any Harness work, ask which dimension it lands on.
- Give the trade-off rule: Worth doing: complementary techniques you use to compete on cost, efficiency, and quality, and that get better when the model upgrades. Worth dropping: techniques that burn huge resources, get replaced the moment the model upgrades, and that users never feel. Before every kickoff, ask: after the next model version, do we still need this?
- Close on the origin: When you don't know what to do, go back to that question: is the context I'm giving the model everything it needs to do this well? Answer that, and you've got the essence of Harness.
Why “AI Harness · 30 Tough Questions” can find relevant content
“Each with intent, framework, and bonus points: context overflow / Prompt engineering / injection defense / tool calling / cost accounting / KV Cache / output formats” 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 overflow / Prompt engineering / injection defense / tool calling / cost accounting / KV Cache / output formats”, 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.
- Puncture the "big window" fallacy: Billing is per Token — stuffing everything in makes costs rise linearly. Long contexts also suffer attention dilution. A large window is a capabi…
- Give the formula first: Role + Task + Context + Constraints + Examples + Format. Missing any component degrades quality. The core mindset is to treat Prompts like code
- End with constraints: Word count, audience, tone, and forbidden words — write them clearly. Constraints are the cheapest way to control output. A Prompt without constraints produce…
Separate findable from relevant
Turn “Each with intent, framework, and bonus points: context overflow / Prompt engineering / injection defense / tool calling / cost accounting / KV Cache / output formats” 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 “Puncture the "big window" fallacy: Billing is per Token — stuffing everything in makes costs rise linearly. Long contexts also suffer attention dilution. A large window is a capability ceiling; managing the win…” and then moves to “Give the formula first: Role + Task + Context + Constraints + Examples + Format. Missing any component degrades quality. The core mindset is to treat Prompts like code”. 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 Harness · 30 Tough Questions”: Puncture the "big window" fallacy: Billing is per Token — stuffing everything in makes costs rise linearly. Long contexts also suffer attention dilution. A large window is a capability ceiling; managing the win…
- “Take it further”: Give the formula first: Role + Task + Context + Constraints + Examples + Format. Missing any component degrades quality. The core mindset is to treat Prompts like code
- “The closing point”: Acknowledge there's no silver bullet: Regex can't stop metaphorical bypasses; model constraints can't stop new variants. Security = layered stacking, each layer catching a portion, each successive layer seeing…
The final “The closing point” brings the discussion to “Acknowledge there's no silver bullet: Regex can't stop metaphorical bypasses; model constraints can't stop new variants. Security = layered stacking, each layer catching a portion, each successive layer seeing…”. 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.