As a developer, I'm used to solving problems by composing many functions to handle one step in the solution. Solving problems via an AI chat introduces a new experience: dialoguing through a problem and its solution.
This open-ended experience of interacting with an AI chat requires the imposition of verbal "tools" to mimic structured functions, libraries, etc.
In this article, I'd like to show how I've imposed prompts to harness and organize my knowledge management mediated through AI chats, especially Claude.
Before I imposed any prompt structure, my AI chats would go like this:
- Introduce a subject/problem/question
- Make connections with other subjects/problems/questions
- Get into the weeds of the connection between the original topic and the new one and miss the big picture (the structure and interconnection of the conversation)
- Leave the chat session feeling stimulated with new ideas/thoughts/impressions but not being able to return and retrieve the knowledge quickly
Here's what I did. In short, I used prompts to treat every AI chat session like a git branch.
Every chat session has some subject/problem/question/theme. In other words, every session can be given a name corresponding to the holistic intent of the session. In git terms, every session is a "branch" that can be given a specific name to provide a baseline.
As with every git branch, a chat session delves into specific steps/dimensions of the initial problem.
The power of good commits is that they leave breadcrumbs demonstrating the logical unfolding--in short, the history—of a solution to the problem. More generically, we can say that commits trace the developer's mind as a theme is explored. Good commits are helpful not only for reviewing a branch in retrospect, but the discipline of creating them helps build awareness of the developer's approach/design.
Likewise, AI chat sessions could benefit from retrospectively examining the conversation's logical evolution. Moreover, creating session "commits" facilitates the discipline of awareness and organization of thoughts in a discussion.
When a git branch is completed, the code may be reviewed. Comments may be added to provide another layer of context/insight. Similarly, additional context/insight can be extracted within an AI chat session regarding a) the "commits" and b) the overall "branch."
While there isn't an industry-standard tool/interface like there is with git, a user can impose prompts to structure the workflow of an AI chat session to mimic that of a git branch.
There are many ways to do this, but let me showcase the prompt system I imposed on Claude.
Every time I enter an AI chat session, I name the chat, mimicking a branch's name and capturing the session's high-level goal/theme.
Then, I note the intent to work on a "commit" within the branch before diving into a new connection using this prompt:
Create a branch point marker. We're moving from [original topic] to [new domain].
Key context to preserve: [please generate]”
Example Output:
=== BRANCH POINT: [New Domain] ===
- [ ] - Original topic:
- [ ] - Connection point:
- [ ] - New exploration:
This is a "commit message" that transitions from one commit to another—in other words, from one logical exploration of thought to another. I use the term "branch marker" instead of "commit" to better fit my mental model (since I have more control of this than git's interface/terminology).
That way, I can create a logical history of my progression through a chat.
Note: This begs the question of when to distinguish between a connection or tangential point within a logical group of thought (a "commit"/branch marker) and a new logical group. This depends on your preferences, intuition, and the nature of the theme/session. The significant point is to leave some organized trace of the different "chunks" of thought in an AI chat session.
Just as you would with git, you can check the "commit"/branch marker history in your AI session:
Can you (in text) list all our branch markers, including the next one?
Which may produce:
// output
Chat: Philosophical Realism
Branch 1: Plato's Realism
Branch 2: Aristotle's Moderate Realism
Moreover, just as you can use git hooks to do extraordinary things after a commit, I use each branch marker/"commit" to do things like aggregate notes from that chunk of thought:
One more thing before we move on to the next branch, can you create some summaries on those connection points that would make for formal notecards in my Zettlekasten system?
Once I've wrapped up a session, I do something equivalent to a git push
hook to do end-of-session cool things:
"Please aggregate all zettelkasten cards from this chat in two formats:
A readable summary organized by branches, showing:
Branch name/theme
Each note's ID, title, and content
And notes in this format. Example Output:
const notes = [
// Branch 1: Clarifying Aquinas
{
id: '202501261',
title: 'AQ-ConscienceScope',
content: `Natural law encompasses both moral principles discoverable by reason (synderesis) and broader principles of human flourishing. Aquinas distinguishes this from moral law, which specifically concerns divine commands and moral obligations. Natural law is thus broader, including practical and civic virtues alongside moral virtues.`,
tags: 'aquinas,natural-law,moral-law,virtue,conscience'
},
]"
And:
"Please create a complete branch index from all branch points and suggest an appropriate chat name."
Therefore, at the end of each session, I have:
- An outline/index of each "commit"/branch marker
- Summaries on main notes/thoughts in each branch marker
- A final chat name (if I need to change it)
My final step is to update the branch/session name to be prefixed with (Complete) so that if I return to that chat session, I can expect to find an index and summary notes at the bottom to get right back into the swing of things.
To simplify this process, I use Mac keyboard shortcuts so that my standardized prompts can feel like entering commands into a terminal, as with git.
You can create your aliases/interface to invoke the prompts using keyboard shortcuts, giving you the potential to either copy the git interface verbatim or improve upon it.
In conclusion, version control and git concepts have applications beyond code. AI chat sessions are a perfect example where imposing these concepts can streamline a process for better extracting knowledge from interactions with AI.
If you have a similar workflow, let me know in the comments.
Top comments (0)