Skip to main content
Haichuang Global Haichuang Global Technology Services for Global Chinese Businesses
AI 4 November 2026 7 min read

How Do You Keep AI Output Auditable in AI Application Development?

Auditable AI output is a delivery artefact, not a model property. Each stage of an AI application development project should leave behind a record that a reviewer, auditor or regulator can inspect without reading the source code.

Auditable AI output is produced by the delivery process, not by the model. You get it when each stage of an AI application development project leaves a written artefact that a reviewer can inspect without reading code. Judge a vendor on three things: whether they name the artefact for every stage, whether that artefact includes a test set you can rerun, and whether the production logs record the prompt, model version and retrieved sources for each answer.

Where does AI actually help a small business?

AI helps a small business where a person currently reads a document, decides a category and types the result into another system. The gain comes from removing the retyping step, not from replacing the decision.

Common starting points are invoice and purchase order extraction, support ticket triage, and first-draft replies to routine customer email. In each case the AI proposes a value and a human confirms it. If a wrong answer would cost money, the citation column decides the purchase, because a value without a source page cannot be checked quickly.

AI in back office operations is usually a better first project than a customer-facing chatbot. The volume is predictable, the output can be compared against an existing manual process, and errors are caught before they reach a customer. A customer-facing feature adds brand risk to the same technical work.

Our own AI application development work starts from an existing system and adds one bounded feature to it. You can see the shape of that engagement on our AI application development service page.

How do you integrate an LLM into an existing system?

You integrate an LLM into an existing system by putting a service layer between your application and the model API, so that the rest of your software never calls the model directly. That layer holds the prompt template, the retrieval step, the output schema and the log.

The delivery order matters. We fix the output schema first, then the retrieval source, then the prompt, and only then choose a model. Changing the model last is cheap; changing the output schema after the UI is built is not.

  1. Define the output as a structured record (field names, types, allowed values) rather than free text.
  2. Identify the source documents or database rows the model may read, and store their identifiers.
  3. Write the prompt template and version it in the repository alongside the code.
  4. Wrap the model call in a service that validates the output against the schema before returning it.
  5. Log every request: input hash, prompt version, model name and version, retrieved source IDs, output, and validation result.

The client controls the source documents and the business rules for what counts as correct. The delivery team controls the service layer, the schema and the logging. If the client cannot supply twenty to fifty representative examples with known correct answers, the accuracy stage cannot start, and the project stalls at the point where it should be tested.

Which artefact should each delivery stage produce?

Each delivery stage should produce one document or file that the next stage depends on and that an auditor can read later. The table below is the sequence we use for custom AI solutions for business systems.

Stage Artefact produced What it lets a reviewer check
Scope Feature brief with the decision the AI supports and the human confirmation step Whether the AI is doing a bounded task or an open-ended one
Data Source register listing each document type, field and owner Whether the input is stable enough to test against
Design Output schema and prompt template, both versioned Whether the output can be validated automatically
Build Service-layer code with logging fields defined Whether every answer records model version and sources
Evaluation Test set with expected outputs and a scored run Whether AI feature accuracy meets the agreed threshold
Launch Runbook covering model change, cost alert and rollback Whether the feature can be operated without the original team

The evaluation artefact is the one buyers most often skip and most often need. It is a file of inputs and expected outputs that can be rerun whenever the model or prompt changes. If the test set cannot be rerun by someone other than the developer who wrote it, it is documentation, not a test.

For teams building this next to a customer-facing system, the same logging pattern applies; our AI customer service development work uses the same service-layer structure when a reply must be traceable to a source article.

How do you know if an AI feature is accurate enough?

An AI feature is accurate enough when its error rate on a test set you supplied is below the rate at which a human reviewer can catch and correct the errors. The threshold is set per field, not per model.

For AI document processing, a common split is to require exact matches on identifiers such as invoice numbers and tax codes, and to allow a human review step on free-text descriptions. The acceptable error rate depends on the cost of a wrong value: a mis-keyed line item on a purchase order approval step costs more than a mis-tagged support ticket.

Measure accuracy on the fields the business uses, not on an overall score. A model that returns the right supplier name and the wrong amount is not 90% accurate in any useful sense. Report accuracy per field, and treat any field below the agreed threshold as a blocking defect rather than a known issue.

Accuracy also drifts when the input changes. If a supplier changes its invoice layout, the extraction rate on that supplier falls, so the evaluation set should be refreshed when the source register changes. The client owns that trigger; the delivery team owns the rerun.

How much does it cost to run an AI feature in production?

Running cost is driven by tokens processed per request, request volume, and the number of retries caused by failed validation. It is not a fixed monthly figure, and any vendor who quotes one without your volume is guessing.

AI API cost control comes from three levers: sending only the relevant pages to the model rather than the whole document, caching repeated lookups, and rejecting invalid output before a second call. Each lever is a design decision made in the service layer, not a setting on the model.

Set a cost alert per feature before launch, expressed as a daily token budget. If a single request exceeds the token budget defined in the feature brief, the service should reject it and log the input rather than send it. That rule stops one malformed document from consuming a week of budget.

The client controls volume and document size; the delivery team controls what is sent to the model and how retries are handled. Both sides need to see the same log to settle a cost question. Our wider software development practice uses the same logging and alerting conventions for non-AI features.

What should the audit log contain?

An audit log for an AI feature should record, for every request, the input identifier, the prompt version, the model name and version, the retrieved source identifiers, the raw output, the validation result and the final value shown to the user.

This is what makes AI output auditable months later. Without the model version and the source identifiers, a reviewer cannot tell whether an answer was wrong at the time or became wrong after a document was updated.

  • Input identifier and a hash of the input, so the exact document can be recovered.
  • Prompt template version and model name with version string.
  • Source document IDs or database row keys used for retrieval.
  • Raw model output before validation, plus the validation result.
  • The value finally written to the business system, and the user who confirmed it.

Retention is a client decision, because it depends on your jurisdiction and your contract terms. If your regulator requires records for a set period, that period belongs in the feature brief before build starts, because it changes storage design and cost.

For buyers comparing delivery partners, the useful test is to ask for the artefact list and the log fields before signing. If the answer is a model name rather than a document, the audit trail will be reconstructed after the fact. More questions of this kind are answered on our FAQ page.

Frequently asked questions

Where does AI actually help a small business?

AI helps most where a person reads a document, picks a category and retypes the result into another system. Invoice extraction, ticket triage and first-draft replies are common starting points because the output can be checked against an existing manual process. A customer-facing chatbot is usually a harder first project because errors reach the customer directly.

How do you integrate an LLM into an existing system?

Put a service layer between your application and the model API, and let that layer hold the prompt template, retrieval step, output schema and log. The rest of your software then calls the service, not the model. This keeps model changes and prompt changes out of your core application code.

How much does it cost to run an AI feature in production?

Running cost depends on tokens per request, request volume and retries caused by failed validation, so no single figure applies across businesses. Cost control comes from sending only relevant pages, caching repeated lookups and rejecting invalid output before a second call. Set a daily token budget per feature and alert on it.

How do you know if an AI feature is accurate enough?

Measure accuracy per field on a test set the client supplied, and compare the error rate with the rate at which a human reviewer can catch and correct errors. Identifiers such as invoice numbers usually need exact matches, while free-text fields can tolerate a review step. Any field below the agreed threshold should block launch.

What should an audit log for AI output contain?

It should record the input identifier, prompt version, model name and version, retrieved source identifiers, raw output, validation result and the final value written to the business system. These fields let a reviewer reconstruct why an answer appeared months later. Retention period is a client decision that should be set before build starts.

FAQ

Questions we are asked

Where does AI actually help a small business?

AI helps most where a person reads a document, picks a category and retypes the result into another system. Invoice extraction, ticket triage and first-draft replies are common starting points because the output can be checked against an existing manual process. A customer-facing chatbot is usually a harder first project because errors reach the customer directly.

How do you integrate an LLM into an existing system?

Put a service layer between your application and the model API, and let that layer hold the prompt template, retrieval step, output schema and log. The rest of your software then calls the service, not the model. This keeps model changes and prompt changes out of your core application code.

How much does it cost to run an AI feature in production?

Running cost depends on tokens per request, request volume and retries caused by failed validation, so no single figure applies across businesses. Cost control comes from sending only relevant pages, caching repeated lookups and rejecting invalid output before a second call. Set a daily token budget per feature and alert on it.

How do you know if an AI feature is accurate enough?

Measure accuracy per field on a test set the client supplied, and compare the error rate with the rate at which a human reviewer can catch and correct errors. Identifiers such as invoice numbers usually need exact matches, while free-text fields can tolerate a review step. Any field below the agreed threshold should block launch.

What should an audit log for AI output contain?

It should record the input identifier, prompt version, model name and version, retrieved source identifiers, raw output, validation result and the final value written to the business system. These fields let a reviewer reconstruct why an answer appeared months later. Retention period is a client decision that should be set before build starts.

DIRECT CONTACT

Talk to us directly

Scan a code and start a conversation. We usually reply within minutes during working hours. Two WhatsApp numbers are available, and WeChat works just as well.

WeChat QR code for Alan

WeChat

Alan

+86 173 6006 2006

Scan the code inside WeChat to add us as a contact.

Replies Monday to Saturday, 09:00–21:00 (UTC+8)