Large Language Models (LLMs) in conversation systems struggle with sensitive topics due to limitations in factual accuracy, diverse perspective modeling, and mutual empathy assessment. To address this, we propose ECHO (Empathetic Conversation for Holistic Optimization). ECHO leverages a Retrieval-Augmented Graph of Thought (GoT) for improved context and reasoning, alongside a Mutual Empathy Assessment (MEA) component to evaluate both expressed empathy from the LLM and perceived empathy from the user. This framework, inspired by research on collaborative empathy, aims to enhance LLM interactions in sensitive conversations.
-
Python packages can be installed with
pip install -r requirements.txt -
OpenAI_API_keyis required for the language model. You can get it from OpenAI.
export OPENAI_API_KEY="sk-******"
-
You can also use the Huggingface API key for the language model. You can get it from Huggingface.
-
You also need to prepare the
GOOGLE_API_KEYfor Google Search API. You can get it from Google Cloud Platform.
export GOOGLE_API_KEY="********"
You can run the ipython notebook named creative.ipynb to generate open-ended creative text with ECHO.
You can also use the following code to start a Gradio interface to interact with ECHO:
python app/gradio_app.pyComming Soon!
Comming Soon!
