Background
In light of the rapid expansion of hospital operations and the increasing digitization of medical data, there is a pressing need for efficient and intelligent methods to process and analyze large-scale medical data.
Methods
To tackle these challenges, the study integrates the QLoRA algorithm with ChatGLM2-6b and Llama2-6b models. These models undergo fine-tuning on a local SQL dataset, with a specific emphasis on optimizing performance, especially for simpler queries. Subsequently, we employ Prompt-Engineering with ChatGPT-3.5, enabling us to effectively leverage its capabilities and tailor its outputs to execute SQL queries.
Results
The comprehensive big data platform illustrates the evolution of inpatient operations, encompassing diverse information such as patient diagnoses, surgeries, medications, and examinations across various healthcare domains. The integration of the QLoRA algorithm with ChatGLM2-6b and Llama2-6b models, combined with fine-tuning on a local SQL dataset, enhances the model's performance on simple and moderately difficult SQL queries. Notably, after minimal training, the ChatGPT3.5 model closely approximates the results of human engineers in terms of SQL query performance, achieving an accuracy of approximately 90%.
Conclusion
The strategic utilization of Large Language Models (LLMs) and Natural Language to SQL (NL2SQL) generation enhances the efficiency of medical data analysis. This approach provides a robust foundation for decision-making in hospital management amid the evolving landscape of healthcare operations and data queries.