text: **Models**
  For this study, we chose the LLMs Robustly Optimized BERT Approach (RoBERTa; hereafter referred 
  to as LLM 1)43 for saliency content selection and Large Language Model Meta AI 2 (Llama-2; hereafter 
  referred to as LLM 2) 7B44 for abstractive summarization. Further information about the models and 
  technology specifications is provided in detail in eAppendix 1 in Supplement 1. 
  
  **Data Processing**
  As LLM 2 only has a context size of 4096 tokens,44 we used 2 steps to process the EM notes to both 
  shorten the input size while maintaining content salience. First, we adopted a number of heuristic 
  
  strategies for prioritization and filtration: (1) clinical note types (hierarchy presented in Table 1), (2) 
  
  time of authorship, and (3) duplicate sentence detection. Second, we used an LLM 1–based saliency 
  
  model to infer EM note sentences based on likelihood of content contribution to the EM-to-IP 
  
  handoff notes. 
  
  **Model Training and Inference**
  Our summarization model is a fine-tuned decoder-only causal language model based on LLM 2. We 
  
  used different prompts for the separate types of summarization: HPI and EM handoff. Additional 
  
  information about the model training and inference process is provided in eAppendix 1 in 
  
  Supplement 1. 
  
  Using a combination of generative AI powered by our fine-tuned LLM 2 model and a set of 
  
  heuristic rules, our summarization system produced ED handoff notes with various sections for 
  
  downstream clinical tasks. The inference process is shown in the**Figure**. 