Mirascope Frog Logo
Mirascope
DocsBlogPricingCloud
⌘K
Type to search
⌘Kto search
Escto close
mirascope
v1.25.7
1.3k
Join our
Docs v1 (legacy)API ReferenceGuidesDocs
Overview
Getting Started
QuickstartStructured OutputsDynamic Configuration & ChainingTools & Agents
Agents
Web Search AgentAgent Executor: Blog WritingDocumentation AgentLocal Chat with CodebaseLocalized AgentQwant Search Agent with SourcesGenerate SQL with LLM
More Advanced
Code Generation and ExecutionDocument SegmentationExtracting from PDFExtraction using VisionGenerate Captions for an ImageGenerate Synthetic DataLLM Validation With RetriesNamed Entity Recognitiono1 Style ThinkingPII ScrubbingQuery PlanRemoving Semantic DuplicatesSearch with SourcesTranscribing SpeechSupport Ticket RoutingText ClassificationText SummarizationText TranslationKnowledge Graph
Prompt Engineering
Self-AskPlan and SolveContrastive Chain of ThoughtTabular Chain of ThoughtChain of ThoughtThread of ThoughtRereadingEmotion PromptingRephrase and RespondCommon Phrases (Prompt Mining)Role Prompting
Evaluations
Evaluating Documentation AgentEvaluating Web Search Agent with LLMEvaluating Generating SQL with LLM
Langgraph Vs Mirascope
LangGraph Quickstart using Mirascope
# Emotion Prompting [Emotion Prompting](https://arxiv.org/pdf/2307.11760) is a prompt engineering technique where you end your original prompt with a phrase of psychological importance. It is most helpful for open ended tasks, but can still improve some analytical prompts: <Info title="Mirascope Concepts Used" collapsible={true} defaultOpen={false}> <ul> <li><a href="/docs/v1/learn/prompts/">Prompts</a></li> <li><a href="/docs/v1/learn/calls/">Calls</a></li> </ul> </Info> ```python from mirascope.core import openai, prompt_template emotion_augment = "This is very important to my career." @openai.call(model="gpt-4o-mini") @prompt_template("{query} {emotion_augment}") def call(query: str, emotion_prompt: bool = False) -> openai.OpenAIDynamicConfig: return { "computed_fields": { "emotion_augment": emotion_augment if emotion_prompt else "", } } prompt = """Write me an email I can send to my boss about how I need to take a day off for mental health reasons.""" print(call(query=prompt, emotion_prompt=True)) ``` Subject: Request for a Day Off Dear [Boss's Name], I hope this message finds you well. I am writing to formally request a day off for mental health reasons on [specific date]. I believe taking this time will allow me to recharge and return to work with renewed focus and energy. I understand the importance of maintaining productivity and teamwork, and I will ensure that any pressing tasks are managed before my absence. I will also make sure to communicate with the team so that there are no disruptions. Thank you for your understanding and support regarding my request. I’m committed to maintaining my well-being, which ultimately contributes to my overall performance and our team's success. Best regards, [Your Name] [Your Position] [Your Contact Information] This example demonstrates how to implement emotion prompting using Mirascope. The `emotion_augment` variable contains the emotional phrase that will be added to the end of the prompt when `emotion_prompt` is set to `True`. ## Benefits of Emotion Prompting 1. **Increased Engagement**: Adding emotional context can make the LLM's responses more empathetic and engaging. 2. **Improved Relevance**: Emotional prompts can help guide the LLM to provide responses that are more relevant to the user's emotional state or needs. 3. **Enhanced Creativity**: For open-ended tasks, emotion prompting can lead to more creative and nuanced responses. 4. **Better Problem Solving**: In some cases, emotion prompting can help the LLM focus on more critical aspects of a problem or question. <Info title="Effective Emotion Prompting"> <ul> <li><strong>Choose Appropriate Emotions</strong>: Select emotional phrases that are relevant to the context of your query.</li> <li><strong>Be Authentic</strong>: Use emotional prompts that genuinely reflect the importance or emotional weight of the task.</li> <li><strong>Experiment</strong>: Try different emotional phrases to see which produces the best results for your specific use case.</li> <li><strong>Balance</strong>: Be careful not to overuse emotional prompting, as it may not be appropriate for all types of queries.</li> <li><strong>Combine with Other Techniques</strong>: Emotion prompting can be used in conjunction with other prompt engineering techniques for even better results.</li> </ul> </Info> By leveraging emotion prompting, you can guide the LLM to provide responses that are more emotionally attuned and potentially more helpful for tasks that benefit from emotional context.

Provider

On this page

Provider

On this page

© 2026 Mirascope. All rights reserved.

Mirascope® is a registered trademark of Mirascope, Inc. in the U.S.

Privacy PolicyTerms of Use