π Welcome to the Personal Knowledge Model (PKM) Project! π
π Discover the Future of Personalized Knowledge!
Our project draws inspiration from Microsoft's recent Recall initiative but takes a unique, user-centric approach. PKM uses advanced, on-device knowledge graph creation and updates, tailored weekly or monthly based on your interests. This ensures you can retrieve anything from your browsing history, search items, and mobile interactions, all at your fingertips!
π‘οΈ Privacy First!
Unlike Microsoft Recall, which may expose user data through LLM inference, our approach guarantees your privacy with on-device knowledge graph operations. Your data never leaves your device, ensuring a fortress of privacy around your personal information.
π§ What We're Building:
Our repository is dedicated to crafting a multi-modal RAG (Retrieval-Augmented Generation) using PDFs and YouTube videos. Think of this project as your gateway to creating a Personal Knowledge Model (PKM). While still in development, our PKM leverages your device's GPU to generate sophisticated knowledge graphs on the fly.
π Current Focus:
For now, our eyes are set on multi-modal RAG applications using static data sources like PDFs and YouTube videos. The exciting part? Our RAG can retrieve relevant text, images, and video frames directly related to your queries!
π Future Vision:
Microsoft recently unveiled GraphRAG, which currently supports CSV and TXT formats. We're aligning with this technology but expanding its capabilities to embrace PDF and video data, making our tool incredibly versatile.
π Open Source Collaboration:
This repository is open for contributions! We're inviting developers and enthusiasts to join us in achieving the PKM vision. Whether you're interested in pushing the boundaries of machine learning or just passionate about privacy-centric technology, your input is invaluable.
π» Static Multi-Modal RAG Application:
Imagine interacting with a system that understands and retrieves information across multiple media types without needing the computational powerhouses typically required for dynamic data processing. That's what we're aiming forβpractical, accessible, and groundbreaking.
2. Basic Architectures for PKM, MMR-PDF (Multi-Modal RAG for PDF) & MMR-Video (Multi-Modal RAG for Video)
- π§ MindsDB OpenAI Endpoint mdb.ai
- 𧩠Langchain
- π₯οΈ Streamlit
- ποΈ FAISS
Here are the code block images for creating custom LLMs and embedding functions using LangChain's chain base class and MDB.ai endpoints. This is one of the trickiest parts of the project.
- Custom LLM function Code:-
- Custom Embedding function Code:-
First, clone the repository to your local machine:
git clone https://github.com/chakka-guna-sekhar-venkata-chennaiah/Mutli-Modal-RAG-ChaBot.git
Change into the repository directory:
cd Mutli-Modal-RAG-ChaBot
Install all the necessary libraries:
python -m pip install -r requirements.txt
Before running the Streamlit application, create a folder named .streamlit
. Inside this folder, create a file named secrets.toml
and add the following code:
api_key='your-minds-api-key'
Launch the Streamlit application:
python -m streamlit run app.py
As mentioned earlier, this repository is built using the Monuments of National Importance PDF and a YouTube video. If you wish to use your own resources, please follow the steps in the available Colab notebooks and replace the FAISS index files accordingly. Feel free to customize app.py
to suit your needs.
Our ultimate goal is to develop a Personalized Knowledge Model (PKM) and a dynamic multi-modal RAG system. This repository serves as a gateway to achieving that vision, and we welcome your support and contributions to help make it a reality.
For Quick Demo, Watch π
Screen.Recording.2024-07-09.at.4.mp4
- Dynamic Multi-Modal RAG Application
- Integration with Real-Time on device data for creating advanced knoweldge graphs
GitHub: chakka-guna-sekhar-venkata-chennaiah
LinkedIn: Chakka Guna Sekhar Venkata Chennaiah
X (formerly Twitter): @codevlogger
Thank you for being a part of our journey to create an advanced, personalized knowledge system! π