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
- 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.
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 approach | Preparation emphasis | Evidence before release |
|---|---|---|
| Training or fine-tuning | Permitted training use, representative examples, label quality, deduplication and separation of training from evaluation data | Dataset version, label review, split rationale and held-out evaluation results |
| Retrieval-augmented generation (RAG) | Current authorized documents, usable extraction, source provenance and question-level retrieval | Collection inventory, build state, permission checks and retrieved-context review |
| AI agents with tools | Trustworthy context plus bounded identities, allowed operations and handling of ambiguous requests | Tool-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 element | Example requirement | Why it matters to an answer |
|---|---|---|
| Population | Active accounts approved for the pilot | Inactive accounts are not silently treated as current customers |
| Identity | Stable account and order keys; authorized account scope | Similar names must not join unrelated customers |
| Required context | Country for active accounts; order status; relevant date and product class | Policy applicability depends on more than fluent language |
| Semantics | Defined status meanings, date/time zone and currency unit | “Dispatched” is not “delivered”; minor units are not whole currency units |
| Freshness | Source-specific cutoff and an agreed maximum age | A current policy cannot fix a stale order status |
| Knowledge | Owner-approved, applicable policy version with identifiable source | A retrieved paragraph must have a known authority |
| Exceptions | Missing required context escalates instead of being guessed | The 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 detect | Suggested check design | Operational response |
|---|---|---|
| Active account without country | Required-country condition scoped to active accounts | Hold affected accounts from AI input; owner corrects source |
| Order mapped to an absent account | Relationship check using the agreed key and population | Investigate late arrival, deletion or broken join |
| Duplicate current order record | Uniqueness over the serving key and version policy | Resolve which record is authoritative; do not pick arbitrarily |
| Unexpected status or currency | Allowed values with a maintained business definition | Review mapping changes before model use |
| Old source extraction | Freshness check against the workflow's cutoff | Mark the answer unavailable or escalate until refreshed |
| Policy count suddenly changes | Reconcile approved inventory and collected inventory | Check 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
- 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.
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
- 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.
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
- 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.
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:
| Observation | First investigation | What would be the wrong fix? |
|---|---|---|
| Correct document never appears | Source scope, build status, extraction and retrieval configuration | Rewriting the answer prompt repeatedly |
| Retired policy appears | Collection maintenance and index/cached-copy behavior | Asking the model to “prefer the latest” without evidence |
| Correct context appears, answer contradicts it | Prompt, model behavior and evaluation assertions | Reindexing unchanged source material |
| Required account field is missing | Serving population and source-quality rule | Filling the gap with a plausible model inference |
| Unauthorized context appears | Authorization before retrieval and cache isolation | Hiding 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
- 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.
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