Prompt Engineering for EVI | Hume API
Prompt Engineering for EVI
Prompt engineering lets you shape how EVI responds, including its tone, personality, and conversation style. You can tailor its behavior for a wide range of applications, such as mental health support, customer service, and education.
For real-time, conversational voice interactions, Hume’s speech-language models (SLMs) (e.g., hume-evi-3 and hume-evi-3-websearch) can generate both language and speech. For more complex scenarios that involve reasoning, long system prompts, or tool use, supplemental large language models (LLMs) typically perform better.
EVI supports integration with these external models. When configured with a supplemental LLM, your system prompt is sent to that model to guide its response generation. EVI then produces the voice output, using previous audio and language context to determine tone and delivery. You can also prompt EVI during the conversation (for example, “speak faster”) to adjust its behavior in real time.
What Prompts Can (and Can't) Do
While prompting is a powerful tool for customizing EVI’s behavior, it has certain limitations.
What Prompting Can Do:
- Guide EVI’s language generation, response style, response format, and the conversation flow
- Direct EVI to use specific tools at appropriate times
- Influence EVI’s emotional tone and personality
- Help EVI respond appropriately to the user’s expressions and the context
What Prompting Cannot Do:
- Change fundamental characteristics of the voice
- Directly control speech parameters (use in-conversation voice prompts instead)
- Give EVI knowledge of external context
- Override core safety features built into EVI or supplemental LLMs
General Prompting Best Practices
Prompt engineering best practices for LLMs also apply to EVI. Ensure your prompts are clear, detailed, direct, and specific.
Give Few-shot Examples
Use examples to demonstrate how the model should respond. This technique, called few-shot learning, is one of the most effective ways to improve response quality.
Use Sections to Divide Your Prompt
Separating longer prompts into titled sections helps the model distinguish between different instructions and follow prompts more reliably.
EVI-Specific Prompting
While prompting EVI is similar to prompting other LLMs, it differs in two key ways:
- Prompts are designed for voice-based interactions, not text-based.
- EVI responds to emotional cues in the user’s voice, not just their words.
Expressive Prompt Engineering
Expressive prompt engineering refers to guiding the language model on how to interpret and respond to Hume’s expression measures during a conversation.
Personalizing Prompts with Dynamic Variables
Dynamic variables are values within your system prompt which can be changed during a chat.
Latency-Friendly System Prompts
In speech-to-speech experiences, system prompts should be optimized for fast turn-taking.
What Not to Put in the System Prompt
Below are common categories that inflate prompts to 10k+ tokens without delivering proportional gains.
Restricting Web Search to a Domain
Web search is a built-in tool that lets EVI retrieve up-to-date information from the web. You can narrow its focus to a single website by adding an instruction to the system prompt.
Documentation Assistant Example
<use_web_search>
Use your web_search tool to find information from Hume's documentation site.
</use_web_search>
Frequently Asked Questions
Can EVI Use Backchanneling to Avoid Interrupting the User?
Yes, EVI can use conversational backchanneling - brief, encouraging responses that show active listening.
What is the Maximum Length for System Prompts?
The maximum prompt length depends on your language model configuration.
How System Prompts Work with Supplemental LLMs
When using a supplemental LLM, a single system prompt shapes both text and speech generation.