DSPy Prompt Optimization for Empathy

implementationChallenge

Prompt Content

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.

Try this prompt

Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.

Usage Tips

Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)

Customize placeholder values with your specific requirements and context

For best results, provide clear examples and test different variations