Skip to main content
Loading navigation
Back to prompt library

DSPy Prompt Optimization for Empathy

Linked challenge: Ethical AI Companion Framework

Prompt source

implementation1 lines1 sectionsNo variables0 checklist items
Use DSPy to create a signature for generating empathetic responses with Gemini 2.5 Pro. Apply this signature to optimize the 'Conversationalist' agent's ability to respond to user statements of distress or sadness, ensuring the responses are deeply empathetic and avoid generic phrases. Run a test where the companion responds to a user expressing emotional vulnerability, demonstrating the DSPy-enhanced empathy.