Enterprise Knowledge Assistant is built with Amazon Bedrock, OpenSearch Serverless, and S3 using Retrieval Augmented Generation (RAG) architecture. π Project Overview
This project demonstrates how to build an Enterprise Knowledge Assistant using Retrieval Augmented Generation (RAG) architecture with Amazon Bedrock, Amazon S3, and Amazon OpenSearch Serverless.
The system enables users to query enterprise documents using natural language, retrieving relevant information from internal documents and generating intelligent responses using foundation models.
Instead of relying only on pre-trained model knowledge, the assistant retrieves real enterprise data and uses it as context for generating accurate responses.
π§ Key Features
β Build a Generative AI knowledge assistant β Implement Retrieval Augmented Generation (RAG) β Store enterprise documents in Amazon S3 β Convert documents into vector embeddings β Store embeddings in OpenSearch Serverless β Perform a semantic search for relevant information β Generate responses using Amazon Bedrock foundation models
π Architecture
Architecture Flow
1οΈβ£ Upload enterprise documents to Amazon S3
2οΈβ£ Configure Amazon Bedrock Knowledge Base
3οΈβ£ Documents are split into text chunks
4οΈβ£ Chunks are converted into vector embeddings
5οΈβ£ Embeddings are stored in Amazon OpenSearch Serverless
6οΈβ£ User submits a natural language query
7οΈβ£ Relevant document chunks are retrieved using vector similarity search
8οΈβ£ Amazon Bedrock foundation model generates the final response
π§° AWS Services Used βοΈ Amazon S3
Object storage used to store enterprise documents.
Features:
Highly scalable storage
Stores files as objects in buckets
Maximum object size: 5 TB
π€ Amazon Bedrock
Fully managed service that provides access to foundation models (FMs).
Used in this project for:
Creating the Knowledge Base
Generating embeddings
Producing AI responses from queries
Models used:
Amazon Titan Embeddings
Amazon Nova Lite
π Amazon OpenSearch Serverless
OpenSearch Serverless acts as the vector database.
Responsibilities:
Store vector embeddings
Perform similarity search
Retrieve relevant document chunks
Supported vector similarity metrics:
Cosine similarity
Euclidean distance
Dot product
π Core AI Concepts Implemented Vector Embeddings
Embeddings convert text into numerical vectors that represent semantic meaning.
Example:
"Increase quarterly revenue"
β vector representation
This allows the system to perform semantic similarity search instead of keyword search.
Retrieval Augmented Generation (RAG)
RAG combines:
Information Retrieval + Large Language Models
Workflow:
User query β converted into vector
Vector database retrieves relevant document chunks
Retrieved content is passed to the LLM
LLM generates a contextual answer
Benefits:
More accurate responses
Reduced hallucination
Ability to use proprietary enterprise data
π Project Structure
aws-bedrock-enterprise-knowledge-assistant β βββ README.md β βββ architecture β βββ architecture-diagram.png β βββ documentation β βββ project-overview.md β βββ aws-services-used.md β βββ rag-explained.md β βββ guide β βββ step-by-step-lab-guide.md β βββ metadata β βββ metadata-example.json β βββ lab-files β βββ sales-details.csv β βββ sales-report.pdf β βββ screenshot
β Implementation Steps Step 1 β Upload Documents
Upload enterprise documents to Amazon S3 buckets
Example:
sales-data sales-reports
Step 2 β Enable Bedrock Models
Enable foundation models in the Amazon Bedrock console
Models used:
Amazon Titan Embeddings
Amazon Nova Lite
Step 3 β Create Knowledge Base
Create a Bedrock Knowledge Base named:
Sales KB
Step 4 β Configure Vector Store
Configure Amazon OpenSearch Serverless as the vector store.
Collection type:
Vector Search
Step 5 β Add Data Sources
Add two data sources to the knowledge base:
Data Source Description sales-data Sales CSV data sales-reports Sales report PDF Step 6 β Sync Data Sources
During synchronization:
Documents are processed
Text is chunked
Embeddings are generated
Embeddings are stored in OpenSearch
Step 7 β Test Knowledge Base
Example query:
How can the sales team improve performance?
The system retrieves relevant document chunks and generates a contextual response.
π§ͺ Validation Criteria
The project validation checks:
β A Bedrock Knowledge Base named Sales KB exists β Two data sources are configured β Both data sources are successfully synced β Documents are ingested into the vector store
πΈ Screenshots
Screenshots included in /screenshots folder:
S3 bucket setup
Bedrock model enablement
Knowledge base configuration
OpenSearch vector store
Data source sync
Query test results
π― Learning Outcomes
This project demonstrates:
β Generative AI application architecture β Vector databases and semantic search β Retrieval Augmented Generation (RAG) β Integration of enterprise data with LLMs β Building AI knowledge assistants using AWS
π Future Improvements
Potential enhancements:
Build a chatbot interface
Integrate with Slack / Microsoft Teams
Automate the document ingestion pipeline
Deploy using AWS Lambda + API Gateway
Add real-time knowledge updates
π¨βπ» Author
Cloud & AI Enthusiast
Focused on:
Cloud Computing βοΈ
Generative AI π€
Machine Learning π
AWS Architecture π