Skip to content
mentoor

Topic 4 of 5 · 4 min read

Reviewing AI specs with engineers

Goal: Find the ambiguous, conflicting and untestable lines in an AI spec and propose a testable rewrite for each.

A spec review is a line-by-line read with engineers, looking for words that cannot be tested, rules that conflict, data that does not exist and a design that costs too much or answers too slowly. The product manager brings the intent. The engineers bring what the system can really do.

Check yourself · 1 of 3

In a review, an engineer asks what "relevant answers" means. What is the best response?

Choose one answer

Why it matters

AI specs fail in quiet ways. The words look fine, so everyone nods, and the gap shows up in week six when the feature cannot do what the spec assumed. A review held before building finds those gaps while they cost a conversation and not a rewrite.

What to look for

Read each line and ask five questions.

  1. Is any word vague? Words such as appropriate, relevant, natural, quickly, safe or accurate have no edge. Ask what output would break the rule, and write that.
  2. Do two rules conflict? "Always answer the question" and "never state anything not in the documents" collide when the documents are silent. Decide which wins and write the tie-break.
  3. Can it be tested? If you cannot imagine an example output that clearly passes and one that clearly fails, the rule cannot be checked.
  4. Does the data exist? A rule such as "mention the customer's last order" needs access to order data, in a form the feature can read, with permission. Ask engineering where each fact comes from.
  5. Can we afford it? Every model call costs money and time. A spec that asks for three retrieval steps, a long answer and a second model to check it may take eight seconds and cost cents per chat. At 100,000 chats a month, that matters. Ask for the latency target and the cost per request, and see whether the design fits.

Run the review as a conversation, with the examples and eval criteria on the table. Engineers often say "I would build it this way" about a line that the PM thought was clear, which shows the line has more than one meaning.

Before and after

Before: The assistant should respond quickly with relevant, safe answers.

Engineer's questions: how quickly, relevant to what, safe against what?

After: The first token appears within 2 seconds for 95 percent of requests. Answers use only the top three retrieved articles. Never output personal data from another customer's record. Refuse requests for legal advice with the standard sentence.

What goes wrong

  • The review is a presentation, so engineers listen and nobody reads the lines.
  • Vague words survive because they sound reasonable.
  • Missing data is found after the build starts, when the schedule is already set.
  • Cost and latency are left to "be optimised later" and then cannot be.

Examples

A conflict found in review

Rule 1: Always give the customer an answer. Rule 2: Never state anything that is not in the help articles.

An engineer asks what happens when no article covers the question. The fix is a tie-break: Rule 2 wins, and the reply is "I do not have that information, I will pass you to a colleague."

Cost and latency check

The draft design retrieves ten articles, writes an answer, then asks a second model to check it. Engineering estimates 7 seconds and about 3 cents per chat. At 60,000 chats a month that is roughly 1,800 dollars. The team cuts retrieval to three articles and checks only when the answer mentions money, which brings the delay under 3 seconds.

Key points

  • A spec review reads every line for vague words, conflicts, untestable rules, missing data and unaffordable cost or delay.
  • For any vague word, ask what output would break the rule and write that instead.
  • When two rules can collide, the spec must state which one wins.
  • Every fact the feature uses must have a named source that engineering can read, with permission.
  • Agree a latency target and a cost per request in the spec, since both shape the design.

Common mistakes

  • Presenting the spec instead of reading it line by line with engineers.
  • Leaving vague words in because they sound reasonable to everyone in the room.
  • Assuming the data exists and finding out after the build starts.
  • Postponing cost and latency until after launch, when the design is hard to change.

Check yourself · 2 of 3

Which pair of rules is most likely to conflict?

Choose one answer

Check yourself · 3 of 3

A spec says the assistant should mention the customer's last order. What should the review ask first?

Choose one answer

Practice items, not counted towards your mastery.

Start here