Estimating Outpatient Visit Prices from Hospital Price Transparency Data using Large Language Models

Kurmanbek Kaiyrbekov, Nicholas J Dobbins, Sean D MooneyarXiv 2026

TL;DR

Researchers have developed a Retrieval-Augmented Generation (RAG) framework that uses Large Language Models (LLMs) to navigate messy, non-standardized hospital price transparency data. By grounding LLM responses in actual hospital billing files, the system reduces price estimation errors from over 140% to under 20%, offering a path toward making healthcare costs truly transparent for patients.

What Problem Does This Paper Address?

In the United States, hospital pricing is notoriously opaque. To combat this, the Centers for Medicare and Medicaid Services (CMS) mandated in 2021 that hospitals publish "machine-readable" price transparency (PT) files. However, "machine-readable" does not mean "user-friendly." These files are often massive, inconsistently structured, and filled with cryptic medical shorthand (e.g., "elbow 2 vws" for a two-view X-ray).

For a patient, translating a symptom like "wrist pain" into a specific set of billable medical codes and their associated costs remains nearly impossible. This paper addresses the gap between raw, heterogeneous data and actionable financial information by using LLMs to interpret patient queries and retrieve relevant pricing from hospital-specific records.

Methods

The authors implemented a Retrieval-Augmented Generation (RAG) architecture. The pipeline consists of three main stages:

  1. Preprocessing: The team standardized PT files from three hospitals, filtering for records with Current Procedural Terminology (CPT) codes. They "enriched" the cryptic hospital descriptions by appending official long-form descriptions from the Unified Medical Language System (UMLS).
  2. Retrieval: They compared four strategies to find the right procedure:
  3. Okapi BM25: A traditional keyword-based (sparse) retrieval algorithm.
  4. OpenAI Embeddings (Small & Large): Dense vector retrieval to capture semantic meaning.
  5. Hybrid GPT-BM25: A novel approach where the LLM first predicts the most likely CPT codes, which are then used to query the database via BM25.
  6. Generation: The LLM (GPT-5.4) receives the top-$K$ retrieved records and the original user query to select the best match and report the price.

The system was tested against a "No-RAG" baseline, where the LLM was asked to estimate prices based solely on its internal training data (parametric knowledge).

Datasets

The study utilized real-world PT files from three major institutions in the Maryland/D.C. area:

  • Johns Hopkins Hospital
  • University of Maryland Medical Center
  • MedStar Washington Hospital Center

To evaluate the system, they used:

  • Individual Procedures: 277 services pulled from the Johns Hopkins online price estimator.
  • Synthetic Patient Vignettes: To simulate realistic pre-visit interactions, the authors used clinical notes from MTSamples.com to generate synthetic patient personas and "billed" procedure sets using a separate LLM (GPT-4.1) to avoid data leakage.

Key Insights and Ideas

  • Grounding is Non-Negotiable: LLMs are surprisingly good at identifying the type of medical procedure needed, but they are terrible at guessing the price. Without RAG, the models hallucinated prices that were wildly off-base.
  • The Hybrid Advantage: The Hybrid GPT-BM25 retriever outperformed pure semantic search. This suggests that for specialized domains like medical billing, combining the LLM’s reasoning (to identify codes) with exact keyword matching (BM25) is more robust than relying on embeddings alone.
  • The "Symptom-to-Code" Bottleneck: While the system was excellent at pricing specific procedures (99% recall), it struggled more with "pre-visit" estimation—predicting what a doctor will bill based on a patient's symptoms. In simulations, it correctly identified only about 50% of the reference procedures, highlighting the inherent complexity of medical coding.

Key Results

The quantitative improvements provided by the RAG framework were substantial:

  • Individual Procedures: The RAG system (Hybrid GPT-BM25) achieved a Mean Absolute Percentage Error (MAPE) of 19.44%, compared to a staggering 147.98% for the LLM-only baseline.
  • Procedure Groups: For bundles of services (like an annual physical with labs), the RAG system’s MAPE dropped to 4.90%, while the baseline remained high at 82.82%.
  • Retrieval Performance: The hybrid retriever reached nearly 98% recall at $K=10$, meaning the correct procedure was almost always in the top 10 results shown to the LLM.

Limitations and Future Work

Despite the progress, several hurdles remain:

  • Insurance Complexity: The current model focuses on "gross charges" or "cash prices." In reality, most patients pay "negotiated rates" determined by their specific insurance plan, which are much harder to extract and model.
  • Data Quality: Hospital PT files are still plagued by unexplained duplicate entries and heterogeneous formats, requiring significant manual preprocessing.
  • Clinical Uncertainty: Predicting exactly what a clinician will order during a visit based on a chat interface is inherently probabilistic. Future work needs to better account for the variability in clinical decision-making.

The authors are currently developing a web-based prototype to bring this technology directly to consumers, potentially turning "machine-readable" data into "patient-empowering" information.

Summary updated

Abstract

Objective: Hospital care prices in the United States have increased substantially, yet patients lack effective tools to access and compare costs. We aimed to develop and evaluate an LLM-based approach for improving access to and use of hospital price transparency (PT) data. Materials and Methods: To estimate visit prices, we used a retrieval-augmented generation (RAG) framework to analyze PT files from three major hospitals in Maryland and the surrounding region. We compared BM25, OpenAI embedding models, and a GPT-BM25 hybrid against a no-RAG baseline for cost estimation of individual procedures and procedure groups, then evaluated the best approach for symptom-based visit cost estimation using synthetic simulations. Results: Across hospitals, the GPT-BM25 retriever achieved the best performance, with average price MAPE of 19.44% for individual procedures and 4.90% for groups, compared with 147.98% and 82.82%, respectively, for the no-RAG baseline. In simulations, our framework correctly identified approximately 50% of reference procedures and reduced MAPE relative to the LLM-only baseline at two of the three hospitals, while achieving comparable performance at the third. Discussion: Our framework uses RAG to improve care price estimation in real-world settings. Compared with the no-RAG baseline, it substantially improved cost estimates for both individual procedures and procedure groups. Improvements were smaller in synthetic simulations, likely because inferring procedures from clinical information is more complex. Practical challenges remain, including heterogeneous PT file formats, unexplained duplicate entries, and limited availability of insurer-negotiated rates. Conclusion: LLMs that effectively integrate PT data show strong potential to provide patients with more accessible and accurate healthcare cost estimates.
BibTeX
@misc{kaiyrbekov2026estimating,
  author = {Kurmanbek Kaiyrbekov and Nicholas J Dobbins and Sean D Mooney},
  title = {{Estimating Outpatient Visit Prices from Hospital Price Transparency Data using Large Language Models}},
  year = {2026},
  eprint = {2611.20261},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.20261},
}
Figure