Generative artificial intelligence utilizing transformer technology is widely seen as a groundbreaking advancement in applied artificial intelligence. The technology creates a unique opportunity to extract unstructured data from medical notes. In the current experiments, we extracted fundamental sleep parameters from polysomnography notes of veterans in the Corporate Data Warehouse national database using large language models. The "SOLAR-10.7B-Instruct" model extracted values associated with total sleep time, sleep onset latency, and sleep efficiency from the polysomnography notes. The model's performance was evaluated using 464 human annotated notes. The analysis showed close accuracy for the large language model compared to the human total sleep time and sleep efficiency extraction, and a considerable accuracy improvement (7.6%) in extracting sleep onset latency for the machine compared to human annotation. The large language model shows negligible hallucination (no more than 3.6%), and it has the capability to perform complicated reasoning to extract the desired sleep parameter.
Citation: Maghsoudi A, Sharafkhaneh A, Azarian M, Ramezani A, Hirshkowitz M, Razjouyan J. A case study on generative artificial intelligence to extract the fundamental sleep parameters from polysomnography notes. J Clin Sleep Med. 2025;21(6):1123-1127.
Keywords: artificial intelligence; large language model; polysomnography; sleep notes.
© 2025 American Academy of Sleep Medicine.