Trove of Knowledge (ToK) is a fully local, high-quality, and extensible Retrieval-Augmented Generation (RAG) application that leverages AI models and indices to query documents and generate contextually accurate responses. With ToK, you can upload documents and receive more informed answers tailored to your queries. Additionally, the app automatically stores your chats, allowing you to revisit and continue conversations at any time.
- 📋 Features
- 🛠️ Prerequisites
- 🚀 Getting Started
- 📝 Usage
- 🌟 Visual Tour
- 🛡️ Fully Local, Secure, and Privacy-Focused: ToK ensures that all operations are performed locally, keeping your data private and secure.
- 📂 Versatile Document Uploading: Upload various types of text documents and folders to create an index for more informed AI responses.
- 🏷️ Optional Metadata Assignment: Enhance document uploads with custom metadata, making your data more organized and accessible.
- ⚙️ Comprehensive UI Settings: Easily access and modify important settings like chunking options, temperature, context window size, and chat mode through the user interface.
- ✍️ Custom Prompts: Add and use personalized prompts for both the Large Language Model (LLM) and the chat engine, tailoring responses to your needs.
- 🗂️ Persistent Chats with Titles: Chats are saved with customizable titles, allowing you to revisit and continue them later.
- 📜 Persistent Chat History: Access and review past conversations at any time.
- 🤖 Model Selection from Ollama: Choose and pull AI models directly from Ollama for specific tasks and preferences.
- ⏳ Streaming Responses with Smart Snippets: Experience real-time responses with smart output formatting, especially for code snippets.
- 🔧 Extensible: Easily extend ToK's functionality with additional features or integrations.
To run ToK, you'll need to install two dependencies:
- Ollama: Facilitates easy model downloading, serving, and intelligent device loading. (required)
- Neo4j Desktop: Used for top-tier vector and graph stores. (install if running without docker / with the exe in releases or for research purposes)
- Download and install Neo4j Desktop.
- Add the Neo4j bin path to your system's PATH environment variable. This allows Neo4j to be accessed by ToK.
- Example bin path for Windows:
\path\to\user\.Neo4jDesktop\relate-data\dbmss\your-current-dbms\bin
- Example bin path for Windows:
-
(For Windows) Activate the Neo4j CLI by running the following command in Command Prompt or PowerShell for Windows:
neo4j windows-service install
Please go through this link to perform the above steps for other arch's (and for reference).
You have two main options to run ToK:
- Ensure you have Docker and Docker Compose installed on your machine.
- Clone the repository:
git clone https://github.com/gurveervirk/ToK.git
- Navigate to the directory containing the
docker-compose.yml
file:cd ToK/docker
- Serve Ollama on your local system. (app may serve it automatically)
ollama serve
- Start the application with Docker Compose:
docker-compose up -d
-
Visit the Releases page and download the latest
ToK.exe
to a location/directory (the app creates necessary files and folders for correct working). -
Modify the settings by running the app once and clicking the settings icon at the top right hand corner:
- username: Replace with your Neo4j database username.
- password: Replace with the password you set in your Neo4j project.
- uri: Replace with your Neo4j project's URI.
Note: The default username and URI are the default values for a Neo4j DB. You can also modify it in
settings.json
, created by the app.
Done! You're now ready to start using ToK.
After completing the setup:
- Launch ToK.
- Choose to either chat directly with the bot or upload documents using the top-right button for enhanced query responses.
- Enjoy the seamless experience of interacting with a locally-run, AI-powered knowledge assistant that keeps your data private and secure.
Note: On creating a new chat immediately after prompting the LLM / Chat Engine, the latest chat may not be visible in the sidebar along with chatting being unavailable for a few seconds. This may be due to the new chat being stored with an LLM-generated title.
Explore the key features and user interface of ToK through the images below: