Skip to main content

Prepare enterprise data for AI — from source records to usable context

Data is ready for an AI use case when the right authorized records and documents can be supplied with the meaning, freshness and context that the task requires.

Read the right denominator before trusting the data

Meridian country profile shows 6% missing overall but 100 failures among 8,000 active accounts, or 1.25%.
Inspect
Start with country_code: 600 of 10,000 values are missing. The analysis below isolates active accounts.
Interpret
Only 100 missing values affect the 8,000 active accounts; 500 belong to inactive accounts outside the pilot.
Act
Hold the 100 affected active accounts. Use 7,900 eligible accounts only after the other readiness checks.
Product Profile recreation with synthetic data. Cohort cards, SQL and interpretation below the profile row are editorial analysis, not native Profile widgets.Open full-size visual ↗

Loading data into an index or passing a few generic null checks does not establish readiness. Prepare structured facts and unstructured knowledge separately, then test how the application brings them together.

“Garbage in, garbage out” becomes actionable when you can identify the failing population, its business consequence and the owner who can repair it. DataDios helps teams inspect source evidence, define and run supported quality rules, investigate change and test AI behavior. Source preparation, application retrieval and release approval remain explicit engineering and operating tasks.

Readiness depends on how AI will use the data​

AI approachPreparation emphasisEvidence before release
Training or fine-tuningPermitted training use, representative examples, label quality, deduplication and separation of training from evaluation dataDataset version, label review, split rationale and held-out evaluation results
Retrieval-augmented generation (RAG)Current authorized documents, usable extraction, source provenance and question-level retrievalCollection inventory, build state, permission checks and retrieved-context review
AI agents with toolsTrustworthy context plus bounded identities, allowed operations and handling of ambiguous requestsTool-access review, action tests, approval behavior and recovery procedure

These are recommended engineering controls, not three automatic DataDios pipelines. The worked example below uses retrieval and authorized data lookup; it does not require embedding every eligible account or training a new model. An agent that can change orders needs additional action controls beyond this answer-drafting pilot.

The worked example and its readiness contract​

Illustrative scenario, not a measured customer outcome. Meridian Supply is building a support assistant that drafts returns and order-status answers. PostgreSQL holds customer and order facts; Snowflake supports analytical reconciliation; SharePoint holds policies. The model must use the applicable policy and current account context, not infer eligibility from incomplete records or old policy text.

The team agrees a contract for the pilot's input view. The following is a specification to implement and verify in the customer's environment, not an automatically created DataDios object.

Contract elementExample requirementWhy it matters to an answer
PopulationActive accounts approved for the pilotInactive accounts are not silently treated as current customers
IdentityStable account and order keys; authorized account scopeSimilar names must not join unrelated customers
Required contextCountry for active accounts; order status; relevant date and product classPolicy applicability depends on more than fluent language
SemanticsDefined status meanings, date/time zone and currency unit“Dispatched” is not “delivered”; minor units are not whole currency units
FreshnessSource-specific cutoff and an agreed maximum ageA current policy cannot fix a stale order status
KnowledgeOwner-approved, applicable policy version with identifiable sourceA retrieved paragraph must have a known authority
ExceptionsMissing required context escalates instead of being guessedThe model must not invent a country or entitlement

1. Profile the population the AI will actually use​

Begin with the serving population, not an arbitrary table-wide percentage. Inspect Profile for supported sources in Data Explorer. Record the snapshot, sample size and provenance before interpreting nulls, distinct counts or tagged fields. If collection is missing, obtain evidence rather than treating an empty panel as a clean result.

Meridian's account table contains 10,000 records: 8,000 active and 2,000 inactive. Country is missing on 600 records, including 500 inactive accounts and 100 active accounts. The overall missing rate is 600 / 10,000 = 6%. The rate relevant to the pilot is 100 / 8,000 = 1.25%. Neither percentage alone tells the team what to release: country is required for each active account because it determines which returns policy applies.

The team excludes inactive accounts and holds the 100 active accounts with missing country from the pilot input. This leaves 7,900 eligible accounts, before any other checks. The support workflow escalates those excluded active accounts for correction. It does not silently drop them from business operations or guess country from an email address. Eligibility is not a direction to embed all 7,900 accounts: retrieve only the authorized facts required by the current request.

A concrete conditional-completeness check​

This read-only PostgreSQL example assumes an illustrative public.ai_pilot_accounts table with one row per unique account_id, text account_status values including ACTIVE, and a nullable text country_code. Adapt the schema and business condition before use; it is not a query against your production environment.

SELECT
COUNT(*) AS active_accounts,
COUNT(*) FILTER (
WHERE country_code IS NULL OR BTRIM(country_code) = ''
) AS active_accounts_missing_country
FROM public.ai_pilot_accounts
WHERE account_status = 'ACTIVE';

