# How I leverage my Notes with AI
This is a high-level overview of how I leverage my notes in [[Obsidian]] with AI and [[Large Language Models (LLMs)]] in particular.
This document is evergreen. I'll update it from time to time. It's not a complete description of all the ways I leverage my notes, but covers some ideas I've experimented and continue to use.
## AI Plugins within Obsidian
First of all, I use various AI-enabled plugins directly within [[Obsidian]]. I maintain a list of the ones I rely on here: [[AI Tools I use]].
## Obsidian Notes to AI Prompts
Second, I've been having success converting my Obsidian note folders to AI prompts using different tools.
To achieve that, I use two main tools:
- [[Code2Prompt]]
- [[files-to-prompt]] by [[Simon Willison]]
I have created a script to invoke those tools against specific folders in my Obsidian vault, converting each of those to one big text file, and saving it to disk within my vault. The link to the script I use is available below in the references.
I can upload those large text files to different [[Large Language Models (LLMs)]]. The neat aspect is that those files contain metadata including the file name and frontmatter for each note, meaning that it's possible to reference specific notes, tags, etc during AI conversations.
For large sets of notes like mine, the best option right now is using [[Gemini]] 2.0 Pro Experimental since it has a HUGE context window (2M tokens!).
Right now, I'm using the script I shared above and store the output within my Obsidian vault, which is fully synchronized with Google Drive. The benefit there is that for LLMs that have direct Google Drive integration such as [[Claude]] or [[NotebookLM]], [[Gemini]] etc, it's possible to directly point them to the prompt files instead of having to upload those manually.
I will automate the execution of my prompts update script, so that the prompt files are always up-to-date with my vault changes, locally and on Google Drive.
## n8n and AI Prompts
What I plan on trying soon is connecting my [[n8n]] instance to Google Drive, and leverage those prompt files directly within AI-driven workflows. The cool part there is that I can store all my prompts in Obsidian, then leverage those along with my notes, anywhere.
The problem that I anticipate is the size of my prompt files. The one for my permanent notes is already 6MB. It's not much, but when thinking about the context window of most LLMs, it's a LOT. So I'll have to think about the best approach.
## References
- The script I use to convert Obsidian vault folders to LLM prompt files: https://gist.github.com/dsebastien/70cacc30dc0399e885022e106298c508
## Related
- [[files-to-prompt]]
- [[Code2Prompt]]
- [[AI Tools I use]]