ServicesWorkAboutBlog Contact Start a project

AI Engineering

Data Engineering for AI

Most failed AI projects are data projects that were never funded. We build the pipelines, quality gates and retrieval-ready stores that decide whether anything above them can work.


When an AI initiative stalls, the post-mortem usually blames the model. In our experience the cause is almost always upstream: the data existed in five systems with three definitions of the same customer, nobody could say when a record was last correct, and the pipeline that fed the model ran on a laptop under someone's desk. Data engineering for AI is the work of making that layer trustworthy — not as a preliminary phase to be rushed through, but as the thing that determines the ceiling on everything built above it. ZenMagix builds ingestion pipelines, warehouses and vector stores for teams in India, the UK, the Gulf and APAC. The work is deliberately unglamorous: schema contracts so an upstream change breaks a build rather than a dashboard, lineage so you can answer where a number came from, quality gates that fail loudly instead of passing bad rows through silently, and chunking and metadata strategies designed around the questions your retrieval system will actually be asked. We have taken over enough half-built pipelines to have opinions about what breaks, and we would rather show you the honest state of your data before you commit budget to a model that will inherit its problems.

Why AI projects fail on data rather than on models

A model can only be as good as the retrieval it sits on, and retrieval can only be as good as the structure, freshness and consistency of what was ingested. None of those are model problems.

Consider a support assistant that keeps citing a superseded refund policy. The instinct is to change the prompt, then the model. Neither works, because the 2023 policy and the 2026 policy are both in the index with no date metadata, and the older document happens to be the better semantic match for how customers phrase the question. That is a metadata problem with a one-line fix, invisible from anywhere except the data layer. This pattern repeats endlessly.

A sales agent gives wrong stock figures because the inventory feed lands eleven hours late and nobody surfaced the lag. A retrieval system misses a critical clause because fixed-size chunking split it from the definitions that gave it meaning. A fine-tune underperforms because the training set was deduplicated by exact match while the corpus was full of near-duplicates that quietly biased it. In each case the visible failure is at the model, and every hour spent there is wasted.

The diagnostic discipline we insist on is simple: before touching a model, take the cases it got wrong and check whether the correct information was ever available to it in the right form. Most of the time it was not, and the fix costs a fraction of what the model work would have.

  • Missing date and version metadata is the most common cause of confidently outdated answers
  • Freshness lag that nobody monitors produces failures that look random from the outside
  • Structure-blind chunking severs clauses from the context that gives them meaning
  • Near-duplicate documents skew both retrieval ranking and fine-tuning distributions
  • Check whether the right information was retrievable at all before blaming the model

Building pipelines that fail loudly instead of quietly

A pipeline that stops is an incident. A pipeline that keeps running while producing wrong output is a much more expensive incident discovered months later. We engineer for the second case.

Silent degradation is the characteristic failure of data systems. An upstream team renames a field, the ingestion job maps it to null, and every downstream consumer carries on happily with a column that is now empty. Nobody notices until a quarterly number looks odd. The defence is contracts and gates: an explicit schema declared at every boundary, validated on every run, with a failure that blocks the load rather than logging a warning into a stream nobody reads.

Beyond schema, the checks that earn their keep are distributional. Row counts within an expected band. Null rates compared against a rolling baseline. Category values checked against a known set. Freshness measured as the age of the newest record, alerting when it exceeds what the business actually requires rather than an arbitrary threshold. Referential integrity across the joins your models depend on. And idempotency throughout, so a rerun after a failure produces the same result rather than double-counting — which matters enormously the first time someone replays three days of data at two in the morning.

We also insist on lineage. When a director asks why a figure changed, you should be able to trace it from the dashboard back through every transformation to the source record in minutes. Teams that cannot do this end up unable to defend their own numbers, and an AI system built on numbers nobody trusts will not be adopted no matter how good it is.

  • Schema contracts validated at every boundary, with failures that block rather than warn
  • Distributional checks — row counts, null rates, category drift — against rolling baselines
  • Freshness SLAs derived from what the business needs, not from a default fifteen minutes
  • Idempotent loads, so replays and backfills cannot double-count
  • Column-level lineage from dashboard back to source record

Preparing data for retrieval, not just for storage

A warehouse optimised for analytics is not automatically ready for retrieval. Chunking, metadata and embedding strategy are design decisions that should follow from the questions the system will be asked.

Retrieval-ready is a different property from well-modelled. It starts with chunking that respects document structure — sections, clauses, table headers travelling with their rows — because a chunk that severs meaning cannot be rescued downstream by any model. Overlap needs tuning per document type; the setting that works for a policy manual is wrong for a chat transcript. Then metadata, which is where most of the practical gain sits. Effective date, version, jurisdiction, product line, access level, source system: every one of these becomes a filter that shrinks the search space before semantic ranking, and filtering is both cheaper and more reliable than hoping the embedding model infers recency.

Access level in particular is not optional — if your index contains documents some users must not see, that has to be enforced at retrieval time, not by asking the model politely. Embedding choice matters less than people expect, but it is not free: multilingual content, domain jargon and code all behave differently, and the way to decide is to measure recall on your own evaluation set rather than to read a leaderboard. Hybrid retrieval, combining keyword search with vectors, outperforms pure vector search on most business corpora, because exact identifiers — invoice numbers, SKUs, clause references — are exactly what dense embeddings handle worst.

  • Structure-aware chunking with overlap tuned per document type, not one global setting
  • Metadata filters on date, version, jurisdiction, product and access level before ranking
  • Access control enforced at retrieval, never by instruction to the model
  • Hybrid keyword plus vector retrieval, because identifiers defeat pure semantic search
  • Embedding models chosen by measured recall on your corpus, not by public leaderboard

What we do when the existing stack is a mess

We start by making the current state visible rather than proposing a rebuild. Most stacks need three targeted fixes and a monitoring layer, not a migration.

The instinct on inheriting a tangled data estate is to propose a clean platform. It is usually the wrong call — a migration consumes a year, delivers no new capability while it runs, and frequently reproduces the original problems in newer tooling. What we do instead is map what exists: every pipeline, its schedule, its actual last successful run, who depends on it and whether anyone still uses the output. That inventory alone typically retires a fifth of the jobs, because they feed dashboards nobody has opened since the person who requested them left.

From there we identify the small number of paths that genuinely matter — the ones feeding revenue reporting and the ones feeding the AI system — and we make those specific paths reliable, observable and documented. Everything else stays where it is until it earns attention. Where a rebuild genuinely is warranted, we do it incrementally with both systems running in parallel and reconciled daily, so the cutover is a decision rather than a leap. We will also tell you when the honest answer is that your data cannot support the AI use case you have in mind at any reasonable cost. That conversation is uncomfortable and it is cheaper than the alternative.

  • Full inventory of pipelines, schedules, real run history and downstream consumers
  • Retire the unused before rebuilding anything — usually a meaningful fraction of the estate
  • Harden the paths that feed revenue and AI first, leave the rest until it earns priority
  • Parallel running with daily reconciliation where a rebuild is genuinely justified
  • An honest read on whether the data can support the intended use case at all

What you get

Deliverables

01

Data estate assessment

An inventory of every pipeline, table and feed: what runs, when it last actually succeeded, who consumes it, and what breaks if it stops. Delivered with a prioritised remediation list and an honest read on whether the estate can support the AI use case you have in mind.

02

Ingestion pipelines with contracts and quality gates

Batch and streaming ingestion with schemas declared and validated at every boundary, distributional quality checks against rolling baselines, freshness SLAs derived from business need, and idempotent loads that survive replay. Failures block rather than warn.

03

Warehouse and semantic model

A modelled warehouse with tested transformations, documented grain, and a semantic layer so the same metric means the same thing in every dashboard and every AI query. Includes column-level lineage from output back to source record.

04

Retrieval-ready corpus and vector store

Structure-aware chunking, metadata enrichment for filtering, access control enforced at query time, hybrid keyword and vector retrieval, and a measured recall baseline on an evaluation set built from your real questions.

05

Observability and on-call runbook

Freshness, volume and quality monitoring with alert routing that reaches a human who can act, plus a runbook covering the failure modes we actually encountered during the build and how to recover from each.

How we work

Process

01

Map what exists

Two to three weeks tracing pipelines, sources and consumers, including the ones nobody documented. We end with an inventory, a dependency map, a list of jobs that can be retired, and a clear statement of which paths actually matter to the business.

02

Instrument before changing

We add freshness, volume and quality monitoring to the current system before modifying it. Without a baseline you cannot prove an improvement, and you cannot tell whether a new problem was introduced by your change or was always there unseen.

03

Harden the critical paths

Contracts, quality gates, idempotency and lineage on the pipelines feeding revenue reporting and AI systems. Shipped incrementally into your repository, reviewed by your engineers, with the old path running in parallel until reconciliation is clean.

04

Make it retrieval-ready and hand over

Chunking, metadata and vector store design driven by a measured recall baseline on your real questions, then documentation and a handover session. The target is a data layer your team can extend without calling us.

Every phase ends at a decision point you can stop at — see how that works across fixed-scope projects, embedded pods and retainers.

Stack

What we build with

Postgres and ClickHouse for operational and analytical storesSnowflake or BigQuery where the warehouse is already theredbt for transformation, testing and documentationDagster or Airflow for orchestration, with real retry semanticsDebezium and Kafka for change data capture and streamingGreat Expectations or Soda for quality assertionspgvector, Qdrant or Weaviate depending on scale and filtering needsOpenSearch for the keyword half of hybrid retrievalOpenLineage for column-level lineage trackingTerraform or Pulumi for infrastructure in your cloud accountAirbyte or Fivetran for commodity SaaS connectorsGrafana and Prometheus for freshness and volume alerting

Questions

Frequently asked

Do we need a data warehouse before we can do AI?

Not always. A focused retrieval use case can work off a well-prepared document corpus with no warehouse at all. You need a warehouse when AI answers must reference numbers that also appear in reporting, because two systems computing the same metric differently will destroy trust in both. We will tell you which situation you are in.

How long does a data engineering engagement take?

The assessment takes two to three weeks. Hardening the critical paths is typically two to four months depending on how many source systems are involved. Full warehouse builds run longer, but we structure them so something useful ships each month rather than everything landing at the end.

Can you work with our existing stack rather than replacing it?

That is our default recommendation. Migrations consume a year and deliver no new capability while they run. Most estates need three targeted fixes and a monitoring layer, not a new platform. We propose a rebuild only when the current architecture makes the required outcome genuinely unreachable.

How do you handle data residency and privacy?

Residency is a deployment decision we make with you. We can build entirely inside your cloud account in a specified region, and where data cannot leave your infrastructure we use self-hosted embedding and inference. That option costs more and performs somewhat worse, and we will tell you honestly whether your situation warrants it.

What does data quality monitoring actually catch?

Upstream schema changes that silently null a column, freshness lag that makes answers quietly stale, volume drops from a broken source, category drift when a system adds a new status value, and referential breaks across joins. Each of these normally surfaces as a mysterious AI failure weeks later.

Who owns the pipelines you build?

You do, outright. Everything lives in your repository and runs in your cloud account on open tooling. We do not build on proprietary internal frameworks, so nothing about the handover requires our continued involvement.

Questions about cost, timelines, IP ownership and data residency are answered on the general FAQ, and how this practice came out of blockchain infrastructure explains why we build the way we do.

Send us your pipeline list and we will tell you what is actually running

Tell us what you are trying to build. We will tell you honestly whether we are the right team for it, and what it would realistically take.

Start a conversation See our work