Advanced RAG Filtering and Tagging

Intro

Voiceflow's Knowledge Base (RAG) API allows you to use filters and tags to create more powerful agents. In this recipe, you'll learn how to:

  • Use a feedback card to tags docs based on LLM answers
  • Generate a new doc using “file” upload/tag with user’s question and LLM answer
  • Use KB Upload API to add this newly created doc
  • Use KB Query API with tags filtering
  • Get the best chunk based on “validated” tag and highest score.
  • Reduce token usage by avoid using LLM for validated answers
  • Limit hallucinations and return same validated answers each time

YouTube video

Try yourself

Try the template yourself! . Import into your project.