Skip to main content
DoneThat

AI Adoption GuideSupportResolve

Code and config snippet generation

An LLM produces a config or code patch for technical tickets, grounded in the customer's stack and product documentation.

Support processIntakeTriageAssignInvestigateResolveConfirmClose

By Don, DoneThat’s AI coach · updated

A snippet is an instruction the customer will run in production

Technical tickets usually end with the customer changing something on their side. The support engineer sends a config block, a code patch, or a command to run. A model can draft that block from the ticket and the product documentation. The output is text the customer pastes into a system nobody at the vendor can see. That is the whole risk in one line. The reply carries the vendor's authority into someone else's production environment.

The draft is not a diagnosis, and it is not a promise that the change is safe. It assumes the cause is already settled. When the cause is still open, a snippet does real damage, because it looks like an answer. Cause work belongs upstream, in a structured diagnosis with its evidence attached. A snippet generated on a guess will be applied on a guess.

Two kinds of snippet come out of support, and they carry different weight. One is illustrative: an example of the shape of a valid config. The other is specific: a patch written against this customer's actual values. The second kind is far more useful and far easier to get wrong. Label which one the reply contains. A customer who mistakes an example for a patch will paste placeholder values into production.

Ground the snippet in the customer's version, not the current docs

Before drafting, the model needs three things the ticket rarely contains. The customer's product version and release channel. The relevant part of their current configuration. And the documentation that matches that version, not the latest published page. Missing any of the three, the correct output is a request for it. Silence beats a snippet built on assumed defaults, because assumed defaults are where most bad patches begin.

Documentation drift is the most common source of wrong snippets. Published docs describe the current release. Many customers are running a build from a year ago. A parameter renamed since then will be generated with its new name and rejected by their system. Index the documentation by version and retrieve only the matching set. If no version is recorded on the account, ask before generating anything.

Customer configuration is sensitive, and it often arrives as an attachment. Decide up front what the model may read and what gets stripped. Keys, tokens, and connection strings should never enter the prompt or the log. Redaction belongs where attachments are parsed into structured fields, before the drafting step sees anything. A snippet that echoes a customer secret back into a ticket has created a second incident.

Generate from a known-good template, then show the diff

The reliable pattern is not free composition. Keep a library of working configurations, one per supported integration and version. Every entry in it should be a config that a real deployment runs. The model starts from the closest template and edits it with the customer's values. Free-form generation invents parameters. Template editing cannot, because every key already exists in a file that works.

Show the change as a diff, not as a wall of finished config. The customer needs to see which lines move and which stay. A diff also makes review practical, since a reviewer can scan four changed lines in seconds. Full replacement blocks hide the edits a model made in passing. Those quiet edits are the ones that break something unrelated a week later.

Every snippet needs three companions: what it changes, how to test it, and how to roll it back. The rollback line is the one people cut for length. It should name the exact previous value, taken from the configuration on file. Test steps should run in a staging environment first. When the customer has no staging environment, say so in the reply and slow the change down.

Patch a broken attribute mapping at a single sign-on vendor

Nothing in this example is real. A vendor sells single sign-on to business software companies. A customer's IT admin reports a problem with new employees. They can all log in, but every one of them lands in the default group. Group membership is supposed to come from a directory attribute. The ticket includes a redacted metadata file and the tenant version, 4.2.

Retrieval pulls the 4.2 mapping template and two resolved tickets with the same symptom. Those precedents come from a search over past resolutions and their fixes. The model compares the customer's metadata against the template. One attribute name is singular where the product expects the plural form. A second line points at a claim the directory does not send at all. The draft fixes the first and raises the second as a question.

The output is a six-line diff and three sentences of explanation. It names the file, the two changed lines, and the previous values for rollback. It states that the change takes effect at the next login, not immediately. The support engineer reads it, deletes a comment referring to a 4.4 feature, and sends it. The customer applies the diff in a test tenant before touching the live one.

Snippets that read well and fail on the customer's system

Invented parameters are the classic failure. A model asked for a setting that does not exist will produce one that sounds right. Validate every generated key against the schema for that version before the reply is drafted. A key that fails validation should block the send, not just lower a confidence score. This check is mechanical, and it catches most of the damage on its own.

Correct syntax aimed at the wrong problem is harder to catch. The snippet parses, applies cleanly, and changes nothing the customer cares about. That happens when the diagnosis was thin and the model filled the gap with a common fix. Reading the attached logs properly, through a ranked summary tied to line numbers, narrows the target. A patch aimed at the wrong subsystem still costs the customer a maintenance window.

Scale and environment get ignored. A configuration that works on a small deployment can be wrong at ten times the load. The model does not know the customer's traffic, cluster size, or upstream proxies. State those assumptions in the reply, in plain words. A snippet with its assumptions written out is a snippet a customer can argue with. That argument is much cheaper before the change than after it.

The engineer who sends the snippet owns what it does

No snippet reaches a customer without a named engineer reading it first. This is the firm line at this step. The agent may draft, validate, and format. It may not send. A generated patch carries the vendor's authority, and the customer will assume it was tested. Somebody has to have actually looked at it, and that reviewer's name belongs in the ticket record.

Applying the change is a separate permission again. Some vendors can write configuration into a customer tenant directly. Where that is possible, applying a generated patch should require the customer's written go-ahead. Convenience is not consent. A change the vendor made is a change the vendor answers for at the next outage. Keep the record of who asked for it and when.

After the change, confirmation is not the customer saying thanks. It is the failing operation running clean, which is what a verification run against the account is for. Snippets that solve a recurring problem should also leave the ticket behind. Turning a repeated fix into public help content is a documentation step at close. Until that happens, the same patch gets rewritten by hand every week.

Is this worth automating for you?

Whether this pays back depends on how much time it takes your team today. Most teams estimate that from memory, and the estimate is usually wrong in one direction or the other.

DoneThat reconstructs where the time actually went, with no timers to forget, so you can measure the baseline before committing to a project and check the gain afterward.

Measure the baseline first