Hello, Can you help me improve a prompt?
- User
Hello, Can you help me improve a prompt?
Assistant
I can definitely help you with that! To give you the best advice, could you please share the prompt you'd like to improve and tell me what you're hoping to achieve with it?
- User
I am using the following prompt to predict emotions from a set of blendshapes, but the model is only able to detect one emotion from it, how can I add context to enable the model to detect all the emotions? the prompt is "Predict one emotion (Happy, Sad, Other) from the ARKit face blendshape values provided between the brackets:({blendshapes}). Respond with only one word."
Assistant
You're right, the way your current prompt is structured limits the model to identifying only one emotion. To allow the model to detect multiple emotions, you need to adjust the prompt to provide more context about the task and the expected output format.Here are a few ways you can improve your prompt:Option 1: Requesting a list of emotions:"Predict all applicable emotions (Happy, Sad, Angry, Fear, Surprise, Disgust, Neutral, Other) from the ARKit face blendshape values provided between the brackets:({blendshapes}). Respond with a comma-separated list of emotions." Option 2: Asking for a specific emotion for each potential feeling:"Based on the ARKit face blendshape values:({blendshapes}), indicate which of the following emotions are present (yes/no for each): Happy, Sad, Angry, Fear, Surprise, Disgust, Neutral. If none of these apply, indicate 'Other'." Option 3: Providing a more descriptive task:"Analyze the following ARKit face blendshape values:({blendshapes}). Identify all emotions that are strongly indicated by these values from the following list: Happy, Sad, Angry, Fear, Surprise, Disgust, Neutral. If the blendshapes suggest an emotion not in this list, you can also include 'Other'." Key improvements in these options:Explicitly asks for all applicable emotions: Instead of just "one emotion."Provides a broader list of potential emotions: This gives the model more context about the possible categories. You can adjust this list based on the specific emotions you expect to be detectable from ARKit blendshapes. I've included common basic emotions.Specifies the desired output format: This helps the model structure its response correctly (e.g., comma-separated list, yes/no answers).To help me tailor the prompt even further, could you tell me:What is the complete list of emotions you'd like the model to be able to detect?Do you have a preferred output format? (e.g., a simple list, a dictionary-like structure, etc.)Once I have this information, I can help you refine the prompt even more effectively.
- User
That is not what I am looking for, but the accuracy of detection of the emotions from the blendshapes is 16 percent and only detecting happiness, so how can I explain the emotions for the LLM so it can predict all the three classes, happy, sad and other?
Assistant
You're right, simply asking the model to predict might not be enough if it doesn't understand what each emotion looks like in terms of blendshape values. You need to provide the LLM with a clearer definition or explanation of each emotion in the context of blendshapes.Here's how you can modify your prompt to include explanations for each emotion:"Predict one emotion (Happy, Sad, Other) from the ARKit face blendshape values provided between the brackets:({blendshapes}). Consider the following explanations:
- Happy: Typically involves raised cheeks (OuterBrowUp, InnerBrowUp), widened eyes (EyeSquint), and an upward curve of the mouth (LipCornerPull).
- Sad: Often includes lowered inner eyebrows (InnerBrowDown), possibly a downturned mouth (LipCornerDepressor), and possibly slightly narrowed eyes (EyeSquint, but less intense than for happiness).
- Other: This category includes any facial expression that doesn't clearly fit the descriptions of Happy or Sad. This could involve neutral expressions, or other emotions like surprise (raised eyebrows, widened eyes, open mouth), anger (lowered brows, tightened lips), or disgust (raised upper lip, wrinkled nose), among others. If the blendshapes don't strongly suggest happiness or sadness, classify it as Other.
Respond with only one word." Explanation of the changes:Added explicit explanations: I've included a section defining what blendshape movements might indicate "Happy" and "Sad" emotions based on typical facial expressions.Defined "Other" as a catch-all: This helps the model understand when to classify the input as something other than the two primary emotions.Kept the output format constraint: The prompt still asks for a single-word response.Further improvements you could consider:Being more specific with blendshape names: If you know the exact names of the blendshapes in ARKit that correspond to these movements (e.g., cheekPuff, eyeBlinkLeft, mouthSmileLeft), you can use those for even more precision. You can refer to Apple's documentation on ARKit blendshapes.Providing example blendshape values: If you have example sets of blendshape values that correspond to each emotion, you could include a few examples in your prompt. However, be mindful of the prompt length limits of the LLM you are using.Adjusting the emotion categories: If you need to detect more specific emotions later, you can expand this prompt with explanations for those as well.Try using this updated prompt with your blendshape data and see if the accuracy for "Sad" and "Other" improves. Remember that the success will also depend on the LLM you are using and how well your blendshape data aligns with these general descriptions.