Empathetic Language in LLMs under Prompt Engineering: A Comparative Study in the Legal Field

Yifan Zhang, Christopher Radishian, Sabine Brunswicker, Dan Whitenack, Daniel W. Linna

Research output: Contribution to journalConference articlepeer-review

4 Scopus citations

Abstract

The demand for empathetic conversations increases with conversational AIs' rise and exponentially spreading applications. In areas like law and healthcare, where professional and empathetic conversations are essential, conversational AIs must strive to retain the correctness of information and logic while improving on empathetic language use. When addressing such an issue, we focus on linguistic empathy, relating only to syntactic and rhetoric choices in language while disregarding the emotional aspect of influence. By performing this study, we are interested in finding whether current open-sourced Large Language Models (LLMs) can match human experts in the legal field by using empathetic language while not compromising facts and logic in responses. We compare responses from three open-sourced LLMs under four prompting strategies with the expert responses. In the comparison, we use metrics from three aspects: text and semantic similarity, factual consistency, and ten rules of linguistic empathy from previous research literature. After statistical tests, the comparison results show that language models can use empathetic language without compromising the default knowledge base of LLMs when properly prompt-engineered. To accomplish this, additional domain knowledge is still needed to match factually. The data supporting this study is publicly available at huggingface.co/datasets/RCODI/empathy-prompt and code is available at github.com/RCODI-ConversationalAI/Empathy-Prompt.

Original languageEnglish (US)
Pages (from-to)308-317
Number of pages10
JournalProcedia Computer Science
Volume244
DOIs
StatePublished - 2024
Event6th International Conference on AI in Computational Linguistics, ACLing 2024 - Hybrid, Dubai, United Arab Emirates
Duration: Sep 21 2024Sep 22 2024

Keywords

  • Empathetic Response
  • Human-AI Interaction
  • LLM

ASJC Scopus subject areas

  • General Computer Science

Fingerprint

Dive into the research topics of 'Empathetic Language in LLMs under Prompt Engineering: A Comparative Study in the Legal Field'. Together they form a unique fingerprint.

Cite this