Prompt Design for Contract Review
The contract review system was developed iteratively, starting from a small prototype that was shown in a demo and then reshaped through a debrief.
A Tool Built by Watching It Run
Most people picture a software project as a plan written in advance and then carried out step by step. The contract review system described in this module grew in a different way. It began as a small working version, was shown to the people who would use it, and was then reshaped by what those people noticed. Its development story is less about a finished design and more about a loop: build something, watch it run, learn from the reactions, and build again.
This article follows that story stage by stage. You will look at the first prototype, the feedback that came out of a demonstration, the prompt revisions and new output fields that followed, and the way the tool was eventually connected to the firm's existing systems. At each stage, the question to keep in mind is the same: what did the system look like, and what triggered the next change?
Tracing the First Prototype
The first version was deliberately modest. The source describes it as a prototype made of three Python files, put together over a single afternoon. Its job was not to be complete. Its job was to give the team something concrete enough to demonstrate, so that the questions that really matter could surface quickly.
The diagram below traces the progression at the level the source supports. Each arrow is a real step the source describes, and each box is the state the system was in afterward. Read it from left to right and notice what triggered each transition.
The debrief is the hinge of this progression. The source records a two-hour conversation after the demo, and that is where a library entry for the working version was written. The working version is referred to there as the slice. The debrief turned what the team observed into decisions about what to change next.
Notice that the later states are not separate products. The same system was modified in place. The later version still contained the earlier work, but it now did more, and each new capability was a response to something the team had learned.
The Build, Watch, Learn Loop
The source describes development as a loop rather than a sequence with an end point. The team builds something, observes it running in front of its intended audience, learns from the reactions, and builds again. Each pass through the loop starts from the system as it currently exists, not from a blank page.
The diagram shows the loop as three stages with a return arrow. The return arrow is the important part. Feedback is not a report that ends the project; it is the input that determines what the next build should do. The source describes this same cycle when it summarises the approach as build, watch, learn from reactions, and build again.
Feedback is only useful if it changes something specific. A debrief that produces general impressions but no concrete change has not completed the loop.
Turning Demo Patterns into Prompt Revisions
A prompt is the written instruction that guides the model's behavior on a task. In this system, changing the prompt changes how the tool reasons about a document.
During the demo, the deputy general counsel identified several patterns. The source names three. Each one describes a place where the system's behavior did not match what a careful lawyer would expect.
- A gap in how appendices were scanned
- An implicit auto-renewal in undated agreements that the system did not handle as expected
- A risk-grading heuristic for indemnity clauses
The source states that these patterns became prompt revisions during the following week. Revising a prompt is a lightweight kind of change. It alters how the system reasons about a document without requiring the surrounding code to be rebuilt. That is one reason an iterative team can respond to feedback quickly: the feedback can be turned into a changed instruction rather than a new program.
Confidence Fields and Human Review Effort
The output schema was extended to require a confidence field for each surfaced clause. Why would a firm want a number attached to each clause? The source answers directly: the firm used the confidence field to decide which memos to route to an associate for a faster review pass.
The confidence score did not decide whether a clause was correct. It helped decide where a human reviewer's time should go first.
This is a practical use of a signal that an iterative process can produce. The first version of the system had no such field. Once the team could see which clauses the system was less sure about, it could build a routing decision around that information. The feedback loop therefore did not only fix errors. It created a new capability the firm could act on.
Connecting the Review Tool to Existing Systems
A review tool that works only on its own is of limited use to a firm. Within a month of the first demo, the slice had grown into a workflow connected to the firm's existing infrastructure. Integration changed what the system was for. Before these connections existed, a reviewer had to move work in and out of the tool by hand. Once the review run was wired to incoming email and outgoing case records, the tool became one stage in an existing process rather than a separate place to visit.
Read the diagram from left to right. The source names four connection points: the firm's email, where contracts arrive; the review run, which produces a redline and memo; the case management system, where the memo is posted; and the assigned attorney, who is notified. The connections are ordered in that sequence. The source does not describe the internal mechanics of any single connection, so the diagram shows the hand-offs and their order, not how each one is implemented.
The source presents this integration as part of the same iterative growth that produced the confidence field, which is why the two topics belong together in one story. Each new connection came after the team had observed the tool running and understood what the surrounding process needed from it.
Worked Example: Applying the Loop to a New Pattern
Turning a hypothetical demo finding into a revision
Suppose a demo of a review tool shows that it reads the main body of agreements well but misses a termination notice period written in a schedule at the back of the document. Show how the iterative loop would handle this finding, using only the mechanisms the source describes.
- 1Observe the run
The finding comes from watching the system run during the demo, just as the deputy general counsel's patterns did in the source.
- 2Name the pattern
Describe the behavior precisely: the system does not scan this part of the document. The source's appendix-scanning gap is a similar kind of finding.
- 3Record it in the debrief
The debrief is where observations become decisions about what to change next. The finding is written down as a concrete item, not a general impression.
- 4Revise the prompt
Because the change concerns how the system reasons about a document, a prompt revision is the lightweight kind of change the source describes. The surrounding code does not have to be rebuilt for this step.
- 5Run again and check
The loop continues. The next demonstration or run shows whether the revised instruction now covers the schedule, and any new pattern feeds the next debrief.
The finding became a concrete prompt revision rather than a general complaint. The system was modified in place, and the cycle of build, watch, learn, and build again continued.
Misreadings of the Development Story
Common mistake Treating the first prototype as the finished design
Why it failsThe source says the first version was deliberately modest and that its job was not to be complete. It existed so the team could demonstrate something concrete and surface the important questions quickly.
Do this insteadRead the first version as a probe that generates feedback, not as a plan that the later versions merely implement.
Common mistake Assuming a later version replaced the earlier code
Why it failsThe source describes the same system being modified in place. The later version still contained the earlier work.
Do this insteadThink of each stage as an accumulation. New capabilities were added on top of what already existed.
Common mistake Reading the confidence score as a correctness verdict
Why it failsThe source states that the score did not decide whether a clause was correct. The firm used it to decide where a human reviewer's time should go first.
Do this insteadTreat the confidence field as a routing signal for review effort, not as proof that a clause is right or wrong.
Common mistake Assuming every change requires rebuilding the surrounding code
Why it failsThe source describes prompt revision as a lightweight change that alters how the system reasons about a document without requiring the surrounding code to be rebuilt.
Do this insteadRecognize that some feedback is addressed by changing instructions, which is why the team could respond quickly.
Common mistake Believing the debrief is optional commentary after the demo rather than the step that converts observations into decisions
Ordering the Development Story
What do you think happens?
After the two-hour debrief following the demo, what change does the source describe next?
Reveal answer
The debrief's patterns became prompt revisions made during the following week.
The source says the patterns identified in feedback, including the appendix-scanning gap, the implicit auto-renewal in undated agreements, and the indemnity risk-grading heuristic, became prompt revisions in the following week.
Without looking back, write the sequence of states the contract review system passed through, from the first prototype to the integrated workflow. For each step, name the event that triggered the change. Then check your answer against the timeline diagram in the tracing section.
Hints
- Start with the three Python files built in one afternoon.
- The demo was followed by a debrief, and the debrief is where the next decisions were made.
- The integrated workflow came within a month of the first demo, after the email, redline, case management, and attorney notification connections were built.
Key Takeaways
- The contract review system was developed iteratively: a small prototype was shown in a demo, and the debrief that followed turned observations into decisions about what to change next.
- Feedback changed the system in specific ways. Three demo patterns became prompt revisions in the following week, and prompt revisions are a lightweight change that does not require rebuilding the surrounding code.
- A confidence field was added to the output for each surfaced clause. The firm used it to decide which memos to route to an associate for a faster review pass, not to decide whether a clause was correct.
- Within a month of the first demo, the tool was connected to the firm's email, case management system, and assigned attorney, turning it from a separate place to visit into a stage in an existing process.