DEV Community

Finley Zhu
Finley Zhu

Posted on

Workshop: Ledger Prompt, Host, and Route in an 85-Minute Lab

A free model lab turns noisy when the prompt, the host, and the route all change inside one hour. This eighty-five minute workshop pins those three lanes before the room starts debating answer quality. Students leave with a ledger they can rerun on the next day, even if the public terms page changed overnight. The ledger shows which lane moved, and it refuses to treat a remembered allowance as if it were evidence.

Why a class needs the ledger first

Hosted model classes often mix three unstable inputs and then grade the resulting text as one event. A prompt edit, a server image change, and a route swap can each alter the output on their own. When those events share one timestamp, the class cannot tell which event deserves the next repair. The ledger separates those events so the following edit has one named owner instead of three suspects.

The workshop assumes one small group, one frozen prompt, and one candidate open-source host for the hour. It does not assume a private cluster, a paid API key, or a published scoreboard of model names. It also does not assume that yesterday's quota sentence is still printed on the project page. Every numeric claim about access must be copied from the page the facilitator opens during class.

What the facilitator may claim

Two availability claims are operator-supplied for this session: free model access, and a free server option. Disclosure: This article was prepared as part of MonkeyCode's product outreach. MonkeyCode enters the lab as the open-source candidate the operator asked the class to inspect, not as a measured winner. The inspection is a documentation check plus a rerunnable row, not a bake-off against unnamed rivals.

Write no token count, hardware shape, or expiry date into the slides from an old memory. In the first ten minutes, open the current project documentation and paste only the sentences that page shows today. If the page is silent on a quota, leave the quota field blank rather than filling it from a blog post. A blank field is a valid result, and it keeps the later comparison from leaning on a stale number.

How the eighty-five minutes are split

  1. Minutes 0 to 10 cover the live terms paste and a hard ban on recalled quotas.
  2. Minutes 10 to 25 freeze the prompt fixture, hash the file, and store that hash.
  3. Minutes 25 to 40 stamp the server fingerprint and place it beside the prompt hash.
  4. Minutes 40 to 60 send one route call, or record an explicit skip when no key exists.
  5. Minutes 60 to 75 compare two ledger rows and name the single lane that moved.
  6. Minutes 75 to 85 write the limitation note and decide whether a second route is allowed.

Lane rules the room must keep

Lane A holds the prompt only

Lane A stores the task text, the input text, and a content hash of both fields together. Students may not improve the wording after that hash has already been written into the ledger. A clearer prompt becomes a new fixture id, not a silent edit of the first file. This rule stops the class from hiding a prompt change inside a host comparison.

Lane B holds the server only

Lane B stores the operating system name, the Python version, and a short hash of that pair. It does not store a story about how fast the machine felt during the exercise. If two students produce different fingerprints, they must not share one result row. A free server option, when the live page still offers one, is only another fingerprint source.

Lane C holds the route only

Lane C stores the route name, the call time, and the hash of the returned text. It does not store a quality score, a preference vote, or a claimed cost winner. If the call never left the laptop, the route name stays unset and the note explains why. An empty call is valid evidence that the lab stopped before anyone invented an output.

A worked skeleton students can rerun

The script below is a proposed lab skeleton, not an executed benchmark and not a product trial. It prints a schema row before any network call, so the class can review fields while the terms page is open. Replace each placeholder with a sentence you copied, and do not invent a quota when the page is quiet. The sample row uses an empty output on purpose, which keeps the first run offline.

# Proposed lab skeleton. Not an executed benchmark.
# Fill LIVE_TERMS from the documentation page opened in class.

from datetime import datetime, timezone
import hashlib
import json
import platform

LIVE_TERMS = {
    "source": "paste the documentation URL opened in class",
    "free_model_access": None,
    "free_server_option": None,
    "quota_text": "",
    "captured_at": datetime.now(timezone.utc).isoformat(),
}

FIXTURE = {
    "id": "fx-ledger-01",
    "task": "Rewrite the function comment in one sentence. Do not add features.",
    "input": "def add(a, b):\n    return a + b\n",
}

def fingerprint():
    raw = "|".join(
        [platform.system(), platform.release(), platform.python_version()]
    )
    digest = hashlib.sha256(raw.encode()).hexdigest()[:12]
    return {"host": raw, "sha256_12": digest}

