This project is a cloud-based, AI-powered chatbot designed to deliver concise news summaries tailored to user queries. The chatbot leverages serverless technologies and advanced machine learning models to fetch, process, and summarize news articles in real time.
The overwhelming volume of online news makes it challenging for users to find relevant information efficiently. This chatbot addresses the issue by automating the retrieval and summarization of news articles based on user queries, providing a user-friendly and accessible solution.
- AI-Powered Chatbot: Uses cloud technologies for real-time news summaries.
- Serverless Architecture: Ensures scalability and cost efficiency.
- Accessible: Available via any modern web browser.
- Query Input: User submits a query through a web interface.
- API Gateway: Triggers AWS Lambda.
- AWS Lambda: Extracts keywords and fetches articles using NewsAPI.
- AWS Bedrock: Processes and summarizes articles using ML models.
- S3 Storage: Stores processed data for easy retrieval.
- Response: Chatbot returns a concise summary.
- Real-time news retrieval using NewsAPI.
- Summarization with state-of-the-art machine learning models.
- Fully serverless architecture for scalability.
- Supports multiple categories and countries.
- Accessible through any web browser.
- AmazonAPIGatewayAdministrator: Manage API Gateway configurations.
- AmazonAPIGatewayInvokeFullAccess: Allows invoking deployed APIs.
- AmazonAPIGatewayPushToCloudWatchLogs: Pushes API logs to CloudWatch.
- AWSLambdaBasicExecutionRole: Logs Lambda function activity to CloudWatch.
- AWSLambdaS3ExecutionRole: Access permissions for reading/writing to S3.
- AWSLambdaRoleWithSNS: Triggers and communicates with SNS if required.
- AmazonS3FullAccess: Grants full read/write permissions for buckets.
- Bucket-Specific Policy: Restrict access to specific resources:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject" ], "Resource": "arn:aws:s3:::<your-bucket-name>/*" } ] }
- Real-time news retrieval using NewsAPI.
- Summarization with state-of-the-art machine learning models.
- Fully serverless architecture for scalability.
- Supports multiple categories and countries.
- Accessible through any web browser.
- API Gateway: Manages HTTP requests and triggers workflows.
- AWS Lambda: Serverless compute for event handling.
- S3 Storage: Stores raw and processed news articles.
- AWS Bedrock: Executes large language models for summarization.
- CloudWatch: Logs system activity for debugging.
- Amazon SageMaker: Manages ML models and performs summarization.
- ECR (Elastic Container Registry): Stores Docker images for SageMaker.
- Model Used:
us.meta.llama3-2-90b-instruct-v1:0. - Query Format:
"query: {Query} Answer in 150 words. context: {context}". - Languages: Python for backend, HTML/CSS/JavaScript for frontend.
- Development Tools: Visual Studio Code, AWS Console.
- Slow execution with early models (~3 minutes per query).
- API Gateway timeout (30 seconds).
- Inefficient handling of larger ML models.
- Shifted to AWS Bedrock for faster inference (23 seconds).
- Eliminated dependency on local compute/storage using cloud-native solutions.
- Integrate additional data sources for enriched context.
- Optimize the pipeline to reduce costs further.
- Enable logging features for chat history using DynamoDB.
- Deploy on messaging platforms like WhatsApp.
- Improve frontend design and user experience.
- Mitigate AI hallucinations by validating model outputs.
GitHub: AWS-News-Conversational-Chat-Bot