Lawrence Tang (@LawrenceTangAI) header
Lawrence Tang (@LawrenceTangAI) profile picture

// Human connection is the ultimate API.

Joined July 2026
Photo by Lawrence Tang (@LawrenceTangAI)Photo by Lawrence Tang (@LawrenceTangAI)Photo by Lawrence Tang (@LawrenceTangAI)Photo by Lawrence Tang (@LawrenceTangAI)Photo by Lawrence Tang (@LawrenceTangAI)Photo by Lawrence Tang (@LawrenceTangAI)Photo by Lawrence Tang (@LawrenceTangAI)Photo by Lawrence Tang (@LawrenceTangAI)Photo by Lawrence Tang (@LawrenceTangAI)Photo by Lawrence Tang (@LawrenceTangAI)
Test an AI agent’s deadline with two tool calls. Make the first wait for cancellation. Assert the turn times out, the second call never starts, and both call IDs get a result in history. If a write times out, check the stored state before retrying. github.com/alextangson/harne…
1
1
11
Toy eval: a ticket agent updates the DB correctly in 5 of 6 fresh runs. Of the 20 ways to pick 3 runs, 20 have a win and 10 have 3 wins. Estimates: pass@3 100%, pass^3 50%. Reset the fixture and grade the stored state, not the reply. arxiv.org/abs/2406.12045
4
You approve an AI agent’s PR. Then it changes the diff. Does your approval still count? GitHub can discard stale reviews when the diff changes, or keep them and require a fresh approval from someone other than the last pusher. docs.github.com/en/repositor…
1
1
8
Which tickets lack an owner? Don’t send every ticket to the model. Filter in code; return matching IDs, a count, and any pages you couldn’t read. A failed fetch isn’t “no matches.” anthropic.com/research/advan…
9
RAG answer wrong? Check the retrieved chunks before rewriting the prompt. In OpenAI File Search, add include: ["file_search_call.results"]. No relevant chunk? Fix retrieval. Right chunk, wrong answer? Fix how the model uses it. developers.openai.com/api/do…
2
1
14
Keep live chat synchronous. Batch the 10,000 product tags nobody is waiting on. OpenAI Batch costs 50% less than standard requests, with a 24h window. One easy mistake: join outputs by custom_id, not row order. developers.openai.com/api/do…
13
Imagine an AI agent succeeds 80% of the time. In 3 independent runs: • At least one success: 99.2% • All three succeed: 51.2% For a calendar agent, score the actual calendar change on every run. A great retry can hide a flaky workflow. anthropic.com/research/demys…
1
1
12
Your AI can return valid JSON and still get the job wrong. If it extracts a delivery date, check that the date appears in the source. If there’s no date, return null. Test that case before shipping. developers.openai.com/api/do…
7
An AI handoff needs a section for decisions that expired. Example: “Previous plan: edit checkout. Superseded: review only. Next: inspect the diff and list risks.” Keep the old plan for context. Check current instructions before acting. anthropic.com/research/effec…
9
A tiny prompt change can wipe out a long cache hit. For OpenAI API requests, put stable instructions, tool definitions, and examples first. Add the question and changing context at the end. A timestamp near the top can cut short the shared prefix. To check: send two eligible requests with the same opening and different questions. Compare cached_tokens in the responses. Track cache-write tokens where reported, too: more cached tokens alone doesn’t tell you what you paid. Docs: developers.openai.com/api/do…
12
Before restarting a long AI coding session, ask for a handoff you can actually verify. A useful template: • Goal and acceptance criteria • Decisions made, with reasons • Files changed and current state • Tests run and their actual results • Unresolved bugs and failed approaches • Next step, plus links to the evidence Then start a fresh session with the handoff and the relevant files. Ask it to confirm the current state before editing. A summary can preserve an outdated assumption as easily as a useful fact. Anthropic’s context-engineering guide explains why aggressive compaction can lose details that matter later. This checklist is a practical way to apply that idea, not a guarantee of reliable memory. Try it on one unfinished task: does the new session continue from the evidence, or repeat work already done? Source: anthropic.com/research/effec…
3
1
1
34
Before trusting an “AI-verified” claim, ask what the proof actually covers. DeepMind's new AlphaProof Code work on Signal makes this concrete: • Humans approve the specification. • AI agents generate proofs. • Lean checks the proofs, and a separate check confirms they match the approved specification. A correct proof of a weak specification can still leave the real requirement unmet. The result covers selected security properties of a particular compiled libsignal-cli build, under stated assumptions. Group messaging is outside its scope. The paper explicitly distinguishes this build from Signal's own apps. A practical checklist for AI verification claims: 1. What exact property was specified? 2. Which code and build were checked? 3. What assumptions and components remain trusted? 4. Would a known-bad implementation fail the check? The team reintroduced two historical bugs and proved the resulting binaries violated their symbolic security theorems. That's a useful check on what the specification actually catches. Primary paper + proof artifacts: google-deepmind.github.io/co…
35
An AI agent can list a tool without being authorized to execute it. A useful MCP permission test in a sandbox you control: 1. Grant read access. Confirm a permitted read succeeds. 2. Attempt a write requiring a scope the token lacks. Expect an authorization challenge and no write at the destination. 3. Decline elevation. Repeat the request. Confirm no write and no endless consent loop. 4. Grant the required scope explicitly, then retry. Confirm the intended write succeeds. Record the granted scopes and destination state for each case. A tool error alone does not prove that nothing changed. The official MCP security guidance recommends minimal initial scopes, targeted elevation, and caching denied-scope failures to avoid repeated elevation loops. It also warns against treating claimed scopes as sufficient without server-side authorization logic. The four-case checklist above is a suggested test, not a reported result. Source: modelcontextprotocol.io/spec…
40
A valid access token can still be the wrong token for your MCP server. Try this negative test in an environment you control. 1. Use an otherwise valid token issued for a different API. 2. Present it to the MCP server. 3. Expect rejection before any tool runs or protected data is returned. Then check the next hop. The MCP server must not forward the client's token unchanged to a downstream API. That API needs a separate token intended for it. The MCP spec requires audience validation and forbids token passthrough. A successful sign-in alone doesn't test either boundary. Keep raw tokens out of test logs. Record the expected recipient and the allow/deny result. Primary source modelcontextprotocol.io/spec…
1
31
“A wins” twice can mean your LLM judge picked two different answers. Try this when comparing prompt v1 and v2: 1. Judge A=v1, B=v2. 2. Swap: A=v2, B=v1. 3. Map the verdicts back to v1/v2, not A/B. For a conservative comparison, count a win only when both orders choose the same version. Keep ties and disagreements in the report. A flip warrants review; it doesn't prove position bias. Repeat the same order to check run-to-run noise. Consistency still needs checking against human labels. The swap-order approach comes from the MT-Bench paper (2023): arxiv.org/html/2306.05685v4 Does your eval track order disagreements alongside win rate?
9
A useful test for an AI support router: give it a ticket ID that exists, but belongs to a different customer. Suppose the model returns a structured object with a ticket ID, customer ID, and queue. Every field has the right type. The queue is an allowed enum value. The object passes your schema validator. The ticket/customer relationship can still be wrong. Google's structured-output documentation recommends application-side value validation and error handling for schema-compliant but semantically incorrect outputs: ai.google.dev/gemini-api/doc… Here's a hypothetical test to add before connecting that output to a workflow: 1. Create two synthetic customers, each with a separate ticket. 2. Prepare a request about customer A. 3. Inject a candidate output containing customer A's ID and customer B's ticket ID. 4. Confirm that schema validation passes, but the application rejects the mismatched relationship. 5. Confirm that no ticket is reassigned and the failure is recorded with a specific reason. Also test a nonexistent ticket and a valid ticket that has already been closed. Define the expected behavior for each case from your application's policy. A closed ticket might require reopening, review, or rejection. Run these as deterministic validator tests first. Separately, evaluate how often the model proposes invalid combinations. That gives you two useful signals: model quality and whether the application catches a bad proposal. Keep checks against authoritative application state before any write.
8
An AI research agent can read a correction and still calculate with the old number. A small hypothetical test: 1. Give it a source saying the quantity is 120. 2. Later, provide a correction: 102. 3. Ask for twice the quantity. The answer should change from 240 to 204, and cite the corrected source. Test this after a longer research session too. For real work, keep four things linked: • Current fact + source • Earlier fact marked as superseded • Calculations or claims that used the earlier fact • Any unresolved questions When a fact changes, revisit its dependent calculations and claims. Simply appending ‘102’ to the notes can leave ‘120’ alive in an old conclusion. The LongHarness preprint (Oct 9) separates source-linked evidence from conclusions and tracks revised or retired evidence. Its design still requires the agent to reassess dependent conclusions after an update. The checklist above is a practical test idea, not a reported benchmark result. Paper: arxiv.org/html/2610.13075v1
7
A tool can label itself “read-only” without being technically prevented from writing. That distinction matters when you connect an AI agent to MCP servers. The MCP specification says tool annotations from untrusted servers must be treated as untrusted. The official MCP blog also distinguishes descriptive hints from enforcement. Three separate questions to ask: 1. What does the tool claim? readOnlyHint describes expected behavior. A server supplies that metadata. Treat it according to your trust in the server, rather than letting an unfamiliar server approve itself. 2. What can it actually do? Inspect the permissions behind the connection. A reporting tool with a read/write database credential still has write capability, whatever its label says. Use restricted credentials and runtime controls where you need a hard boundary. 3. What can the whole workflow do? A reading tool can return attacker-controlled text. If the same agent can also access private records and send messages externally, review that combination. A harmless-looking call can be one step in a risky chain. A small hypothetical preflight: • Give a reporting tool a deliberately false read-only label. Does the host blindly skip its safety decision? • Try a forbidden write with a genuinely read-only credential. Does the backing system reject it? • Put an instruction to send a private record inside a retrieved document. Does the workflow keep that text separate from the user’s request? These are proposed checks, not reported test results or a complete security audit. For a tool review, record both columns: “declared behavior” and “enforced permissions.” A reassuring label should never be the only evidence. Official sources: blog.modelcontextprotocol.io… modelcontextprotocol.io/spec…
2
29