Introduction

Build Ask My Vault, a Python tool that answers questions about your Obsidian notes using ChromaDB and Claude

By Kevin McAleer,    5 Minutes

Page last updated August 23, 2026


Course Cover Image


Ahoy there makers! If you have been using Obsidian for a while you have probably hit the same wall I did. You know you wrote something down about that motor driver. You know it is in there somewhere. But search gives you forty hits for β€œmotor” and none of them are the one you want.

Search looks for words. You want to search for meaning.

That is what we are going to build. By the end of this course you will have a tool called Ask My Vault - a Python command line app that reads your entire vault, understands what each note is actually about, and answers questions like β€œwhat motor driver did I use on the SMARS build and why did I switch?” with a proper answer and a list of the notes it got that answer from.


Overview

The technique is called RAG - Retrieval Augmented Generation. It is two ideas glued together:

  1. Retrieval - find the handful of paragraphs in your notes that are actually relevant to the question. We will use ChromaDB, a small vector database that runs as a Python library with no server to set up.
  2. Generation - hand those paragraphs to a large language model and ask it to write an answer using only those paragraphs, with citations.

The important part is that second constraint. A model on its own will happily make things up about your robot. A model that has been handed your actual notes and told to cite them will tell you when your notes do not contain the answer - which is often the most useful thing it can say.

Everything except the final answer step runs entirely on your own machine. The embedding model is a small local one that ChromaDB downloads for you. Your notes never leave your laptop during indexing.


Course Content

  • What RAG is, and why plain keyword search is not enough
  • Embeddings, vectors, and how β€œmeaning” becomes numbers
  • Setting up the project and the Ask My Vault package layout
  • ChromaDB basics - collections, documents, metadata and queries
  • Walking an Obsidian vault and skipping the folders you do not want
  • Parsing YAML frontmatter, inline tags and wikilinks
  • Chunking notes so retrieval finds the right paragraph, not the whole file
  • Building the index, in batches, with useful metadata attached
  • Incremental re-indexing so a rebuild takes a second, not ten minutes
  • Querying the index and understanding what a distance score means
  • Filtering by tag, folder and modified date
  • Improving retrieval with oversampling, diversity and better chunk text
  • Sending the retrieved context to Claude and getting an answer back
  • Citations, grounding, and getting the model to admit it does not know
  • Building the finished command line tool
  • Keeping the index fresh automatically
  • Evaluating whether your RAG is actually any good
  • Troubleshooting the things that will definitely go wrong

Key Results

After completing this course, you will:

  • Understand how embeddings turn text into searchable meaning
  • Be able to build and maintain a ChromaDB index from any folder of markdown
  • Know how to chunk documents so retrieval actually works
  • Be able to write a grounded prompt that cites its sources and refuses to guess
  • Have a working amv command you can run against your own vault
  • Know how to measure whether a change to your pipeline made it better or worse

What you’ll need

  • Python 3.10 or newer - we use modern type hints like list[str] | None
  • An Obsidian vault with at least twenty or thirty notes in it. A tiny vault makes for boring results
  • About 500MB of disk space - the local embedding model is roughly 80MB, and Chroma’s index grows with your vault
  • An Anthropic API key for the answer generation step, from console.anthropic.com. The retrieval half of the course works with no key at all
  • A terminal, and an editor you like

No GPU required. Everything here runs comfortably on a laptop, and the retrieval side runs fine on a Raspberry Pi 5.


Prerequisites

You should be comfortable with basic Python - functions, classes, dictionaries and list comprehensions. If you are not there yet, start with:


How the course works

Each lesson builds one piece of the tool. Code appears in blocks like this:

# Every code block in this course is complete and runnable
print("Hello, vault")

Every code block tells you where it goes. The first line is a comment naming the file, so you are never left guessing:

# vault_rag/config.py
CHUNK_SIZE = 1200

When a block adds to a file you already started, the comment says where to put it - and when it replaces something from an earlier lesson, it says that too:

# vault_rag/vault.py  (add below the Note class)
# vault_rag/vault.py  (replaces the load_note you wrote in lesson 5)

Some blocks are throwaway experiments rather than part of the tool. Those name a scratch file instead, which you can delete afterwards:

# try_it.py - a scratch script in the project root

Blocks with no file comment are either shell commands or short fragments illustrating a point.

Most lessons finish with a Try it Yourself section - small experiments that show you the behaviour rather than just telling you about it - and a Common Issues section for the things that trip people up.

Right then. Let’s find out what RAG actually is.

Next >

You can use the arrows  ← β†’ on your keyboard to navigate between lessons.


What are you looking for?
Watch Videos Get Ideas Learn Something Read a Review Read the Blog Search
... Z Z z