The illustrative result is 8000 and 100. A production check must also validate country against the owner's permitted values; a nonblank but invalid code passes this completeness check. Keep that validity rule separate so failure reasons remain actionable.

2. Turn the contract into targeted quality checks​

Choose checks that protect the answer's decision. For Meridian, a globally unique account key is not enough if orders join to a wrong account. Test relationships and business conditions as well as individual fields. Separate a rule's scope, condition, severity, owner and expected response to failure.

Failure to detectSuggested check designOperational response
Active account without countryRequired-country condition scoped to active accountsHold affected accounts from AI input; owner corrects source
Order mapped to an absent accountRelationship check using the agreed key and populationInvestigate late arrival, deletion or broken join
Duplicate current order recordUniqueness over the serving key and version policyResolve which record is authoritative; do not pick arbitrarily
Unexpected status or currencyAllowed values with a maintained business definitionReview mapping changes before model use
Old source extractionFreshness check against the workflow's cutoffMark the answer unavailable or escalate until refreshed
Policy count suddenly changesReconcile approved inventory and collected inventoryCheck access failures and source changes before indexing

In Data Quality, create a rule against a supported source and place it in the intended hub. Where AI-assisted bulk applies, choose relevant tables, a Target DQ Hub, and Generate rules. The current workflow limits generation to 25 tables per batch and initially suggests Low severity / Accuracy. Review each suggestion: generated syntax does not prove the rule represents the business contract. Set severity and dimension deliberately before creating it.

Generate candidates, then review the business rule

AI-assisted bulk quality generation selects ai_pilot_accounts and orders for the ai_readiness hub.
Inspect
The selected objects are ai_pilot_accounts and orders; the target is ai_readiness. Low / Accuracy are the starting defaults.
Interpret
Suggestions can accelerate drafting. They cannot decide whether country is mandatory or what an order status means.
Act
Review scope, severity and assertions with the owner before creating rules; keep generation batches within the 25-table limit.
Simplified product recreation with synthetic data. Business-role labels and the review note are editorial explanations.Open full-size visual ↗

When a rule fails, inspect its results and available evidence, correct the underlying cause, and rerun the same check. A passing rerun closes that specific condition at that collection point. It does not certify the whole dataset. Maintain full exception counts separately from any displayed sample, and keep the previous failed evidence for the release discussion.

Turn the missing-country rate into an actionable exception

A native SQL country rule fails on 100 active accounts; three sample account rows are shown.
Inspect
The run failed because row_count is 100 when the assertion expects zero. The table shows three sample rows.
Interpret
These are active accounts with missing country, not 100 arbitrary nulls in the entire estate. The displayed sample is not the full count.
Act
The data owner corrects the source; the application excludes or escalates affected accounts until verified.
Product recreation with synthetic data. PILOT ACTION is an editorial decision column, not an automated quarantine feature.Open full-size visual ↗

3. Prepare knowledge for retrieval, not just ingestion​

Meridian inventories 120 policy documents and identifies 108 current documents plus 12 retired versions. The policy owner resolves conflicts and applicability before indexing. Preserve source identity, title, owner, effective date and version in the maintained material or the team's inventory. These are recommended preparation fields, not a promise that every connector exposes every field automatically.

Verify the collection and its serving build

Search index is enabled for approved_return_policies; a serving build shows ready and 100% completion.
Inspect
Inspect Enable search index, the serving build, ready status and the Build now / Save controls.
Interpret
Meridian maintains 108 current policies after retiring 12 versions. A ready build is processing evidence, not proof of useful or authorized retrieval.
Act
Sample current and retired-policy questions, inspect the retrieved content, and retain the source version and build record.
Product-interface recreation with synthetic Meridian data; reviewer notes are explanatory, not automated controls.Open full-size visual ↗

Review the actual text that will be retrieved. A PDF can contain readable headings but broken table extraction; a policy can separate an exception from the clause it qualifies. Test representative passages containing tables, numbered procedures, region-specific conditions and superseded language. If context loses a prerequisite, repair the source or ingestion configuration and test again instead of compensating with a larger prompt.

For an eligible source, its owner configures Search index, saves the settings and inspects Builds. A ready build proves that a build reached that state; it does not prove coverage, freshness, permission correctness or useful retrieval. Confirm representative source documents are reachable and that retired content does not answer current-policy questions.

OWASP recommends tracking source provenance and validating retrieved context, including defenses against malicious instructions embedded in documents. Treat retrieved text as evidence to assess, not as authority to expand the application's permissions. OWASP RAG Security Cheat Sheet.

4. Test retrieval separately from the model's answer​

Create a small diagnostic set before tuning the final prompt. For each question, record the expected source, applicable version, essential facts, known distractors and whether the correct behavior is escalation. For “Can this regional customer return this product?”, the policy region and product exception both matter. Retrieving a generally relevant returns paragraph is not sufficient.

Run the actual application path and inspect the context it supplies. Application instrumentation or manual review may be required; this guide does not claim automatic end-to-end retrieval tracing in DataDios. Classify the failure before changing anything:

ObservationFirst investigationWhat would be the wrong fix?
Correct document never appearsSource scope, build status, extraction and retrieval configurationRewriting the answer prompt repeatedly
Retired policy appearsCollection maintenance and index/cached-copy behaviorAsking the model to “prefer the latest” without evidence
Correct context appears, answer contradicts itPrompt, model behavior and evaluation assertionsReindexing unchanged source material
Required account field is missingServing population and source-quality ruleFilling the gap with a plausible model inference
Unauthorized context appearsAuthorization before retrieval and cache isolationHiding it only in the final answer

After retrieval is understood, use AI evaluations to assess responses against explicitly supplied representative context. Supplying context to an Eval rule tests behavior with that input. It does not automatically exercise the live retrieval path or prove that future requests will receive the same context.

Compare the answer with the policy it must follow

A drafted answer retains the seven-day request window and staff review from Returns policy v4.
Inspect
The answer and policy excerpt both require a request within seven days and staff review; custom orders require support review.
Interpret
The answer explains a process. It does not approve a return or invent refund timing.
Act
Check the original source and missing prerequisites, then retain this case in the evaluation set.
Product response recreation with synthetic data. The side-by-side source excerpt is a reviewer comparison, not automatic citation verification.Open full-size visual ↗

5. Publish a versioned evidence bundle, then keep it current​

For each pilot release, retain the input contract, approved field list, source extraction times, rule definitions and run identifiers, exception disposition, policy inventory, build state and evaluation-set version. Keep sensitive records out of broadly shared evidence; use counts, restricted references and synthetic reproduction cases where possible.

Changes invalidate different evidence. A policy revision needs applicability and retrieval checks; a new status code needs rule and prompt review; a changed join needs reconciliation; a new model needs behavior evaluation. A schema-drift event helps identify a structural change, but unchanged schema does not prove unchanged meaning. Assign an owner and trigger for each recheck rather than rebuilding every artifact indiscriminately.

A smaller company can start with one source view, a maintained policy folder and five consequential rules. An enterprise can define shared contract templates and evidence requirements while domain teams own source semantics and correction. The useful scale measure is the number of workflows with maintainable evidence and accountable exceptions, not the number of connected sources.

Product setup references​

For the current V2 workflow, use AI-assisted rule generation, Data Quality, and the shared Search index setup. The AI evaluation reference explains supported assertions, case limits and interpretation.

Questions teams ask about preparing data for AI​

What does “AI-ready data” mean in practice?​

It means data is fit for a defined AI task: authorized, relevant, correctly interpreted, sufficiently complete and current, and supplied with usable context. Readiness is conditional on the task. A dataset adequate for monthly trend analysis may be unsuitable for answering a customer's current order-status question.

Do we need perfect data before starting?​

No. Define which defects make the intended answer unsafe or unreliable, then constrain the pilot around them. Meridian can use 7,900 eligible accounts while explicitly escalating the 100 active accounts with missing country. That is a controlled scope decision, not permission to hide exceptions or misreport coverage.

Why can a good average quality score still produce bad AI answers?​

An average can hide the exact cohort or field the task depends on. Missing country in 1.25% of active accounts may be material when every answer needs the correct regional policy. Evaluate critical conditions and cohorts individually; do not let many easy passes compensate for a consequential failure.

Can AI-generated quality rules replace data-owner input?​

No. Generated suggestions can accelerate drafting, but they cannot establish the intended meaning of status codes, acceptable lateness or regional exceptions. Have the owner explain the business condition, review the generated rule and test representative passing and failing records before scheduling it.

Is successful indexing the same as successful retrieval?​

No. Indexing concerns processing the selected content; retrieval concerns finding the right content for a particular question. A ready index may contain obsolete policies or miss an exception during retrieval. Check build state, document coverage and question-level retrieval evidence separately.

Should we fix data in the prompt or in the source?​

Correct source errors and serving transformations where their owner can maintain them. Use prompts to state the task and handling of uncertainty, not to conceal unresolved data defects. If an answer requires a value that is missing or ambiguous, escalate rather than manufacture a replacement.

How should we manage structured data and documents together?​

Give each its own contract. Structured records need identity, scope, semantics and freshness checks; documents need authority, applicability, extraction quality and retrieval checks. Join their evidence at the application decision. One document-quality score cannot validate an order join, and a passing SQL rule cannot prove a retrieved policy applies.

How do we know the preparation effort was worthwhile?​

Measure relevant outcomes: fewer unsupported answers, fewer avoidable escalations, faster investigation and lower rework per accepted response. Keep the evaluation set and business population comparable. Combine those measures with token and cost management; lower prompt size alone is not success if answer quality falls.

Continue with governance and PII controls, evaluation and release, or observability.

Map the data preparation work for your AI pilot