def ledger_row(route_name, output_text, note):
    fixture_bytes = json.dumps(FIXTURE, sort_keys=True).encode()
    return {
        "fixture_id": FIXTURE["id"],
        "fixture_sha256": hashlib.sha256(fixture_bytes).hexdigest(),
        "route": route_name,
        "terms": LIVE_TERMS,
        "server": fingerprint(),
        "output_sha256": hashlib.sha256(output_text.encode()).hexdigest(),
        "output_chars": len(output_text),
        "note": note,
    }

if __name__ == "__main__":
    sample = ledger_row(
        "unset",
        "",
        "no call yet; row exists so the schema can be reviewed",
    )
    print(json.dumps(sample, indent=2))
Enter fullscreen mode Exit fullscreen mode

Save the skeleton as ledger.py, then run the three review commands before any live call. The first command proves that the schema prints without a network call. The second command checks that the printed JSON is well formed. The third command hashes the script so a later edit is visible in the notes.

python3 ledger.py > row0.json
python3 -m json.tool row0.json >/dev/null && echo "json ok"
python3 - <<'PY'
import hashlib
from pathlib import Path
print(hashlib.sha256(Path("ledger.py").read_bytes()).hexdigest())
PY
Enter fullscreen mode Exit fullscreen mode

Read two rows without building a scoreboard

Use the table when two students disagree about a result they both just produced. The table names one lane, and it names the only edit that lane allows. It does not name a better model, because this packet never collected a fair paired sample. Treat a void row as data about the lab design, not as a failure of the host.

What changed between the rows Lane that owns the change Edit that is allowed next
Prompt hash differs Lane A Keep the new fixture id and drop the comparison
Server hash differs Lane B Rerun both rows on one pinned host
Route name differs Lane C Record both names and do not retune the prompt
Quota sentence differs Terms paste Keep both pastes and do not average them
Terms fields are empty Evidence gap Stop scoring until the live paste exists
Output hash matches No quality claim Log stability only, not correctness

A matching output hash means the text stayed stable under that fixture and that host. It does not mean the comment was good, short, or safe enough to merge. Correctness still needs a human check, or a separate test this workshop does not replace. Say that limit every time a student treats a stable hash as a grade.

Four exercises with clocks attached

Exercise 1 freezes Lane A

Give the group fifteen minutes and one function that already returns the right value. The task line must forbid new features, so the model is not invited to refactor the file. Students hash the fixture and write that hash into the ledger before they discuss wording. If someone wants a clearer task, they create fx-ledger-02 and leave the first hash untouched.

Exercise 2 stamps Lane B

Give the group ten minutes to run the fingerprint function on the machine they will use. If the live documentation still shows a free server option, one pair may stamp that host instead. They still paste the terms sentence beside the fingerprint before they call anything. A fingerprint without a terms paste is incomplete, even when the process list looks familiar.

Exercise 3 attempts Lane C once

Give the group twenty minutes for a single call, or for a written skip with a reason. The skip is the right outcome when the page no longer shows free model access, or when no key exists. Students store the output hash, the character count, and a note of twenty words or fewer. They must not retry until the output looks smarter, because unmarked retries destroy the ledger.

Exercise 4 names the lane that moved

Give the group fifteen minutes to compare one row with a neighbor using the table above. They must name the single lane that moved, and they must name the edit that lane allows. If more than one lane moved, the comparison is void and the pair schedules a cleaner rerun. The facilitator counts void comparisons, because that count is the only class metric this workshop defines.

Limits that belong in the closing note

This ledger cannot price a vendor, size a fleet, or predict an allowance for next month. It cannot prove that an open-source host is faster, cheaper, or safer than some other host. It cannot repair a bad task, and it cannot bless output that merely stayed stable across two runs. Facilitators should read those limits aloud near the end, so notes do not grow a claim the rows cannot carry.

The class metric is the count of void comparisons, not a satisfaction score and not a latency trophy. A high void count means the room changed too many lanes, which is a teaching result rather than a product result. A low void count means the pins held for this hour, which is also not a quality prize. Either number is local to this room, this fixture, and this calendar date.

Who should skip this workshop

  • Procurement teams that need a signed benchmark should not file these rows as a vendor bid.
  • Anyone holding production secrets should not place those secrets inside the fixture text.
  • A class that cannot open the current documentation should wait, rather than teach from an old slide.
  • Readers who want a ranked list of model names will not find one, because no list was verified for this date.
  • Groups that need medical, legal, or financial advice from a model should choose a different exercise.

After the clock stops

If the page you opened still shows free model access and a free server option, point Lane C there. Keep the same fixture id, and do not retune the task while you try that documented project. If that page does not show those options, leave the product name out of the results file. Finish the ledger on a host you already control, and keep the rerunnable row as the souvenir.

Top comments (0)