My AI Assistant: It Knows What I Know! | Built From Scratch
Science & Technology
Introduction
In this article, I will introduce you to my personal AI assistant, which I built to serve as a secondary brain. This innovative assistant allows me to capture and store useful information that I frequently come across on platforms such as LinkedIn and Twitter, ensuring that I no longer have to worry about losing this valuable knowledge. It simplifies the process of storing, retrieving, updating, and deleting information, making it incredibly easy to access what I need, when I need it.
How It Works
The interface of my AI assistant is straightforward and user-friendly. To share information, all I need to do is specify the details I want to store. For instance, if I want to save information about my YouTube channel, I can simply input:
Hey, this is my YouTube channel name which is "Learn with Vu" and here is the link: [your-link-here].
Upon submission, the assistant confirms that the channel name and link have been stored successfully. Under the hood, the assistant converts this information into embeddings and stores them in a vector database, in this case, Chroma.
Retrieving Information
Retrieving the information is just as easy. I can ask:
Hey, get me my YouTube channel link.
The assistant will once again convert the request into embeddings and fetch the relevant information, producing an accurate response, complete with a clickable link.
Updating Information
Updating stored information is also a simple process. If I need to change my YouTube channel name, I can just say:
Hey, I have changed my YouTube channel name now it is "Learn with Vishnu."
The assistant will prompt for confirmation and proceed to update the details accordingly.
Deleting Information
Deleting information is equally straightforward. I can request:
Delete my YouTube channel details.
The assistant will confirm the details before deletion and, upon my approval, will remove them from memory.
Architecture Overview
The architecture of my AI assistant is designed to be efficient and easy to understand. It consists of four primary tools:
- Add Information Tool: Stores information in the vector database after converting it to embeddings.
- Retrieve Information Tool: Converts user queries into embeddings to fetch relevant documents from the database.
- Delete Information Tool: Retrieves data to confirm deletion before removing it from the database.
- Update Information Tool: Similar to the delete function, it fetches currently stored data for updating after user confirmation.
Setting Up the Project
If you're interested in setting up your own version of this project, it’s quite simple! Here’s a step-by-step guide:
- Visit my GitHub repository (link available in the video description).
- Clone the project using Git or download it as a zip file.
- Create an
.env
file and add your API keys. - Run
Docker compose up
to launch the application. - Navigate to
localhost
in your web browser to start interacting with your new AI assistant!
This is how you can effectively store, retrieve, update, and delete important information using a simple AI agent. Thanks for reading!
Keywords
- AI Assistant
- Information Storage
- Vector Database
- Embeddings
- Updating Information
- Deleting Information
- GitHub Repository
- Docker Compose
FAQ
1. What is an AI assistant?
An AI assistant is a software application that uses artificial intelligence to help users manage tasks, store information, and retrieve data efficiently.
2. How do I input information into the AI assistant?
You simply need to provide details in a structured sentence format, and the assistant will store the information for you.
3. Can I retrieve multiple pieces of information at once?
Currently, the assistant is designed for single queries, but you can input multiple queries sequentially.
4. What happens if I change the information I've inputted?
You can easily update any stored information by providing the new details, and the assistant will prompt you for confirmation before proceeding.
5. How can I delete the information I no longer need?
You can request the assistant to delete specific details, and it will confirm before proceeding with the deletion.