As shown in the previous Teneo release, Retrieval Augmented Generation (RAG) implementation using Azure resources can be built in Teneo in less than 3 steps. In this post, we’ll go through how you can build and publish your Amazon Bedrock RAG bot using Anthropic Claude, Amazon Titan, and Amazon OpenSearch on Teneo.
Step-by-Step Guide to Build a Teneo RAG Bot
Step 1: Lay the Groundwork in AWS Console
Before deploying a Teneo RAG bot using Amazon Bedrock, it is essential for users to establish their own knowledge base, this can be done on Amazon Web Services (AWS) Console. The knowledge base is vital for supplying the necessary data for the bot to generate well-informed responses. On AWS Console, it is crucial to have access to a Large Language Model (LLM), like Amazon Titan, and Anthropic Claude, for generating responses, and a search functionality, such as Amazon OpenSearch, for retrieving data. These elements work in concert to enable the bot to efficiently process information and deliver accurate, contextually appropriate answers. Additionally, be sure to set up IAM rights and record the names of these resources together with their API keys.
Step 2: Build an integration between Amazon Bedrock and Teneo
Here we use a connector and by uploading the client as a resource file, we utilize Global Scripts along with Integrations to create a node that can be used in a Teneo flow. Within this flow, we take the user input and make an API call to the Amazon Bedrock integration, then retrieve the response. This response is then processed by Teneo and delivered back to the user.
Additionally, we are able to implement filters for each user input to prevent users from entering offensive inputs, in addition to stopping Prompt Hacking and Prompt Injection attempts. We can also use Teneo to craft custom filters to block specific words or phrases we don’t want our RAG bot to respond to, enhancing the security and relevance of interactions.
Step 3: Publish and play with your RAG bot
Once we are satisfied with our bot’s performance and are prepared to showcase its capabilities to a broader audience, the next move is to deploy our bot and integrate it into our website. In this case, we have selected Teneo Web Chat as the communication channel. However, this is just one of many possibilities. Teneo provides over 50 open-source connectors on GitHub, including widely used platforms like WhatsApp and Messenger. These connectors offer versatile integration options, making it easy to select the most suitable deployment method for your bot, tailored to your audience’s preferences or your specific communication requirements.