On this page
What is context engineering?
Prompt engineering was about the wording of one request. Context engineering covers everything around it: which documents to retrieve, which data to query, which tools to call and which instructions apply. Models have become capable enough that wrong answers usually trace back to missing or wrong context.
Prompt engineering
The wording of one request
Context engineering
Everything around it
Why does AI get enterprise data wrong?
When AI gets your data wrong, the model is rarely the problem. It can't find the right data, misreads what it finds, and doesn't know your rules.
It can't find the data. AI finds data through table names, column names, descriptions and sample values. If the same customer is
KUNNRin SAP,CustomerIDin your CRM andclient_noin a spreadsheet, it misses data that's right there.It misreads what it finds. A
statuscolumn holding 1 to 5, anamountwith no currency or VAT basis, or dates stored in two formats tell it nothing about meaning, so it guesses.It can't see your business logic. None of this is in the data: which of three revenue definitions finance uses, that intercompany sales are excluded, or that a supplier needs a valid VAT number.
It inherits the errors. Where the data breaks your rules, through duplicates, missing fields or values that conflict across systems, the AI repeats the mistake.
Key point
The answer it gives is consistent with everything it could see, but wrong for your business. Nothing it saw contradicts that answer, so neither the AI nor the user can tell.
Why is enterprise context so hard to get right?
Nobody designed this. Data estates grow one decision at a time, and each decision was reasonable when it was made.
- Step 1First system
1 way to count a customer
- Step 2Urgent need
2 ways to count a customer
- Step 3Acquisition
3 ways to count a customer
- Step 4Migration

4 ways to count a customer
- Systems get added for urgent needs, and each comes with its own definitions.
- Acquisitions bring their own ERPs, codes and definitions. The integration budget goes to keeping the business running, not to harmonising data.
- Migrations move the data but not its meaning. Old and new systems run side by side for years.
- The rules live in documents and people's heads. When people leave, the knowledge leaves with them.
- Data teams are small and stuck firefighting, so root-cause work never makes it to the top of the list.
Why don't prompts, RAG and catalogs close the gap?
Data teams know about this gap. They haven't closed it because capturing and agreeing on meaning by hand costs more than any team can afford, and the decisions still need people.
Manual work (workshops, spreadsheets, consultants) is accurate for a moment. It gives you a snapshot that goes out of date and rarely scales beyond one domain.
Catalogs and governance platforms store, govern and serve what people put into them. They assume someone fills them, and filling them is the hard part.
AI assistants and home-built RAG retrieve what's written down. They can't decide which version is right, they inherit the conflicts, and their answers can't be traced to an agreed definition.
What does context engineering take for enterprise data?
- 01
Map what you have. Find the metric definitions, business definitions, business rules and data-quality rules in your data and documents, and link each one to its source and the fields behind it. If you can't see it, you can't fix it.
- 02
Harmonize the definitions. Where the same concept is defined differently, agree on one version. The inputs are existing definitions, documents, regulations and patterns in the data. The owners decide, starting with the critical 20%.
- 03
Resolve what matters first. Check the data against the agreed rules, rank what breaks by business impact and effort, and fix it at the source step by step. Automation makes this realistic: in one Metagem POC, it surfaced 445 discrepancies in under six weeks and replaced more than 120 person-days of manual discovery.
- 04
Sync it to your AI. Give agents the agreed definitions, rules and metric calculations, with their source and approver, through MCP, and let them query your data on those definitions. Push the metric definitions to your BI tools as well, so dashboards and agents calculate the same way. Clean data still needs this, because it doesn't say which definition applies or what a code means.
- 05
Keep it current. New systems, acquisitions, documents and regulations change your context. Re-check on a schedule and whenever a source changes.
One Metagem POC
445
discrepancies surfaced
<6weeks
to surface them
120+person-days
of manual discovery replaced
Where do you start?
Start with one domain and one question the business keeps getting wrong answers to. Collect the definitions behind that question, find where they disagree, and get one owner to decide.
One question
How many active customers do we have?
Definitions
3 disagreeBought in the last 12 months
One owner
One definition
How Metagem helps
Metagem does the finding for you. It fills a ready-made model, which includes your semantic layer, from your documents and data, sends conflicts to the right owner, ranks data issues by business impact and effort, and serves the agreed context to your agents. When an agent asks a question, Metagem runs the query on the agreed definitions. You see the first results in two to three weeks.
Last updated October 2026.