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.
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.
-
Clone the repository:
git clone https://github.com/rsharvesh16/RAG-App-AWS.git cd RAG-App-AWS
-
Install the required Python packages:
pip install -r requirements.txt
-
Ensure your AWS credentials are set up correctly to access AWS Bedrock services.
app.py
: The main script to run the Streamlit app.
-
Place your PDF files in the
data/
directory. -
Run the Streamlit app:
streamlit run app.py
-
Open your browser and go to the URL provided by Streamlit (usually http://localhost:8501).
- The script uses AWS Bedrock services, so make sure your AWS credentials are properly configured.
- Run the Streamlit app.
- Upload Your PDF Document first which has text.
- In the sidebar, click "Vectors Update" to process the PDF files.
- Ask a question in the main interface and click "Llama3 Output" or "Mistral Output" or "Amazon Titan Text Output" to get the answer.
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.