Data for AI foundations
By the end of this module you will be able to:
- Explain why the quality ceiling of an AI system is set mostly by its data
- Explain an embedding as meaning represented as position in space, without algebra
- Define AI-ready data and name the UK government guidance that carries the test
- Explain what a feature store serves and the failure it exists to prevent
- State what the Model Context Protocol standardises and what it deliberately leaves alone
Meaning becomes position, so the nearest points answer the query
The query is a point like any other, and the ring around it holds remittance and refund while contract and outage report fall outside, so retrieval returns documents that share a meaning rather than documents that share a word.
An embedding turns text into a position, so meaning becomes distance. A query lands as its own point, and the documents nearest to it are the answer, which is why retrieval over embeddings finds related wording that a keyword match would walk straight past.
A dataset earns AI-ready by passing four gates in order
AI-ready is a property you can audit, not a label you can claim: a dataset drops through four gates on structure, documentation, licensing and provenance, and anything that fails detours to remediation, so no route to the exit skips a check.
AI-ready is a property you can audit, not a label you can claim. A dataset earns it by passing four gates in order, structure, documentation, licensing and provenance, and anything that fails a gate is remediated and re-checked before it moves on.
An AI programme rarely stalls on the model. It stalls at the moment somebody asks which dataset the system is reading, who is permitted to see it, what the fields actually mean, and when the copy in front of the model was last refreshed. Those are data management questions with long-established answers, and they arrive in a new order because a language model will answer confidently whether or not anyone has answered them. Five ideas carry most of the weight in that conversation: the data-quality ceiling, the embedding, the readiness test, the feature store, and the connector standard.
Model choice is a decision a team makes in an afternoon. The condition of the data a model reads is the accumulation of every collection, naming and permission decision the organisation has ever made, which is why it dominates the result.
31.1 Why AI quality is mostly data quality
A model is a function fitted to examples. Whatever pattern is present in those examples is what the model learns, including the patterns nobody intended it to learn: the sampling bias in how cases were recorded, the field that was left blank for six months after a system migration, the duplicate customer records that make one person look like four. Swapping a larger model into that setting does not remove the pattern. It reproduces the pattern more fluently.
So the work that changes a disappointing system is usually work on the examples: fixing labels, removing duplicates, filling documented gaps, and narrowing the task until the available data can support it. That order of operations is the argument of Andrew Ng’s Machine Learning Yearning, which sets out how to diagnose the errors in a machine learning system and prioritise the most promising direction for a project rather than iterate on the model and hope.
The definition of quality that survives contact with AI work is not a score out of ten. It is fitness for the use in front of you. The Government Data Quality Framework puts the question in a form that a delivery team can actually answer.
“At a high-level, data quality can be thought of as 'fitness for purpose'”
The Government Data Quality Framework (GOV.UK) - Why do we need a data quality framework?
The framework finishes that sentence with the test itself: is this data set good enough for what I want to use it for? Quality is therefore relative to a stated use rather than absolute. That matters for AI because a dataset can be entirely adequate for a monthly management report and unusable as training or retrieval material, where the model will treat every recorded value as evidence and has no way to notice that a column stopped being populated.
The you already know carry across, but their weighting changes. Completeness matters more, because a model cannot tell a missing value from a meaningful zero unless someone encoded the difference. Timeliness matters more, because an AI assistant is usually asked about the present. Consistency matters more, because two spellings of the same supplier become two suppliers in the eyes of the system. And a dimension that barely registers in reporting work, licensing, becomes decisive, because using material you are not permitted to use is not a quality defect that shows up in a dashboard.
There is a second reason the data side dominates, and it is structural rather than statistical. A model is retrained rarely and behaves the same way between retrainings. The data underneath it changes continuously, because source systems are upgraded, teams start populating a field they used to leave blank, a supplier changes how it codes a product, and a migration silently truncates a text column. An AI system is therefore a stable component sitting on a moving foundation, and almost all the observed variation in its behaviour over a year comes from the foundation. Monitoring the model without monitoring the inputs measures the part that is not moving.
Where the system is regulated, the obligations become explicit. gives the international series for data quality in analytics and machine learning, and gives the management system standard that puts an auditable process around AI. In the European Union, the AI Act sets data governance duties for high-risk systems specifically.
“Training, validation and testing data sets shall be relevant, sufficiently representative, and to the best extent possible, free of errors and complete in view of the intended purpose.”
Regulation (EU) 2024/1689 (EU AI Act) - Article 10(3), Data and data governance
Read the scope before the sentence. Article 10 applies to high-risk AI systems, not to every model an organisation builds, and Article 10(2) frames the duty as data governance and management practices appropriate for the intended purpose. The obligation is therefore evidential: a provider has to be able to show what was in the training set and why it was judged representative, which is impossible without curation records kept at the time.
Common misconception
“Our assistant gives poor answers, so we need a better model.”
Before changing the model, sample fifty poor answers and classify the cause of each. Four categories are worth ruling out first, and all of them are data: the source document was out of date, the field the answer depended on was never populated, two systems disagreed and nobody had decided which was authoritative, or the material the question needed was never in scope. Count them before spending a budget, because a better model makes those same answers more persuasive without making them more correct.
Quality decides what a system can know. The embedding decides how it finds anything at all, and it is the one piece of mathematics an analyst genuinely needs a picture of.
31.2 An embedding is a position, and position carries meaning
A is a list of numbers that places a piece of text at a point in a space. The property that makes it useful is arranged during training: material about the same subject lands close together, and material about different subjects lands far apart. Nothing about the words is preserved directly. What is preserved is the neighbourhood.
The map above draws the idea at a scale you can see. Three tinted regions hold invoices, contracts and support tickets. A query is embedded by exactly the same process as the documents, so it becomes a point on the same plane, and the answer to the query is simply the set of points nearest to it. A search about a remittance concern lands inside the invoice region, and the dashed neighbourhood ring around it holds two chips, remittance and refund. Everything else falls outside the ring, and that includes the invoice chip itself as well as all of the contract and ticket material, which is the part worth pausing on: distance is measured from the query, not from the region the query happens to sit in, so belonging to a cluster is no guarantee of being returned by it. No keyword was matched either. The system found related wording by asking a distance question.
That is the whole trick, and it explains the behaviour analysts notice first: a search for staff turnover returns a document that says attrition, because attrition sits near turnover in the space even though the two strings share no characters. It also explains the failure that surprises people. A search for a part number or a surname can miss, because a rare code carries little of the contextual signal that positioned it, and the nearest neighbours of a code are often other codes rather than the document you wanted.
Three practical consequences follow, and each of them has bitten a delivery team. First, the diagram draws two axes and a real space has hundreds, so intuitions built from the picture about clusters being neatly separable do not transfer. Second, vectors produced by one model cannot be compared with vectors produced by another. They are positions in different spaces, and mixing them returns nonsense that looks like a working result. Third, changing the embedding model means re-embedding the entire corpus, which is a cost and an outage to plan for rather than a configuration change.
A is simply a store that holds these positions and answers nearest-neighbour questions over them. What makes one choice better than another is a retrieval question rather than a representation question: how the index is built, whether its recall has been measured, and where the store sits relative to the access controls on the material it copied.
Embedding a dataset does not make it usable. Someone still has to establish that the organisation is allowed to use the material, knows what its fields mean, and can say where each record came from.
31.3 What AI-ready data means, and the UK guidance that gives it content
is a readiness test applied to a specific dataset for a specific intended use. It is not a category of data and not a file format. The phrase is often used loosely, so it is worth naming the document that gives it content in a UK public sector setting: the Government Digital Service and the Department for Science, Innovation and Technology published guidelines and best practices for making government datasets ready for AI on 19 January 2026.
That guidance carries a definition it takes from the Open Data Institute framework for AI-ready data, and the modal verb in it is doing real work. A dataset may be considered AI-ready when it addresses four components. It should be technically optimised, meaning structured and formatted for efficient use by machine learning systems and interoperability with AI tools. It should meet overall quality and adherence to standards, meaning accurate, complete, consistent and maintained through effective processes. It should be legally and regulatorily compliant, meaning aligned with applicable laws and regulations. And it should be responsibly managed, meaning managed ethically and securely throughout its lifecycle. Addressing the four is what makes readiness arguable for a stated use. It does not certify the dataset, and nothing in the guidance issues a badge.
The guidance then organises its own material around four foundations that overlap that list without matching it: technical optimisation; data and metadata quality; organisation and infrastructure context; and legal, security and ethical compliance. The third of those is the one summaries tend to lose, and it is the least technical. It is the organisational and infrastructure setting a dataset sits in, including the governance resources and working practices around it, which is to say whether anyone is funded and accountable to keep the dataset in the state the other components describe. A dataset can satisfy every technical test and still have nobody whose job it is to keep it that way next quarter.
The gate board above is not either of those lists. It is a reviewer’s working sequence: four questions that can be put to a candidate dataset in order, each with a visible answer. Are the records typed and readable. Does each field carry a recorded meaning. Does the licence allow this use. Can each record be traced back to a source. Structure is the practical face of technical optimisation and licensing is the practical face of legal compliance, but the other two gates are narrower than the components they serve. Documentation is one piece of evidence about quality, and provenance is one piece of evidence about responsible management. A dataset can clear all four gates and still fall short of the wider components, which is why the board is a triage instrument rather than a certification. The board draws both routes out of every gate, because the useful behaviour is not rejection but remediation: a dataset that fails on documentation gets its field definitions published and then re-enters the lane above the next gate rather than being waved through on the strength of having passed the first one.
Two of those gates hold reviews up, and neither is technical. Licensing questions surface material acquired years ago under terms nobody recorded, and the honest answer is sometimes that the source has to be dropped. Provenance questions surface datasets assembled by a person who has since left. The work of becoming AI-ready is therefore mostly documentation and permissions work, and that work lands on the data team rather than the modelling team.
At national scale, the same readiness problem is what the programme is intended to address for UK public sector data, by arranging the sharing infrastructure that lets data be found and reused safely while keeping public confidence in how it is used.
Common misconception
“Our data is in Parquet with a schema, so it is AI-ready.”
Technical optimisation is one of the four components and usually the easiest to satisfy. A well-formed Parquet file whose columns are named c1 to c40, whose licence terms are unknown, and whose rows cannot be traced to a source leaves the other three unaddressed, so the condition for calling it AI-ready is not met. Readiness is argued against a stated intended use and evidenced, not asserted from a file format.
Readiness is judged once for a dataset. The harder problem is keeping a definition stable between the moment a model is trained and the moment it is asked to predict.
31.4 What a feature store serves
A feature is a single input value a model reads: the number of orders a customer placed in the last ninety days, the average time between a meter reading and its submission, the count of failed logins in the past hour. Each one is the output of a calculation over raw data, and each calculation embeds decisions about windows, filters and how to treat missing values.
A is the shared store for those values. It serves two audiences from one definition. An offline store holds the historical record used to assemble , so a training set can be built as of a past date. An online store holds a low-latency copy for live prediction, so a service can fetch the same feature in milliseconds while a request is waiting. Feast, one open source feature store among several, describes exactly this split, and describes the point-in-time correctness it generates as the way to avoid data leakage rather than debug error-prone joining logic by hand.
The failure it exists to prevent has a name. is the gap that opens when the feature values a model learned from are not computed the same way as the values it is handed in production. It is common because the two calculations are usually written twice, once in a notebook against a warehouse table and once in application code against a live API, by different people months apart. The notebook counted orders over the last ninety days including today. The service counts over ninety days excluding today. Nothing errors. Every dashboard stays green. Accuracy simply degrades, because the model is now seeing inputs it never learned from.
The other property a feature store is bought for is time travel. Building an honest training set means asking what was known on the day each example occurred, not what is known now. If a customer later cancelled, their record today carries a cancellation the model would not have been able to see at prediction time, and training on it produces a system that looks excellent in evaluation and useless in production. Point-in-time joins are fiddly to write correctly and easy to get subtly wrong, which is a large part of why teams stop writing them by hand.
This is the same problem that a solves for business metrics, arriving in machine learning clothing: one definition, computed once, reused everywhere. A team without a feature store is not necessarily wrong, but it does need another way to guarantee that the two computations agree, and a on the feature definition is the usual substitute.
Features are values a model is handed. The remaining question is how a model reaches systems it was never wired into, which is the problem the Model Context Protocol was written for.
31.5 What MCP standardises
The is an open standard for connecting AI applications to outside systems: data sources such as files and databases, tools such as search or calculation services, and workflows. Its own documentation offers the analogy of a USB-C port for AI applications, and the analogy is precise about what is being standardised. A port settles the shape of the connection so that any conforming device can be plugged in. It says nothing about what the device is for or whether you should trust it.
Before a standard connector existed, every pairing of assistant and system needed bespoke integration work, so the number of integrations grew as the product of the two counts rather than their sum. That arithmetic is the economic argument for standardising the interface. The architectural argument matters more to a data professional. Once an assistant can reach a system through a standard connector, the thing that decides whether its answers are correct is no longer the integration. It is the access controls on the system behind the connector and the shared definitions that say what the returned fields mean.
The limits are where organisations get into trouble, and they are narrow enough to list. MCP standardises the interface. It does not confer permission, does not check whether the caller is entitled to the rows returned, does not reconcile two systems that define active customer differently, and does not create for the answers it enables. Those remain governance responsibilities that sit with the systems being connected, and connecting an ungoverned system through a standard interface simply makes it easier to reach.
Common misconception
“We connected our warehouse over MCP, so the assistant now gives governed answers.”
A connector is transport. If the warehouse exposes three tables that each define revenue differently, the assistant will pick one and answer with conviction. If the connection runs under a service account with broad read access, the assistant can surface rows the asker is not entitled to see. Row-level security, an agreed metric definition and an audit trail of what was read are what make the answer governed; the protocol only makes the request possible.
A team indexes its policy library with one embedding model, then upgrades to a newer model for incoming documents only, leaving the existing vectors in place. Search quality falls sharply. What is the most likely explanation?
A department holds a well-formed, fully documented dataset with a declared schema and recorded sources, but nobody can establish under what terms it was originally acquired. Against the GOV.UK guidance on AI-ready data, what is the position?
A churn model performed well in evaluation and has drifted downwards in production over three months. Feature values are computed in a notebook for training and re-implemented in the prediction service. No errors are logged and every pipeline is green. What should be checked first?
Core distinctions
- A model reproduces whatever pattern is in its data, so the quality ceiling of an AI system is set by collection, naming and permission decisions made long before anyone chose a model. Quality here means fitness for the stated use, as the Government Data Quality Framework defines it.
- An embedding places text at a point in a space so that similar meaning sits nearby, which turns search into a distance question. Vectors from different models are not comparable, and changing the embedding model requires re-embedding the whole corpus.
- AI-ready data is a readiness test on a specific dataset for a specific use. The GOV.UK guidance published on 19 January 2026 carries the Open Data Institute definition: a dataset may be considered AI-ready when it addresses technical optimisation, overall quality and adherence to standards, legal and regulatory compliance, and responsible management. The guidance organises its own foundations slightly differently and adds organisation and infrastructure context.
- A feature store serves one feature definition to two consumers, an offline store for building training sets and an online store for live prediction, which is how training-serving skew is prevented rather than detected.
- The Model Context Protocol standardises how an AI application connects to external systems. It does not grant permission, reconcile conflicting definitions or create lineage, so governance stays with the systems behind the connector.
Standards and sources cited in this module
Guidelines and best practices for making government datasets ready for AI (GDS and DSIT)
Foundations of AI-ready datasets
The UK government guidance that gives the phrase AI-ready its content, published 19 January 2026. It carries the Open Data Institute definition of the four components and sets out its own four foundations, including organisation and infrastructure context.
Machine Learning Yearning (Andrew Ng)
Diagnosing errors and prioritising project direction
Practitioner source for diagnosing the errors in a machine learning system and prioritising the most promising direction rather than iterating on the model at random.
The Government Data Quality Framework (GOV.UK)
Defining data quality as fitness for purpose
Sets quality relative to a stated use rather than as an absolute score, which is the framing that survives contact with AI work.
Regulation (EU) 2024/1689, the EU AI Act
Article 10, Data and data governance
Sets data governance and data set quality duties for high-risk AI systems, including relevance, representativeness and completeness in view of the intended purpose.
ISO/IEC 42001:2023, Artificial Intelligence Management Systems
Management system requirements
The auditable management system standard for organisations running AI, sitting alongside the ISO/IEC 5259 series on data quality for analytics and machine learning.
Model Context Protocol Specification
What is MCP
Primary source for what the protocol standardises, including the USB-C analogy and the scope of connections to data sources, tools and workflows.
Introduction and quickstart
An open source feature store describing the offline and online store split, and point-in-time correct feature sets as the way to avoid data leakage into a training set.
Module 31 of 52 · Data and AI