#Hi, I am having issues setting up an agent in Eleven Labs conversational AI. The LLM input used doe
1 messages · Page 1 of 1 (latest)
To ensure the LLM retains the sessionId and follows your API reference properly, you can achieve this by carefully crafting the System Prompt and providing a clear Knowledge Base. Here are some steps to guide you:
1. System Prompt Configuration
The system prompt is critical in defining the behavior of the LLM. You can include instructions in the prompt to ensure the LLM retains the sessionId and adheres to your API specifications. For example:
You are an API assistant. Always retain the
sessionIdprovided at the start of the conversation and include it in all subsequent API requests. Follow the API reference strictly, ensuring all requests are formatted correctly. If you encounter an error, log it and retry the request.
2. Knowledge Base Setup
If your API reference is not inherently understood by the LLM, you can upload it as part of the Knowledge Base. This will provide the LLM with the necessary context to format requests correctly. Non-enterprise users can upload up to 5 files or links, with a total limit of 20MB and 300,000 characters.
3. Testing and Debugging
- Use the Call History feature in the dashboard to review the conversation logs and ensure the LLM is retaining the
sessionIdand formatting requests correctly. - If the issue persists, consider testing with different LLMs (e.g., OpenAI, Anthropic, or Google) to find one that better suits your use case.
4. Custom Error Handling
If your API encounters errors, you can implement custom error handling in the LLM's behavior. For example, instruct the LLM to retry the request or provide a fallback response to the user.
If you need further assistance, feel free to provide more details about your setup or the specific issues you're encountering!
The main problem we have is that the LLM tool in Eleven Labs' agent does not send the request to our API but instead tries to answer itself. How do we instruct the System Prompt to prevent that from happening ALWAYS AND FOREVER ?
To ensure the LLM in ElevenLabs' Conversational AI consistently sends requests to your API instead of attempting to answer on its own, you can configure the System Prompt to explicitly instruct the agent to defer to your API for responses. Here's how you can approach it:
-
Customize the System Prompt: Clearly define the agent's behavior in the System Prompt. For example:
You are an API assistant. For every user query, you must send an HTTP request to the specified API endpoint using the provided sessionId and return the API's response verbatim. Do not attempt to answer the query yourself under any circumstances. -
Include Specific Instructions: Add details about how the agent should handle the sessionId and API reference. For example:
Always include the sessionId in the request header or body as required by the API. Follow the API reference strictly for formatting and parameters. If the sessionId is missing or invalid, inform the user to provide a valid sessionId. -
Test and Iterate: After setting up the System Prompt, test the agent's behavior to ensure it adheres to the instructions. If it still deviates, refine the prompt further to make the instructions more explicit.
If you continue to face issues, you may need to explore additional configurations or consult the API documentation for further guidance on integrating your API with the agent.
We keep having issues with the LLM from Eleven labs agent responding, instead of our tool that we instruct to use.