Ollama and LangChain: build a local LLM wiki chat
Learn to chat with a Markdown wiki using Gemma 4, LangChain and Streamlit, with Obsidian citations and short-term memory instead of a vector database.
Player not loading? Watch on YouTube
Nariman builds a document chat app around an existing Markdown wiki, using an approach he attributes to Andrej Karpathy. The tutorial uses Gemma 4 through Ollama, a LangChain agent and a Streamlit chat interface. In the opening example, the agent finds an article about learning faster and returns a citation that opens the article in Obsidian.
The setup assumes you already have a knowledge base in an Obsidian folder, including an index file with links to other documents. Creating that wiki is outside this tutorial. The agent reads the index, lists available pages and reads selected files to answer questions. Python file operations supply the context, without a vector database or text-chunking pipeline in this implementation. The speaker presents it as an approach for a small knowledge base, rather than demonstrating how it performs at larger scales.
The coding walkthrough adds citation links, chat history and a memory checkpointer. A thread ID connects requests to the agent's short-term memory. This is a limited version of the proposed wiki workflow: the agent does not update the wiki during conversations or maintain a persistent interaction log. The speaker describes both as extensions rather than features implemented here.