
Unstructured Data Has a Time Problem. It's Breaking Health AI in Production.
By Shoa A.
7 Min Read

80% of enterprise health data is unstructured. Clinical notes, session transcripts, call logs, care narratives. Your predictive models are trained on the other 20%.
Generative AI changed this. Not just as an interface, but as infrastructure: a translation layer that finally converts high-dimensional, noisy narrative data into structured features that predictive models can consume. The unlock is real.
But most teams are solving the wrong problem. They treat unstructured health data as a text extraction challenge. It is not. It is a time problem. And if you get the time problem wrong, your model looks excellent offline and fails silently in production.
Two Timestamps. One Catastrophe
Every clinical document carries two timestamps, and they are not the same thing.
event_time: When something actually happened to the patient record_time: When someone documented it
Most pipelines treat record_time as ground truth. That single decision destroys causality. A note written three days after a crisis is not evidence from before it. When your model trains on that note to predict the crisis, it is cheating. It has seen the future. Your offline AUC looks great. Your production model fails the patients who needed it most.
This is temporal leakage. It is harder to catch in unstructured data than structured data because the timestamps are often buried inside the narrative itself:
"Patient reports she stopped sleeping about two weeks ago, but today she feels slightly better."
The record_time on this note is March 31. The actual event, sleep disturbance onset, happened around March 17. A pipeline that does not extract that distinction will misplace this signal in time, corrupt your training set, and you will not know until the model underperforms in the real world.
The correct extraction looks like this:
Getting here requires a temporal ingestion engine that parses linguistic anchors ("two weeks ago," "since her father passed," "last Tuesday"), resolves them to absolute dates using record_time as reference, and stores both timestamps with confidence scores. This is not a standard NLP task. It requires purpose-built extraction trained on domain-specific labeled data.
What the Fix Actually Requires
Three components. Most teams have none of them.
1. Temporal Ingestion
Not text extraction. Temporal extraction. The goal is not "what happened" but "when did it happen relative to everything else." Every unstructured signal entering the pipeline needs an event_time, a record_time, and a confidence score before it touches your feature store.
2. Point-in-Time Feature Store
This is the most under-engineered component in health AI, and the direct solution to leakage. Every feature is stored with a valid_from and valid_to timestamp. When you train a model on a historical snapshot, it sees exactly what the production system would have seen at that moment. Nothing more.
A patient's sentiment score on March 10 is -0.3. By March 16 it is -0.7. A model predicting on March 10 uses -0.3. A model predicting on March 16 uses -0.7. No future information bleeds backward. The gap this closes between offline metrics and real-world performance is consistently larger than teams expect.
3. Longitudinal Features, Not Snapshots
Point-in-time correctness is necessary but not sufficient. Predictive systems need to understand how states evolve, not just what state exists right now. That means building features like:
Sentiment velocity: rate of change over 30, 60, 90 day windows
Ideation density: signal frequency per 1000 words over time
Narrative vs structured mismatch score: when a PHQ-9 says mild but the session note describes functional collapse
That last one is worth pausing on. Standardized assessments and clinical narratives frequently disagree. The mismatch itself is a predictive signal, and it surfaces earlier than either source alone.
A Concrete Example: Where It Breaks and Where It Works
Patient context, March 15, 2025.
Structured data: PHQ-9 score of 6 (mild depression), no missed appointments, medication adherent. A model trained on structured data only flags this patient as low risk.
Session note from March 14: "Patient reports feeling completely fine, but mentions she has stopped answering her phone and her partner does not understand why she is so tired all the time."
With a proper temporal pipeline, this note yields:
social_withdrawal event extracted with event_time of March 10
sentiment velocity of -0.6 over 5 days
mismatch score flagged as HIGH
The point-in-time store confirms no post-March-15 data is in play. The knowledge graph surfaces two historical cases with near-identical trajectories that preceded crisis within 7 days.
The model output: High Risk. Explanation: PHQ-9 is stable, but narrative shows rapid decline in social engagement and energy consistent with two prior cases that escalated.
Without the unstructured layer, this patient is low risk. With it, she gets an intervention. That is the stakes.
Three Integration Approaches, One Maturity Curve
These are not parallel options. They are a progression.
Feature Concatenation is your starting point. Unstructured-derived features (sentiment velocity, mismatch score, ideation density) become additional columns in your existing feature table. Standard models, XGBoost or logistic regression, train on the merged set. High interpretability, low latency, works in regulated environments. You lose some narrative nuance. Start here.
Two-Tower Retrieval layers on top. A structured model produces a baseline risk score. A retrieval model queries historical cases for similar trajectories and scores them. A fusion layer combines both. This gives you example-based explanations ("similar to a case that escalated in March") and tolerates 200 to 500ms latency. Use this when you have a large historical corpus to retrieve from.
Agentic Reasoning is reserved for high-stakes, low-volume predictions where you need human-level explanation. The agent queries the knowledge graph, retrieves similar episodes, generates a candidate score with reasoning, validates against structured ground truth, and stores the full reasoning trace. Expensive per prediction. Not for high-throughput. Right for augmenting clinical decision-making, not replacing it.
Most mature systems run all three. Concatenation as baseline. Retrieval for mid-tier cases. Agentic loop for the highest-stakes predictions where explainability is non-negotiable.
The Competitive Moat Is the Architecture
The model is not the moat. Any team with a GPU budget can fine-tune a model. The moat is the data architecture feeding it: point-in-time correct, temporally grounded, longitudinally structured, and audit-ready.
In regulated health domains, this is not only an accuracy story. It is your compliance story. Poor lineage, missing timestamps, and absent access controls are not just technical debt. They are regulatory exposure. Getting the architecture right means your AI can be explained, audited, and trusted by the clinical and compliance stakeholders who decide whether it gets deployed.
The teams building health AI that actually works in production are not the ones with the best models. They are the ones who solved the time problem first.
If you are dealing with temporal leakage in a longitudinal prediction system, or trying to build point-in-time correctness into an unstructured data pipeline in a regulated environment, that is exactly the problem we work on.
