#simulate_conversation is bringing none in rag
1 messages · Page 1 of 1 (latest)
AI-generated Answer for jvini6832
Short answer: rag_retrieval_info is null when no RAG retrieval occurred on that turn. In simulate_conversation you’ll only see rag_retrieval_info populated if the agent actually retrieved chunks from the knowledge base for that message. The API schema shows rag_retrieval_info includes chunks, embedding_model, retrieval_query, and rag_latency_secs; otherwise it may be null. (elevenlabs.io)
Checklist to make RAG populate in simulate_conversation:
- Enable RAG for the agent: in the agent’s Knowledge Base settings toggle Use RAG, or enable it via API in the agent config. (elevenlabs.io)
- Ensure documents are RAG-indexed and eligible:
- Indexing happens automatically after adding docs when RAG is enabled, but you can trigger/inspect indexing with Compute RAG index and RAG index status endpoints. (elevenlabs.io)
- Documents smaller than 500 bytes are not indexed (they’re only used in the prompt), so they won’t produce rag_retrieval_info. (elevenlabs.io)
- Check RAG settings if retrievals are too strict: in Advanced, adjust Maximum document chunks and Maximum vector distance so relevant chunks can be returned. Overly tight settings can yield no retrievals. (elevenlabs.io)
- Ask a KB-relevant question in the simulation: craft the simulated_user_config prompt (or use partial_conversation_history) so the user’s message clearly targets content in your knowledge base; otherwise RAG won’t trigger and rag_retrieval_info will remain null. (elevenlabs.io)
- Verify you’re hitting the correct endpoint and inspect the returned turn objects for rag_retrieval_info on the turns where retrieval should occur. (elevenlabs.io)
References:
- Simulate Conversations guide (example showing rag_retrieval_info: null; Pro Tips) (elevenlabs.io)
- Simulate conversation API reference (response shape) (elevenlabs.io)
- Test/Invocations API (explicit rag_retrieval_info fields: chunks, retrieval_query, rag_latency_secs) (elevenlabs.io)
- RAG docs (enable toggle, indexing behavior, doc size rule, advanced settings) (elevenlabs.io)
- Compute/inspect RAG index endpoints (elevenlabs.io)
If you’ve done all of the above and rag_retrieval_info is still null, please share the agent_id, an example simulated_user_config prompt, and
but, when we test in platoform, always the rag is triggered. Why not in api?