Skip to content

The "Chat with PDF using AWS Bedrock" application is a Retrieval-Augmented Generation (RAG) system that allows users to interact with PDF documents through a chat interface.

License

Notifications You must be signed in to change notification settings

rsharvesh16/RAG-App-AWS

Repository files navigation

RAG - Chat with PDF using AWS Bedrock

image
image

This project demonstrates how to use the AWS Bedrock Titan Embeddings model to generate embeddings, store them in a FAISS vector store, and interact with them using a Streamlit app. You can ask questions about PDF documents, and the app will provide detailed answers using Open-Source LLM models (LLama3, Mistral, Amazon Titan Text) from AWS Bedrock.

Prerequisites

Before you can run this code, ensure you have the following installed:

  • Python 3.7+
  • Required Python packages:
    • boto3
    • streamlit
    • langchain
    • langchain_community
    • numpy
    • faiss-cpu
    • pypdf
    • awscli

You will also need AWS credentials configured to access AWS Bedrock.

Installation

  1. Clone the repository:

    git clone https://github.com/rsharvesh16/RAG-App-AWS.git
    cd RAG-App-AWS
  2. Install the required Python packages:

    pip install -r requirements.txt
  3. Ensure your AWS credentials are set up correctly to access AWS Bedrock services.

Project Structure

  • app.py: The main script to run the Streamlit app.

How to Run

  1. Place your PDF files in the data/ directory.

  2. Run the Streamlit app:

    streamlit run app.py
  3. Open your browser and go to the URL provided by Streamlit (usually http://localhost:8501).

Notes

  • The script uses AWS Bedrock services, so make sure your AWS credentials are properly configured.

Example

  1. Run the Streamlit app.
  2. Upload Your PDF Document first which has text.
  3. In the sidebar, click "Vectors Update" to process the PDF files.
  4. Ask a question in the main interface and click "Llama3 Output" or "Mistral Output" or "Amazon Titan Text Output" to get the answer.

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

About

The "Chat with PDF using AWS Bedrock" application is a Retrieval-Augmented Generation (RAG) system that allows users to interact with PDF documents through a chat interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages