Context engineering beats prompt engineering
Deterministic grounding before the model reasons: VistaGPT constrains every query to a verified schema so the model cannot invent tables.

There is a point in every serious LLM project where prompt engineering stops paying off. You have tried the polite phrasing, the few-shot examples, the “think step by step.” The output is better than it was, and still wrong often enough to be dangerous. The instinct is to write a longer prompt. The better move is to change what the model is reasoning over before it reasons at all.
We call this context engineering: deciding, deterministically, what evidence reaches the model, and refusing to let it invent the rest. The prompt is the last few percent. The context is the system.
Grounding before generation
VistaGPT answers plain-English questions about Viewpoint Vista, a twenty-year-old construction ERP with a treacherous schema: cryptic four-letter table names, composite join keys, soft-delete columns that silently drop rows. Point a general-purpose model at it and it hallucinates the schema often, returning confidently wrong SQL with no error to warn anyone.
No amount of prompt-craft fixes a model that does not know your schema. So the schema is not something VistaGPT asks the model to remember. Every engine reasons over a manifest of 19,249 verified schema entries covering every table, view, procedure and column in Vista. An object that is not in the manifest cannot appear in generated SQL.
You stop treating the model as the source of truth and start treating it as a reasoning step over a truth you have already established.
In the AgentSDK engine, the pipeline runs thirteen stages, and stages two through seven are six parallel deterministic lookups against a vector store with no LLM involved at all. Retrieval is where hallucination usually enters, so we took the LLM out of retrieval entirely.
A reconcile step, then a validator
Grounding the inputs is necessary but not the whole defence, because a model can still drift when it writes. So two deterministic stages sit between the model and the user.
| Stage | What it does | Model involved? |
|---|---|---|
| Reconcile | Drops any column, join or filter not verifiably in the knowledge base | No |
| Generate | Composes the SQL within the grounded bounds | Yes |
| Validate | Parses and verifies via sqlglot, up to two retries | No |
The order matters: ground the context, reconcile the plan, generate, then validate the result. Across internal development benchmarks, schema hallucination and column errors both dropped sharply — and none of it came from a cleverer prompt. (These are internal validation results; VistaGPT is in development and we have not published a production accuracy figure.)
Refuse rather than guess
The behaviour all of this produces is a system that would rather return nothing than return a confident invention. When the evidence is not there, VistaGPT refuses. For a finance team reading a number they will act on, refusal is the feature. A blank answer prompts a follow-up; a wrong answer that looks right prompts a bad decision.
If your LLM system is wrong too often, the reflex is to open the prompt file. Try opening the retrieval path instead. See the full grounding-and-refusal architecture in the VistaGPT case file, or reach us at cal.com/agentix-tech.

