## 2 Methodology
### Data Preprocessing  
To ensure dataset quality and consistency, we conducted data preprocessing steps, including text cleaning, anonymization, and standardization by removing stop words and applying a hybrid approach of stemming and lemmatization. These steps were crucial to remove any personally identifiable information, resolve inconsistencies in the data format, and prepare the dataset for input into the LLMs [19]. In our research, we categorize the dataset into two primary types: raw and clean data. Raw data refers to the dataset in its original form, without undergoing any preprocessing. On the other hand, clean data, as the term suggests, involves refining the text through various preprocessing steps to enhance its quality and consistency. These steps include removing stop words to reduce noise in the text, correcting encoding mismatches or corruptions (e.g., removing characters like \"\(\hat{l}_{1}\)\(\hat{l}_{2}\)\"\(\hat{l}_{3}\)\"\(\hat{l}_{4}\)\"), and standardizing mathematical symbols for uniformity. For example, inconsistent representations such as \"16\(\geq\)\" and \"=\(<\)16\" in different rows are unified to a single format, \"=\(<\)16\". Furthermore, in addressing gender criteria, variations such as \"women\", \"a pregnant person\", or \"Female\" are standardized to \"female\" to maintain consistency across the dataset. Our preprocessing methodology employs a context-sensitive hybrid approach of stemming and lemmatization to reduce token variability while ensuring linguistic consistency. Rather than applying these techniques uniformly, we strategically implemented them based on the nature of the text segments being processed. For sections containing medical terminology (e.g., rheumatoid arthritis, nephritis, thrombosis), lemmatization was preferred to preserve the precise meaning of these terms. Examples include the following: \"Patients with thromboses\" was transformed to \"Patients with thrombosis\" and \"Diagnosed with nephropathies\" was converted to \"Diagnosed with nephropathy\". This ensures that words retain their medically relevant base form, preventing unintended distortions that could arise from stemming. Conversely, for common eligibility criteria or exclusion terms (e.g., \"patients must\", \"requirement of\"), stemming was applied to standardize word forms where semantic precision was less critical. Examples include the following: \"treated\" reduced to \"treat\", \"evaluations\" to \"evalu\", and \"conditions\" to \"condit\". This balanced approach leverages both the efficiency of stemming (reducing computational complexity and vocabulary size) and the accuracy of lemmatization (ensuring grammatically significant words or ambiguous root forms are converted into their correct dictionary forms). For instance, while stemming quickly reduces variability, lemmatization handles irregular forms more accurately. To ensure the correctness and consistency of our preprocessing steps, we manually reviewed the processed data against the original text as ground truth validation. This verification process confirmed that key medical terms remained accurate and unaltered in their intended context, stemming did not compromise readability or meaning in general descriptive criteria, and the processed text accurately reflected the original information while maintaining linguistic consistency. By reducing variability while respecting the contextual needs of different text segments, this hybrid method minimizes data sparsity and improves the quality of the preprocessed data for subsequent analysis. However, recognizing the critical importance of clinical terminology accuracy, we implemented a human validation process to ensure that no essential medical terms were lost during preprocessing. Our validation methodology involved a comparison between raw and preprocessed (clean) data, where human evaluators meticulously reviewed and confirmed that critical medical terms, such as \"platelets count\", \"white blood cell count\", and other key patient attributes, remained intact.