Sign in or create a free account to continue.

GCP-112 · Lesson 5 of 12 · 18 min

Data readiness for generative AI

▶ Video coming soon A video version of this lesson is on the way.

The store policy assistant scored well on value and badly on data in lesson 1, and in September Jules finds out exactly how badly. Ravi Menon, the data and analytics lead, and Jules collect every document that store staff use to answer policy questions. They find three versions of the returns policy, one on the intranet, one in a binder in most stores and one in an old email attachment that several store managers still forward to new staff. The versions disagree on how long customers have to return worn footwear. A model grounded on all three would sometimes give one answer and sometimes another, and it would cite a source each time. "Grounding does not fix bad documents," Ravi says. "It makes them more convincing." This lesson is about getting data ready for generative AI.

Why data readiness matters even more for generative AI

Generative AI systems use data in three ways, and each brings its own readiness questions. Model builders use enormous datasets to train foundation models; most organizations never do this, but they inherit the strengths and gaps of that training. Organizations may use their own examples to tune a model, which needs clean, representative, correctly labelled examples. And most commonly, organizations use their documents and records to ground answers at the moment a question is asked. For grounding, the documents themselves become the facts the system states to users, so their quality shows directly in every answer.

The good news is that generative AI can use data that older systems could not, such as policy manuals, product images, call notes and emails. The challenge is that this unstructured data has rarely been managed as carefully as the structured data in databases.

Structured, unstructured, labelled and unlabelled data

Leaders need to recognize the main kinds of data a project will use, because each needs different preparation.

Kinds of data and Birchline examples.
Kind of dataWhat it isBirchline examples
StructuredOrganized in fixed fields, such as rows and columnsProduct catalogue fields; order records; store opening hours
Semi-structuredHas some organization, such as tags or keys, but flexible contentSupplier spec sheets in a standard template; JSON order events
UnstructuredFree-form content without a fixed schemaPolicy manuals; customer emails; product photos; call notes
LabelledExamples paired with a correct answer or category500 past customer emails each tagged with the right team
UnlabelledExamples without an attached answerA year of customer reviews with no categories

Labelled data is especially valuable and expensive, because someone must decide each label. Birchline's 500 tagged emails took two supervisors three weeks. Those labels will be used to measure the email assistant's accuracy before launch, which is often a better use of a modest labelled set than training on it.

Dimensions of data quality

Ravi uses a short checklist of data quality dimensions, which match the factors Google's materials name for generative AI data. For each candidate data source, the team asks the questions in the table and records the answers before the source is connected to any model.

Data quality dimensions applied to the policy assistant.
DimensionQuestion to askBirchline policy documents
AccuracyIs the content correct?One version of the returns policy was wrong
CompletenessIs anything missing that users will ask about?No policy at all for rental equipment returns
ConsistencyDo sources agree with each other?Three versions disagreed on worn footwear
RelevanceDoes the source address the task, or add noise?Old promotional flyers mixed in with policies
TimelinessIs it current, and will it stay current?The binder version was two years old
AccessibilityCan the system reach it, in a usable format?Some policies existed only as scanned images
PermissionIs this data allowed to be used for this purpose, by these users?A manager-only discipline policy must not reach all staff
CostWhat will it cost to prepare and maintain?Two weeks of editing to merge and approve the manuals
Eight labelled segments arranged around a central circle reading Data ready for AI: Accuracy, Completeness, Consistency, Relevance, Timeliness, Accessibility, Permission and Cost.
A data source is ready when it passes every dimension, not just accuracy.

The permission dimension deserves special attention. A grounded assistant can only be as careful as its access controls. If the document store contains a manager-only discipline policy and the assistant searches everything for everyone, a store associate could receive an answer quoting it. Grounding systems should respect the same permissions as the documents themselves, so each user only retrieves what they could already open. Lesson 7 returns to this as a security issue.

Preparing unstructured data

