How to Use Local Files to Train Ollama with Msty Knowledge Stacks
For a few weeks, I’ve been using Msty for research purposes. One of the main reasons I chose this route is that I like the idea of keeping those interactions isolated to my local machine. Thanks to Msty and Ollama, that’s a fairly easy task.
What is Msty Knowledge Stacks?
One Msty/Ollama feature that has intrigued me is the ability to add your own content to what’s called a Knowledge Stack, which can enable you to integrate local data sources to enhance the AI’s ability to provide more relevant and contextual responses. Once you’ve added a document stack, Msty can then serve as a smart assistant with knowledge of whatever it is you deem worth knowing.
How to Create Your First Knowledge Stack
To make this work, you’ll need both Ollama and Msty installed. You’ll also need some supported files to add (see the list above).
Step 1: Open Msty and Click the Knowledge Stack Button
The first thing to do is open Msty and then click the Knowledge Stack button in the sidebar. On the first page of the pop-up, click Use Local AI Model and then, in the resulting window, click Add Your First Knowledge Stack.
Step 2: Name Your Knowledge Stack
Make sure to select Use Local AI Model for this. In the next pop-up, give your Knowledge Stack a name, leave the model drop-down as is, and click Add.
Step 3: Add Your Documents
In the resulting window, you can either drag and drop documents or click Browse Files and locate the files in your default file manager. You can also add Obsidian Vaults, Folders, Notes, and/or YouTube transcripts. Once you’ve done that, click Save as Draft and then click Compose.
Step 4: Compose Your Knowledge Stack
The compose process can take some time, depending on how many documents you’ve added to your Knowledge Stack. Wait until it completes. Once the compose process is finished, close the Knowledge Stack Pop-up.
How to Add Your Knowledge Stack to a Chat
With your Knowledge Stack added, it’s time to start chatting. It’s actually very simple. Click the New button (or hit Ctrl+N) to start a new chat. In the chat window, click the Knowledge Stacks button above the chat window (not the one in the sidebar).
Step 5: Select Your Knowledge Stack
Make sure to click the folder icon in the bottom toolbar. From the pop-up menu, select your new Knowledge Stack to add it to the chat. Once you’ve done that, start chatting. Ask a question that would be answered in one of your documents, and you should get the expected answer.
Conclusion
I’ve run a few tests with Msty Knowledge Stacks, and every time I came away impressed. This feature is a great way to use your own documents/data for an AI chat, while ensuring it remains on your local machine and isn’t saved or used by a third party. It’s also pretty cool to see how many of your documents are cited in a chat.
FAQs
Q: What is Msty Knowledge Stacks?
A: Msty Knowledge Stacks is a feature that allows you to add your own content to a stack, which can be used to enhance the AI’s ability to provide more relevant and contextual responses.
Q: What types of files can I add to my Knowledge Stack?
A: You can add files (PDF, CSV, MD, JSON, EPUB, DOCX, RTF, and TXT), folders, Obsidian vaults (from the Obsidian note-taking app), notes, and/or YouTube transcripts.
Q: How do I add a Knowledge Stack to a chat?
A: You can add a Knowledge Stack to a chat by clicking the New button (or hit Ctrl+N) to start a new chat, then clicking the Knowledge Stacks button above the chat window, and selecting your desired Knowledge Stack.

