Implement RAG in the bot to use external sources of knowledge

Objective

Enable the bot to consult external documents before responding, using RAG Retrieval Augmented Generation to reduce hallucinations and deliver responses based on real customer data

Description

  • Integrate the bot with a RAG engine

  • Connect to at least one external data source ex Google Drive Notion or internal database

  • Index and update customer documents in a vector store

  • Adjust the bot's flow to

    1 identify intent

    2 search the database for relevant context

    3 generate a response using the retrieved context

Technical scope

  • Choose and configure vector store ex Pinecone Qdrant Chroma or similar

  • Create document ingestion process

    • reading

    • chunking

    • creating embeddings

    • recording in the store vector

  • Create semantic search endpoint that receives the user's question and returns the most relevant snippets

  • Adapt the template prompt to include

    • user question

    • retrieved snippets context

    • instructions to quote only what comes from the base

  • Log returned context questions and generated answer for future analysis

Acceptance criteria

  • Bot responds using information from at least one external source configurable by client

  • If there is no relevant context, the bot responds by stating that it did not find information in the database instead of making it up

  • Acceptable response time of less than X seconds in 90 percent of requests set according to environment

  • Logs clearly show

    • user query

    • documents used in context

    • final response

  • Documents updated at source ...

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board

Agente

Tags

Bot

Date

4 months ago

Author

OTM4

Subscribe to post

Get notified by email when there are changes.