Preparing documents for grounding is mostly ordinary information management, done more deliberately than before.

  • Choose a single source of truth. Retire duplicate and outdated copies, or mark them clearly as archived and exclude them from search.
  • Assign owners. Every policy has a named owner responsible for its accuracy and review date. Birchline's returns policy belongs to the customer service director.
  • Add metadata. Title, owner, effective date, review date, audience and region help retrieval and help users judge an answer. A Quebec store needs the version that reflects provincial rules, which metadata can mark.
  • Fix formats. Scanned images are converted to text with optical character recognition and checked; tables are kept as tables; headings are kept so passages make sense on their own.
  • Split sensibly. Long documents are divided into passages, often called chunks, for retrieval. Splitting at headings keeps each passage meaningful.
  • Remove what should not be there. Personal information, draft notes and confidential sections that are not needed for the task are removed or excluded.

Birchline's customer service director merges the three returns policies into one approved document in two weeks, and the store binders are replaced. Only then can the policy assistant pilot begin; it is planned for February 2027. Jules records the two weeks as part of the pilot's cost, as lesson 2 recommended.

Python Example
# A readiness check over a small inventory of documents.
from datetime import date
today = date(2026, 11, 12)
docs = [
    {"name": "Returns policy (approved)", "owner": "CS director", "reviewed": date(2026, 11, 2), "dup": False, "audience": "all staff"},
    {"name": "Returns policy (binder)",   "owner": None,          "reviewed": date(2024, 9, 1),  "dup": True,  "audience": "all staff"},
    {"name": "Discipline procedure",      "owner": "HR",          "reviewed": date(2026, 3, 15), "dup": False, "audience": "managers"},
    {"name": "Gift card terms",           "owner": "Finance",     "reviewed": date(2025, 6, 30), "dup": False, "audience": "all staff"},
]
for d in docs:
    issues = []
    if d["owner"] is None: issues.append("no owner")
    if d["dup"]: issues.append("duplicate")
    if (today - d["reviewed"]).days > 365: issues.append("review overdue")
    if d["audience"] != "all staff": issues.append("restrict to " + d["audience"])
    print(f"{d['name']:<28} {', '.join(issues) or 'ready'}")
Output
Returns policy (approved)    ready
Returns policy (binder)      no owner, duplicate, review overdue
Discipline procedure         restrict to managers
Gift card terms              review overdue

What this code does

Each document in a small inventory is checked before it is used to ground an AI assistant. The program flags documents with no owner, duplicates, reviews more than a year old and documents meant only for managers. Only the approved returns policy is ready to use as it stands.

The output gives Ravi a work list: retire the binder copy, review the gift card terms, and make sure the discipline procedure is only retrievable by managers. A simple inventory like this, kept current, is the foundation of every grounded assistant.

Preparing structured data

Structured data is usually in better shape, but generative AI exposes problems that dashboards hid. When the product description pilot pulled catalogue fields, it found that 140 products had their weight recorded in grams and 60 in kilograms in the same field, and that some colour names were internal codes such as "BLK-02". A human reading a spreadsheet knows what that means; a model writing customer-facing text might print it. Ravi's team standardizes units, adds plain colour names, and adds automated checks to the catalogue so new entries cannot break the rules again.

For agents that read live systems, such as the future order-status assistant, structured data readiness also means reliable interfaces: well-documented APIs that return clear fields, with error messages the agent can understand. GCP-111 describes how agents use tools such as APIs and data stores.

Data governance and lineage

Data governance is the set of roles, policies and processes that decide who owns data, who may use it, for what, and how its quality is maintained. Generative AI makes governance more visible because answers now quote the data directly. Birchline's governance for AI-ready data has a few simple rules.

  • Every data source used by an AI system is listed in a register with its owner, purpose, permissions and review date.
  • Lineage is recorded: which documents and fields a system can draw on, so that when an answer is wrong the team can trace which source caused it.
  • Changes to a source used for grounding follow the same approval as publishing the document, because a change will immediately change what the assistant says.
  • Customer personal information is used only when the use case needs it, in line with privacy law and Birchline's privacy notice, which lesson 7 covers.

Ravi points out that Birchline already had most of these habits for its finance data in BigQuery. The work is extending them to documents and to the new uses.

Fairness starts with data

Data choices also shape fairness. If the 200 approved example descriptions used for few-shot prompting all describe women's products with words like "flattering" and men's products with words like "rugged", the model will copy that pattern. Birchline's editors review the example set for balanced language, and the review digest pilot checks that reviews in French and English are both included, so that the digest for a Quebec store is not built only from English reviews. Lesson 8 covers fairness more broadly; the point here is that many fairness problems are data problems first.

