OBLYTECH Logo
OBLYTECH Logo

What should a team settle before writing the first prompt?

Before a team writes its first prompt for an AI feature, it should settle four things in writing: the task, the allowed inputs, the shape of a correct output, and what the system does when it cannot answer. Those four points give the prompt a fixed target to test against.

Write the task as one sentence before drafting

The fastest way to learn whether a team agrees on the job is to ask each member to write the task in one sentence and compare the results. Teams often find at this point that they hold different jobs in mind. One person wants the assistant to summarize support tickets. Another wants it to label them. A third expects it to draft replies. A single prompt cannot satisfy all three, and test results look inconsistent because the author and the tester are judging different work.

A usable task sentence has a verb, an object and a reader. For example: “Given one customer email, the model assigns exactly one category from a fixed list and names the product the customer mentions.” Two people reading that sentence should be able to write the same test case. If they cannot, the sentence is still too loose.

  • Name the single action the model performs.
  • Name the person or system that reads the result.
  • State what the task explicitly leaves out.
  • Keep the statement short enough to paste into the header of a test report.

Settle the inputs the model may use

Inputs are where a prompt quietly grows. A team starts with the customer message, then adds the account record, the last ten conversations, a policy document and a free-text internal note. Each addition is reasonable on its own. Together they change what the output can depend on, and that change is difficult to see once the prompt is in use.

Write the input list before the prompt. For each source, record who owns it, how often it is refreshed, and whether it can contain personal or confidential details. Keep only the sources the task needs. A field included because it might help should be marked optional and tested with and without it. If a result changes when that field is removed, the team has learned something about the prompt and should decide deliberately whether the field stays.

Data handling belongs in this step, not after testing. If an input includes personal details, the team needs an answer to whether the model may see them at all, and under what retention rule. The controls that support those answers are described in AI governance and risk controls. Settle them before the first test, because a prompt tuned on data that later turns out to be off limits has to be tuned again.

Describe the output shape in terms a tester can check

A good output description lets a tester mark each result as pass or fail without asking the author what was meant. “A helpful summary” fails that test. “Three sentences: the first names the customer’s issue, the second gives the next action, the third lists any date the customer mentioned” passes it.

Write the fields, values and blanks

  1. Decide the field names and their order.
  2. Write out the full value set for each categorical field.
  3. Set length limits for free-text fields in words, which is easier to test than characters.
  4. Define what a blank means: an empty value, a null, or an explicit phrase such as “not stated”.

The fourth item matters more than people expect. A downstream system may read an empty string as zero, and a blank date can create a false record. Write the blank rule into the prompt and into each test case, so the prompt, the test set and the consuming system agree on what missing means.

Keep the format rules in both the prompt and the test harness. A rule that exists only in the prompt is easy to forget when the output schema changes, and a rule that exists only in the harness does not guide the model’s wording.

Decide the failure behavior before the first test

Every prompt meets inputs it cannot handle: a message in another language, a record with a missing field, or a question outside the task. The team should decide the response to each case in advance. A model left without instructions picks a response on its own, and different runs can pick different responses.

Three responses cover the usual options: return a fixed refusal code, return a partial answer with a flag, or route the item to a person. Choose one for each failure type and write it into the prompt as a plain rule. For example: “If the message is not in English, return the label needs-review and leave the remaining fields empty.”

Failure behavior also defines what counts as a defect. Without the rule, a reviewer may mark a careful refusal as a bug, or accept a confident guess that should have gone to a person. Logging these cases from the first test onward gives the team evidence for later changes. How to review those logs after launch is covered in AI observability and human oversight.

Name the owner, the reviewer and the sign-off rule

A task without a sign-off stays open. Before drafting, name the person who owns the outcome, the person who reviews outputs, and the person who decides a version is ready for use. In a small team one person may hold more than one of these roles, but the roles should still be written down.

  • Owner: decides what the task is and changes it through a recorded decision.
  • Reviewer: scores test results against the expected output shape.
  • Approver: accepts or rejects each prompt version for use.

Disagreement between these roles is cheaper to resolve before the prompt exists. Once a prompt is in use, every change turns into a question about whether it is an improvement or a shift in what the feature is for.

For help planning this work, see AI and ML services.

Build the test set and the stop rule together

The last decision before drafting is what success looks like and when the team will stop. Writing the test set and the stop rule at the same time keeps both honest. If the test set is written after the prompt, the team tends to choose examples the prompt already handles, and the test passes for reasons that may not hold in production.

  • Collect real examples that cover each input type and each failure type.
  • Write the expected output for each example before running the prompt.
  • Set a pass threshold for each field rather than one overall score.
  • Name the date or result count that triggers a review of whether to continue.

A small set is enough to start. The method for choosing examples and labeling them is set out in building a small evaluation set for AI answers. The rules for pausing or ending the whole pilot are covered in stop criteria for an AI pilot.

Change the prompt through review, not by editing in place

Once the four decisions are written, a prompt change should follow the same path as the original decisions. Editing the live text without a record makes it impossible to say why the output changed.

  1. Propose the change in one sentence and name the field it affects.
  2. Run the full test set, not only the cases that failed.
  3. Compare results field by field against the previous version.
  4. Record the version number, the reason for the change and the approver.

Running only the failing cases hides regressions. A change that fixes one label can break another, and the only way to see that is to run the whole set. The step feels slow, which is why teams skip it, and the record of earlier versions is what answers the question later about why a rule exists.

Questions about setting the task before the first prompt

Who should write the task statement?

The owner of the outcome should write it, and the person who will read the output should review it. The engineer who turns the statement into prompt wording can draft the phrasing, but the meaning belongs to the business. Disagreement surfaces more cheaply at this stage than after the feature is in use.

Does the team need the prompt written before the test set?

No. Writing examples first can expose unclear inputs early. The examples still need to be checked against the task statement so they test the same job the prompt will do. Fix the expected outputs before anyone runs the prompt against them.

How long should the four decisions take?

The time depends on how many people must agree and how many input sources exist. A narrow classifier with one data source can often settle in a single working session. A feature with several sources and consequences for customers needs more time, and that extra time usually goes into the inputs rather than the wording.

What if the owner changes the task during testing?

Treat the change as a new task. Update the statement, record the date, and rerun the full test set against the new target. Results from the old task cannot be compared with results from the new one, and mixing the two is a common reason a pilot appears to improve when it has not.

Can a prompt be tested before the input sources are confirmed?

Yes, against sample inputs. The result applies only to those samples, so record the test as provisional. Run it again once the input sources are confirmed, including any field that may contain personal or confidential details.

Should failure rules sit in the prompt or in code?

Both can carry part of the load. Checks on output format, such as field counts or allowed values, are often easier to enforce in code. Judgment calls about unclear wording belong in the prompt. Whichever layer holds a rule, the test set should check it, so the prompt and the code cannot drift apart without anyone noticing.