SubmissionNumber#=%=#251 FinalPaperTitle#=%=#SU-FMI at SemEval-2024 Task 5: From BERT Fine-Tuning to LLM Prompt Engineering - Approaches in Legal Argument Reasoning ShortPaperTitle#=%=# NumberOfPages#=%=#7 CopyrightSigned#=%=#Kristiyan Krumov JobTitle#==# Organization#==#Faculty of Mathematics and Informatics, Sofia University, Bulgaria Abstract#==#This paper presents our approach and findings for SemEval-2024 Task 5, focusing on legal argument reasoning. We explored the effectiveness of fine-tuning pre-trained BERT models and the innovative application of large language models (LLMs) through prompt engineering in the context of legal texts. Our methodology involved a combination of techniques to address the challenges posed by legal language processing, including handling long texts and optimizing natural language understanding (NLU) capabilities for the legal domain. Our contributions were validated by achieving a third-place ranking on the SemEval 2024 Task 5 Leaderboard. The results underscore the potential of LLMs and prompt engineering in enhancing legal reasoning tasks, offering insights into the evolving landscape of NLU technologies within the legal field. Author{1}{Firstname}#=%=#Kristiyan Boyanov Author{1}{Lastname}#=%=#Krumov Author{1}{Username}#=%=#kristiyan.boyanov Author{1}{Email}#=%=#kristiyan.boyanov@gmail.com Author{1}{Affiliation}#=%=#FMI, Sofia University Author{2}{Firstname}#=%=#Svetla Author{2}{Lastname}#=%=#Boytcheva Author{2}{Username}#=%=#sboytcheva Author{2}{Email}#=%=#svetla.boytcheva@gmail.com Author{2}{Affiliation}#=%=#Ontotext Author{3}{Firstname}#=%=#Ivan Author{3}{Lastname}#=%=#Koytchev Author{3}{Email}#=%=#koychev@fmi.uni-sofia.bg Author{3}{Affiliation}#=%=#FMI, Sofia University ========== èéáğö