Keeping data ready after launch

Data readiness is not a one-time project. Documents change, owners move to new jobs and new sources appear. Birchline builds three habits into normal work so that the policy assistant stays accurate after launch. First, every policy has a review date in its metadata, and the owner receives a reminder a month before it falls due; overdue documents are flagged in the assistant's answers until they are reviewed. Second, publishing a new or changed policy follows the same approval as before, and the approved version replaces the old one in the grounding collection automatically, so there is never a gap between what the intranet says and what the assistant says. Third, the questions staff ask the assistant are reviewed each month for topics with no good source, which become requests to the relevant owner to write or update a document.

That third habit turns the assistant into a way of discovering gaps in the organization's knowledge. While building the evaluation questions, the team found that 38 of the questions store managers submitted were about rental equipment returns, for which no policy existed. The customer service director has agreed to write one before the pilot starts. Ravi points out that this is a benefit the business case never counted: the assistant improves the documents it depends on.

Checking readiness with a simple score

For each data source proposed for a new use case, Ravi's team now records a quick readiness rating from 1 to 5 on each dimension, and any source scoring below 3 on accuracy, consistency or permission is not connected until it is fixed. The rating takes minutes, and it makes the data conversation part of every use-case brief from lesson 1 instead of a surprise halfway through a pilot.

Worked problem

Is this source ready?

A team wants to ground a staff assistant on a shared drive folder of 1,200 files. A sample of 50 files shows 9 duplicates, 7 files over three years old, and 4 containing customer phone numbers. Estimate how many files in the whole folder might have each problem.

Show solution
  1. The sample is 50 of 1,200 files, so scale by 1,200 ÷ 50 = 24.
  2. Duplicates: 9 × 24 = 216.
  3. Old files: 7 × 24 = 168.
  4. Files with phone numbers: 4 × 24 = 96.

Answer: Roughly 216 duplicates, 168 old files and 96 files with personal data. The folder is not ready; it needs clean-up and exclusions first.

Common mistakes

  • MistakeGrounding on every document in a shared drive.

    InsteadCurate a single source of truth with owners, review dates and the right permissions.

  • MistakeAssuming grounding fixes inaccurate documents.

    InsteadGrounding repeats what the documents say, so fix the documents first.

  • MistakeIgnoring permissions when building a search index.

    InsteadMake retrieval respect each user's existing access rights.

  • MistakeLeaving data preparation out of the project plan.

    InsteadBudget the time to merge, clean, tag and approve sources.

  • MistakeUsing a skewed example set.

    InsteadReview examples and sources for balanced language and coverage.

Summary and key terms

  • Generative AI uses data to train, tune and, most often, ground answers, and grounded answers repeat whatever the documents say.
  • Recognize structured, semi-structured and unstructured data, and labelled and unlabelled examples; labelled sets are valuable for evaluation.
  • Check each source for accuracy, completeness, consistency, relevance, timeliness, accessibility, permission and cost.
  • Prepare unstructured data by choosing a single source of truth, assigning owners, adding metadata, fixing formats, splitting sensibly and removing what should not be there.
  • Standardize structured fields and provide reliable APIs for agents.
  • Data governance and lineage record who owns each source and which systems use it, and many fairness problems begin with the data.
Structured data
Data organized in fixed fields, such as database tables.
Unstructured data
Free-form content such as documents, emails, images and audio.
Labelled data
Examples paired with a correct answer or category.
Data quality dimension
An aspect of quality such as accuracy, completeness, consistency or timeliness.
Single source of truth
One approved version of information that all systems and people use.
Metadata
Information about a document, such as owner, date, audience and region.
Chunk
A passage of a longer document prepared for retrieval.
Data governance
Roles, policies and processes for owning, using and maintaining data.
Lineage
A record of which sources a system uses and how data flows into its outputs.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Why did the policy assistant wait two weeks before its pilot?

    Show answer

    The three conflicting returns policies had to be merged into one approved document first.

  2. What problem does the permission dimension prevent?

    Show answer

    Users receiving answers quoting documents they are not allowed to see.

  3. Give one structured data problem the description pilot found.

    Show answer

    Weights in mixed units, or colour codes such as BLK-02 instead of plain names.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz