Security3 min read661 words

Shipping AI Features Under HIPAA

Adding an LLM to a product that touches protected health information changes who your subprocessors are, what your logs contain, and what you must be able to prove. An engineering view of the constraints.

JL

Jishu Labs

The awkward property of LLM features in healthcare is that the useful context is exactly the regulated context. A summarisation feature is valuable because it reads the clinical note, and the clinical note is protected health information. There is no version of this where you avoid the question by being careful with the prompt.

Engineering guidance, not legal or compliance advice

HIPAA obligations depend on whether you are a covered entity or a business associate, what your agreements say, and how your organisation has interpreted them. Work with your compliance function and counsel. What follows is about the technical constraints that fall out of those obligations.

Your model provider becomes a subprocessor

Sending PHI to a hosted model means that provider processes PHI on your behalf. That requires a business associate agreement, and not every provider offers one on every tier. Check before the architecture depends on it — this is a common late discovery that forces a rebuild.

  • Confirm a BAA is available for the specific service and region you intend to use.
  • Confirm the data-retention and training terms in writing: whether inputs are retained, for how long, and whether they can be used for model improvement.
  • Record the decision and its date. Terms change, and you will need to show what was true when you shipped.

Logs are the trap

The observability practices that make AI systems debuggable — capturing full prompts, retrieved context and model outputs — are exactly the practices that spray PHI across your logging infrastructure. A trace containing a clinical note is a copy of a medical record in a system that was never scoped for it.

  • Redact at capture, not at query. By the time it is in the log store it has been replicated and backed up.
  • Keep identifiers out of prompts where the task does not need them. A summarisation task rarely needs the patient's name.
  • Segregate AI traces into storage with the same controls and retention rules as the clinical record itself, if redaction is not feasible.
  • Audit access to traces. Debugging access to production traces is access to PHI.

Minimum necessary applies to context windows

The minimum-necessary principle maps directly onto retrieval design. Retrieving the whole chart because it is easier than scoping the query is a design decision with a compliance consequence. Scope retrieval to the clinical question being asked, and be able to show what was retrieved for any given request.

Human oversight is a product requirement

Any output that could influence care needs a clinician in the loop, and the interface has to make review real rather than nominal. That means showing the source passages behind a summary, making the model's uncertainty visible, and recording that a human reviewed and what they changed.

What to be able to prove

  • Which model version produced a given output, and when.
  • What context was retrieved for that request, and under whose authorisation.
  • That a qualified human reviewed anything that reached a care decision.
  • That PHI in traces is controlled to the same standard as the source record.

Where on-premises models change the calculus

A smaller model running inside your own environment removes the subprocessor question entirely, which in healthcare is often worth more than the accuracy difference. For bounded tasks — extraction, classification, structured summarisation — this is frequently the architecture that clears review fastest.

Frequently Asked Questions

Can I use a hosted frontier model with PHI?

Often yes, under a BAA on a qualifying tier with retention and training terms in writing. The requirement is the agreement and the configuration, not the model.

Does de-identifying the prompt solve it?

Only if de-identification meets the standard your compliance function applies, and free-text clinical notes are notoriously hard to de-identify reliably. Treat it as a control that needs validation, not a switch.

Do AI traces need the same retention as medical records?

If they contain PHI, they are subject to the same protections. That is the argument for redacting at capture rather than inheriting a records-retention obligation on your logging stack.

References

  1. HIPAA for ProfessionalsU.S. Department of Health and Human Services
  2. EU AI Act Compliance Deadlines: Key Dates and ObligationsJAGGAER
JL

About Jishu Labs

Jishu Labs is a software development company founded in 2016. We build custom software, AI/ML systems, and full-stack web and mobile applications for clients, and we make eight AI tools for software teams.

Related Articles

Security3 min read

What Is Prompt Injection?

Prompt injection is when untrusted text reaching a model's context gets treated as instruction rather than data. It has held OWASP's number one LLM risk slot across every edition, and agents made it materially worse.

Jishu Labs

August 7, 2026

Security3 min read

Model Risk and Audit Trails in Financial Services AI

Financial services has governed models for decades. Generative AI does not escape that framework - it stresses it. What model risk management asks of an LLM feature, and what to instrument.

Jishu Labs

August 4, 2026

Security3 min read

EU AI Act, August 2026: What Applies to Software Teams

The Act's most consequential obligations landed on 2 August 2026, and some were then moved. What is in force now, what shifted, and what an engineering team building AI features should actually do about it.

Jishu Labs

July 31, 2026

Ready to Build Your Next Project?

Let's discuss how our expert team can help bring your vision to life.

AI Tools,
Built
End-to-End

Ready to Get Started?

Get consistent results. Collaborate in real-time.
Build Intelligent Apps. Work with Jishu Labs.

SCHEDULE MY CALL