LLM-assisted repair becomes more dependable not by adding layers for their own sake, but by addressing specific failure modes: unclear instructions, missing or stale information, absent runtime capabilities, unproductive retries, and checks that approve different code. A duration parser makes the progression concrete: each layer adds a different control, and a workflow graph is useful only when coordination needs justify its extra state and maintenance.
The bug: removing a suffix is not parsing a unit
Consider this intentionally broken Python function:
As an Amazon Associate I earn from qualifying purchases.
def parse_duration(value: str) -> float:
return float(value.strip().rstrip("ms"))
rstrip("ms") does not remove the exact suffix ms. It removes any trailing characters that belong to the set {"m", "s"}. So 250ms becomes 250, which is then interpreted as 250 seconds rather than 0.25 seconds. And stripping m from 2m discards the information needed to convert two minutes into 120 seconds.
The first engineering decision is to define what the function should accept and what it should do when input is invalid. For this example, choose the following application-specific contract:
#1 Best Overall
- Ideal for graphing, charts and engineering projects.
- 1-subject notebook. 100 double-sided, graph ruled sheets. 4 squares per inch.
- Sheets measure 8-1/2 in. x 11 in. when torn out. Overall notebook size is 11 in. x 9-3/4 in. Tough pockets help prevent tears and hold 8-1/2 in. x 11 in. loose sheets.
- High-grade paper fights ink bleed. Perforated pages for easy tear out. Front cover is water-resistant to help protect your notes all year.
- Spiral Lock wire helps prevent snags on clothes and backpacks. Made with SFI approved paper. Recyclable - remove reinforcement tape on pocket and recycle the rest.
- Accept a string with a non-negative integer or decimal number, immediately followed by
ms,s, orm. The number must match[0-9]+(?:.[0-9]+)?. - Ignore whitespace around the complete string; do not allow whitespace between the number and unit.
- Return seconds as a float:
250msbecomes0.25,1.5sbecomes1.5, and2mbecomes120.0. - Raise
TypeErrorfor non-string inputs, includingTrue, andValueErrorfor malformed strings.
Under this contract, 5ss, -1s, +1s, 1e3s, 2 m, 2M, .5s, and 5.s are invalid. These rules are choices for this function, not a universal standard for duration syntax.
Five engineering lenses, five different failure modes
| Lens | Failure it addresses | What it makes explicit |
|---|---|---|
| Prompt engineering | The request is unclear or underspecified. | Instructions, constraints, examples, and requested output. |
| Context engineering | The attempt lacks relevant current information. | The contract, source, scope, evidence, and unresolved work. |
| Harness engineering | The model lacks usable capabilities or verification. | Runtime tools, access boundaries, and actual execution. |
| Loop engineering | A failed candidate is retried without useful feedback or limits. | Concrete failures, retry bounds, and stop conditions. |
| Graph engineering | Work has dependencies, parallel checks, or handoffs to coordinate. | Permitted transitions and shared state across workflow steps. |
These labels overlap. They are useful questions for designing a repair process, not a requirement to buy or build five separate products.
Prompt engineering: specify the request against the contract
“Fix the timeout parser” gives a model a goal but leaves important decisions open. Should the result be seconds or milliseconds? Are negative values legal? Should 1e3s be accepted? What should happen for a boolean or a missing unit?
Rank #2
- 1 subject notebook comes with 100 graph ruled, double-sided sheets with 5 squares per inch
- Sheets measure 7-1/2" x 10-1/2" when torn out with an overall size of 8" x 10-1/2". Perforation easily tears out with clean edges.
- Graph ruling is ideal for plotting graphs, drawing curves and more. Notebook is 3-hole punched to store in your favorite binder.
- Covers are coated for durability and have writable label on front cover. Available in Black.
- Assembled in U.S.A. with U.S. and foreign parts
A stronger prompt states the contract, the permitted changes, compatibility requirements, and the expected response. For example, it can ask for a change to parse_duration that implements the grammar above, preserves the function’s seconds-based return value, raises the stated exceptions, and includes tests for both valid and invalid inputs. The examples illustrate the contract; they do not replace it.
Three successful examples can still leave a hole. A repair might pass 250ms, 1.5s, and 2m while also accepting 1e3s, which this contract rejects. OpenAI’s prompt-engineering guidance treats instruction design as part of the work and recommends evaluating behavior as prompts or model versions change. The practical test is not whether the answer sounds plausible, but whether the implementation satisfies the specified behavior.
Context engineering: preserve the current state, not just a summary
Prompt wording says what to do. Context engineering determines which information the attempt has available now. For this parser, a useful working context includes the agreed grammar, current implementation, allowed edit scope, and latest verification results.
Rank #3
- 1 subject notebook comes with 100 graph ruled, double-sided sheets with 5 squares per inch
- Sheets measure 7-1/2" x 10-1/2" when torn out with an overall size of 8" x 10-1/2". Perforation easily tears out with clean edges.
- Graph ruling is ideal for plotting graphs, drawing curves and more. Notebook is 3-hole punched to store in your favorite binder.
- Covers are coated for durability and have writable label on front cover. Available in Green.
- Assembled in U.S.A. with U.S. and foreign parts
If another attempt takes over, pass a compact record that identifies:
Free tools Windows power users keep installed
One-click scans. No signup required.
- The contract and the candidate version it applies to.
- Which files changed and what edits are permitted.
- Which verification commands actually ran, with their results.
- Unresolved failures and the remaining repair budget.
A generated handoff summary can omit details or turn a proposal into an apparent fact. Keep the underlying test output or other original evidence, and label claims such as “tests pass” as unverified unless they are tied to an execution result. Context also becomes stale: a test result for one candidate does not establish that a later edit still passes.
Harness engineering: connect tools to real capabilities
A harness is the runtime around the model: it can provide tools, route tool calls, limit file access, and run tests. The key distinction is between a capability that exists and evidence that it was used. A model’s statement that a test passed is not a test result if no test runner executed it.
Rank #4
- LASTS ALL YEAR. GUARANTEED!* Water resistant covers protect your notes all year.
- High-quality paper resists ink bleed** so notes stay clear and legible. Notebook has 100 graph ruled sheets, 4 squares per inch.
- Includes storage pocket to hold loose sheets from the notebook. Patented, reinforced storage pocket helps prevent tears.***
- Spiral Lock wire prevents coil snags so it won’t get caught on your clothes or backpack. The Neat Sheet perforated pages easily tear out with clean edges.
- Perforated sheets measure 11" x 8-1/2" when torn out. Overall size of 11" x 9 1/8". Available in Teal.
For this repair, a practical harness could give the agent access only to the relevant source and tests, and provide a test command that returns its real output and exit status. OpenAI’s harness-engineering article describes making capabilities and relevant system information legible to agents, and organizing work into smaller blocks such as design, code, review, and test. Whatever the setup, verification claims should trace to the tool’s actual execution rather than the wording of a prompt or a model response.
Loop engineering: turn failures into bounded feedback
Suppose a first repair converts units correctly but accepts 1e3s. The useful feedback is the specific failing input and the required outcome: this string must raise ValueError. “Try harder” supplies neither.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchA repair loop should send the current failure record back to the next attempt, then verify the new candidate. It also needs an end point. Set a retry limit and stop early if the same candidate and same failure recur; otherwise the process can spend calls repeating an unproductive attempt. A model’s self-review may suggest a correction, but it cannot substitute for running the external check.
Best Value
- SUNEE 1 SUBJECT NOTEBOOK: Single subject spiral notebook with 100 sheets/200 Pages of graph paper, you'll have plenty of space for notes and assignments. Get the best value with our graph paper notebook and stay organized.
- GRAPH NOTEBOOK: Each 8" x 10-1/2" grid notebook features 100 double-sided sheets with red margin lines and is 3-hole punched, easily transfer to your favorite binder. It's the ideal grid paper notebook for all your academic and professional needs.
- 3-HOLE PUNCHED DESIGN: Designed with 3-hole punched graph paper, this math notebook integrates seamlessly into standard binders; Perfect for who need to keep their notes organized in one place, notebook grid clutter in your study or work area.
- CLEAN TEAR-OUT: Micro-perforated pages ensure a neat tear-out, leaving you with 10 1/2" x 7 1/2" sheets. Accommodates double-sided writing. Sunee graph paper spiral notebook offers premium quality at an affordable price. A graphing notebook is perfect for students, teachers, and professionals.
- DURABLE & FUNCTIONAL DESIGN: Water-resistant plastic cover provides extra protection, making this spiral graph paper notebook ideal for on-the-go, frequent transfers in and out of backpacks, briefcases, and vehicles. The double-sided pockets are great for storing loose papers and handouts, making this one subject graph spiral notebook a practical choice for students and professionals.
Graph engineering: coordinate work around one candidate
Here, graph engineering means defining an executable workflow as nodes of work connected by permitted transitions. It does not mean a knowledge graph used to retrieve information, although retrieved information could be supplied to a node in an execution workflow.
One repair workflow can use six nodes:
implementcreates a candidate.verifyruns the tests against it.reviewevaluates it against the contract and allowed scope.joinchecks whether both results apply to the same candidate.repaircreates a revised candidate after a failure.humanpauses for a person to decide how to handle a blocked or unresolved case.
Verification and review can run concurrently if neither edits the candidate. The join is important: record a candidate fingerprint or version with each result, and accept the checks together only when both refer to that exact candidate. If repair changes the code, the previous approvals no longer apply. The revised candidate must be checked again.
The repair transition makes this graph cyclic, so it needs a retry limit and a route for stopping or escalating unresolved work. LangGraph is one framework for defining stateful, multi-step workflows; LangChain describes its nodes broadly enough to include deterministic code, a model call, a tool call, or an agent with its own internal loop. A graph therefore does not imply that every step needs to be an autonomous agent.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
When to add another layer
Start with the smallest setup that meets the requirements: a precise contract, appropriately scoped editing, and executable verification. Add a bounded repair loop when failures can be corrected usefully from concrete test feedback. Add graph orchestration when independent checks, branching decisions, or resumable handoffs create a coordination problem that a simple sequence does not handle well.
More orchestration also means more state to maintain, work to schedule, and failure paths to recover from. It can add model calls, latency, test work, and ongoing maintenance; no measured improvement in speed, cost, or reliability follows just from using a graph. A single agent can perform the same activities sequentially, and having several files or steps alone is not a reason to build a graph. Add complexity in response to an observed need, then check that the added coordination solves that need.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




