Cultivated AI|INEMA.CLUB-PRO

Lesson 6 · 17 min

Closing the loop: failure log and observability

What isn't observed isn't cultivated. This lesson follows a clinic front-desk agent from its first error to supervised autonomy, and shows the minimum you need to record to replace "I think it got better" with "it improved from 88% to 95%".

Start the lesson
Clinic receptionist checks the appointment schedule on the screen next to an open notebook.

In this lesson you will

  1. 1How an error becomes a permanent rule
  2. 2Comparing agent versions with numbers
  3. 3Minimum observability: three fields
  4. 4Finding the error pattern worth fixing first

Goal: record each run with the minimum set of fields and turn a real error into a new rule, comparing the result before and after.

01The clinic case, in six stages

Scroll to follow along. The numbers are from the case described in the project.

Scroll the page: each step below lights up its part of the diagram.

  1. 1/7

    Starting environment

    Doctors and specialties, each doctor's hours, procedures and duration, clinic rules, and access to the schedule. The agent only suggests; the receptionist approves each appointment.

  2. 2/7

    First failure

    The agent books 7:30 PM with a doctor who doesn't see patients after 6 PM. The schedule showed "free," but a free schedule slot is not an available doctor. The failure is logged with date, decision, result, and root cause.

  3. 3/7

    New rule

    "Before suggesting, check the schedule AND the doctor's working hours. Outside working hours, never, even if the schedule shows free." Takes effect from the next run onward.

  4. 4/7

    Evaluation

    Of the next 20 interactions, 18 were correct. The 2 failures become two more rules: the procedure's duration must fit in the time slot, and 15 minutes between appointments.

  5. 5/7

    Stabilization

    40 interactions in two weeks: 20/20 in each, zero corrections from the receptionist, response time from 4 minutes to 45 seconds.

  6. 6/7

    Autonomy

    With the history, the agent starts confirming on its own. The human gets a daily report and reviews only what the agent flagged as an exception: cutoff time, new patient, long procedure.

  7. 7/7

    After 2 months

    Rules: from 5 generic ones to 14 born from real failures. 320 runs logged, 7 failures documented, 97.8% accuracy, version v1.0 → v1.4. The model is the same as on day one; if the clinic switches models, the garden stays.

02The difference between two versions

What observability shows (project example, 100 runs in each version).

1. v1.0 · 88%

Three error patterns: outside the professional's hours (5), time slot too short for the procedure (4), and an ambiguous reply about cancellation (3).

Each pattern produced a new rule: four rules modified.

03Run log

Start with the three fields. The full version comes when the volume calls for it.

EXECUCOES.md · minimum viable
| date | what was asked | what was delivered | did it work? (yes / no / partly) |
|---|---|---|---|
|  |  |  |  |
EXECUCOES.md · full
| date | agent version | goal | decision made | tool used | time | cost | result | error | human intervention | rating (correct / partial / wrong) | fix applied |
|---|---|---|---|---|---|---|---|---|---|---|---|
|  |  |  |  |  |  |  |  |  |  |  |  |
From failure to rule (log template)
## Failure <date>
What happened: 
Decision the agent made: 
Root cause (missing context, rule, example, or tool?): 
Smallest possible fix: 
New rule (exact text that went into the file): 
Agent version: v1.0 → v1.1
How I'll know it worked: next 20 runs, count the hits

04Practice

One week of observation.

1 · One week of logging

5 min a day

For the function you chose, log every run in EXECUCOES.md with the three minimum fields.

Done when: the file has at least 10 rows and you can state the week's accuracy rate (e.g., 8 out of 10).

2 · A rule born from an error

20 min

Take the failure that repeated most during the week and fill in the "from failure to rule" template. Put the rule in the file and bump the version.

Done when: the rule is written in the agent's file, the version went up (v1.0 → v1.1), and the next runs are being counted so you can compare.

05Quick quiz

4 questions.

Question 1 of 4

The calendar showed the time slot as free and the agent booked outside the doctor's working hours. What was the root cause?

06Summary

Error becomes ruleA log with the root cause, the smallest fix, the rule in the file, and a new version.
Compare versionsSame scenarios, before and after: 88% → 95% without changing the model.
Start with three fieldsRequest, delivery, did it work. That already closes the first cycle.

Going further

Previous lessonNext lesson