/AI_research_assistant

This is AI Research Assistant repository using Gen AI and RAG model. This AI Research Assistant app is powered by Google Gemini. It helps in question answering about the provided research paper by uploading them through Streamlit, we save it in the Data folder and clean the document, index it by using Llamma-Index using Gemini Embedding Model.

Primary LanguageJupyter Notebook

AI_research_assistant Project

Table of Contents

About The Project

Welcome to the AI Research Assistant repository. This AI Research Assistant app is powered by Google Gemini. It helps in question answering about the provided research paper by uploading them through Streamlit, we save it in the Data folder and clean the document, index it by using Llamma-Index using Gemini Embedding Model. The created index is the upserted into Pinecone Vector DB. The query function in the data_querying module will retrieve the vectors from Pinecone Vector DB and use that for generating response by embedding a basic prompt in it.

For MLOPs tools:

I have used Github Actions for implementing CI/CD pipeline and AWS ECR for container registry of The Docker container and AWS EC2 for hosting it.

Tech Stack

  • Python
  • LlamaIndex
  • Google Gemini
  • Streamlit
  • Pinecone
  • Docker
  • Github Actions
  • AWS ECR
  • AWS EC2

Images

Main Page : image

Page when querying and uploading pdf :

  1. image

  2. image

  • image

Working with the code

I have commented most of the neccesary information in the respective files.

To run this project locally, please follow these steps:-

  1. Clone the repository:

    git clone https://github.com/Rajarshi12321/AI_research_assistant.git
  2. Create a Virtual Environment (Optional but recommended) It's a good practice to create a virtual environment to manage project dependencies. Run the following command:

    conda create -p <Environment_Name> python==<python version> -y

    Example:

    conda create -p venv python=3.9 -y 

    Note:

    • It is important to use python=3.9 for proper use of LlamaIndex or else you would get unexpecterd errors
  3. Activate the Virtual Environment (Optional) Activate the virtual environment based on your operating system:

    conda activate <Environment_Name>/

    Example:

    conda activate venv/
  4. Install Dependencies

    • Navigate to the project directory:
      cd [project_directory]
      
    • Run the following command to install project dependencies:
      pip install -r requirements.txt
      

    Ensure you have Python installed on your system (Python 3.9 or higher is recommended).
    Once the dependencies are installed, you're ready to use the project.

  5. Create a .env file in the root directory and add your Pinecone credentials as follows:

    PINECONE_API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    GEMINI_API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

    Get your gemini api for it.
    For pinecone create an index with name ai-research-assistant with 768 dimensions

  6. Run the Flask app: Execute the following code in your terminal.

    streamlit run app.py 
  7. Access the app: Open your web browser and navigate to http://localhost:8501/ to use the House Price Prediction and Property Recommendation app.

Contributing

I welcome contributions to improve the functionality and performance of the app. If you'd like to contribute, please follow these guidelines:

  1. Fork the repository and create a new branch for your feature or bug fix.

  2. Make your changes and ensure that the code is well-documented.

  3. Test your changes thoroughly to maintain app reliability.

  4. Create a pull request, detailing the purpose and changes made in your contribution.

Contact

Rajarshi Roy - royrajarshi0123@gmail.com

License

This project is licensed under the MIT License. Feel free to modify and distribute it as per the terms of the license.

I hope this README provides you with the necessary information to get started with the road to Generative AI with Google Gemini and LlamaIndex.