Quick summary

  • A working agent needs more than a model and a tool loop. Retrieval, enforced data permissions and explicit evaluation boundaries turn a promising demo into a system a team can reason about.
  • Separating these responsibilities makes failures easier to diagnose and prevents prompt changes from becoming an accidental substitute for access control.
  • Choose one read-only workflow and define its evidence contract, caller permissions and failure tests before adding more tools.

What happened

An agent answers a business question correctly in a demo, then gives a different answer when a second employee asks it. The model may not be the problem. The two callers may have different data access, different context or a different definition of the metric.

A useful harness makes those differences explicit. Think of it as the execution contract around the model: what information enters, which actions are permitted, how work resumes and what counts as an acceptable result.

Give context a budget and a provenance trail

LangChain's retrieval guidance identifies inefficient searching, excessive context and stale material as distinct problems. Increasing the context window does not decide which evidence deserves attention.

A practical design is to retrieve a compact set of relevant records and preserve links to the full material. Record where a business definition came from and when it was updated. This is an architectural recommendation, not a claim that every task needs a vector database.

Put business meaning beside enforceable permissions

In the EDB Postgres AI and AgentCore example, business definitions sit near the data while database roles and row-level security enforce access. The important separation is between explaining a column to a model and authorizing the caller to read it.

For a proposed sales assistant, define whether revenue means booked, invoiced or collected revenue. Then test the same request under two different caller identities. A correct answer must respect both the metric definition and the caller's visibility; a convincing explanation cannot compensate for unauthorized rows.

Make the evaluation contract executable

AWS's decision-model evaluation walkthrough combines deterministic checks with model-based evaluation. Treat the evaluator itself as software that needs validation rather than assuming a numeric score proves correctness.

  • Use known inputs to test whether missing evidence produces an explicit limitation.
  • Check permission denials separately from tool outages.
  • Require human review for consequential write operations.
  • Record the model, tool and data-definition versions used in a run.

Start with a single read-only question that has a known answer. Expand the harness only when the team can explain why a failed run failed. That boundary is more useful than adding another tool to an opaque demo.

Sources

Why developers should care

Separating these responsibilities makes failures easier to diagnose and prevents prompt changes from becoming an accidental substitute for access control.

  1. 1Choose one read-only workflow and define its evidence contract, caller permissions and failure tests before adding more tools.