Skip to content

jeringeorge98/RAG-CHATBOT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

RAG Chatbot in AmazonBedrock

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.

Table of Contents

Used Tools and Concepts:

AWS Amazon Bedrock Amazon S3 Amazon OpenSearch Service

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.

Objectives

I. Use Case 1 – Personalized Q&A Chatbot for thesis

usecase1 usecase_1 2

II. Use Case 2 – Financial News Updates

usecase_2

Workflow

  1. 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.
  2. Create a Knowledge Base - Created a Knowledge Base in Amazon Bedrock to enable retrieval-based AI responses.
  3. 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.
  4. Configure Vector Store - Used OpenSearch Serverless for vector-based search, allowing efficient retrieval of relevant information.
  5. 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.

Document

Please Refer this [document] ([https://drive.google.com/file/d/1Nm5JMvoH9CSqL7z9ewsExFF0sdbxUmBq/view?usp=sharing]) to see more details.

About

This is an architecthural and a system doc showcasing the use of RAG to build chatbots trained on data from S3/web crawlers . Used Amazon Bedrock,OpenSearchServerless

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors