The pathUnit 2 · Why reliability is hardLesson 5 of 12

Context engineering

Context engineering is the practice of building and governing the context an analytics agent reads before it answers. That context is the schemas, metric definitions, business rules, documentation, and tools that tell the agent how your company actually works. Get it right and the agent’s answers are correct and repeatable. Skip it and the agent guesses.

This is nao’s core idea. The model supplies the language skill. The context supplies the truth. A model that does not know your business will write SQL that runs and still returns the wrong number.

How it differs from prompt engineering

Prompt engineering is about wording a single request well. You tweak the instruction until the model gives a better reply. It helps, but it lives in one message and does not scale to a whole company’s data.

Context engineering is structural. Instead of cramming knowledge into a prompt, you build a durable layer the agent reads every time.

  • Schemas. What tables and columns exist, and what they actually contain.
  • Metrics. The one true definition of revenue, active users, churn, and the rest.
  • Business rules. Refunds are excluded, this segment is internal, that table is deprecated.
  • Documentation. Notes on how the business works that a new analyst would need.
  • Tools. Functions the agent can call, like running a query or looking up a definition.

Why it is the part that matters

Most analytics agents fail on context, not on the model. If the metric layer is missing, the agent invents its own version of revenue. If the docs are stale, it answers from old rules. The SQL is rarely the problem. The knowledge behind it is.

Context engineering also keeps the data team in control. The team owns the context, so they decide what correct means and can check the agent’s work against it. In nao this context is a file-system-like structure the team builds with the nao-core CLI and version controls like code.

The next lesson covers one piece of this in depth, the semantic layer, which is where metrics get a single shared definition.