RAG (Retrieval Augmented Generation) chatbot is an AI-powered chatbot that enhances AI language models by incorporating documentation or/and source URLs as the data source. This technique enables the chatbot to provide accurate and up-to-date responses, even if the required information is the latest or unavailable online. While non-RAG chatbots rely on pre-trained data and may struggle to offer current or specialized knowledge, the RAG chatbots can retrieve information from a specific knowledge base or external sources. This makes RAG chatbots particularly useful for applications, where up-to-date information is critical, such as legal or government updates, product releases, or personalized content.
The AWS services I used in this project were Amazon Bedrock, S3, and OpenSearch Serverless. Key concepts include storing data in S3, adding source URLs through Web Crawler, creating a Knowledge Base, requesting access to AI models, how chatbot generates responses using AI models and Knowledge Base, and utilizing vector stores for efficient retrieval.
I. Use Case 1 – Personalized Q&A Chatbot for thesis
II. Use Case 2 – Financial News Updates
- Add Data Source
- Use Case 1
- Store Data in S3 - Stored relevant documentation in Amazon S3 as the chatbot's data source.
- Use Case 2
- Add Source URLs - Instead of S3, added source URLs as the data source through Web Crawler.
- Use Case 1
- Create a Knowledge Base - Created a Knowledge Base in Amazon Bedrock to enable retrieval-based AI responses.
- Request Access to AI Models - Selected and requested access to specific AI models, enabling the AI models to convert search results into human-like text.
- Configure Vector Store - Used OpenSearch Serverless for vector-based search, allowing efficient retrieval of relevant information.
- Sync Knowledge Base - Synchronized the data from S3 to the Knowledge Base to ensure the following three keys:
- Ingesting: Bedrock takes the data from S3.
- Processing: Bedrock chunks and embeds the data.
- Storing: Bedrock stores the processed data in the vector store (OpenSearch Serverless).
By following these flows, the AI chatbot is transformed into the RAG chatbot, significantly improving its ability to generate informed responses.
Please Refer this [document] ([https://drive.google.com/file/d/1Nm5JMvoH9CSqL7z9ewsExFF0sdbxUmBq/view?usp=sharing]) to see more details.