3 ms·
I feel like you can do the same using a single markdown file and an LLM (e.g. Claude Code). I do it that way and then I hooked it up with the Telegram API. I’m
by dvrp 1y ago
I feel like you can do the same using a single markdown file and an LLM (e.g. Claude Code).
I do it that way and then I hooked it up with the Telegram API. I’m able to ask things like “What’s my passport number?” and it just works.
Combine it with git and you have a Datomic-esque way of seeing facts getting added and retracted simply by traversing the commits.
I arrived to the solution after trying more complex triplets-based approach and seeing that plain text-files + HTTP calls work as good and are human (and AI) friendly.
The main disadvantage is having unstructured data, but for content that fits inside the LLM context window, it doesn’t matter practically speaking. And even then, when context starts being the limiting factor, you can start segmenting by categories or start using embeddings.
- yard2010 1y agoI'm curious, how do you find your passport number in Telegram? Do you embed every message and then do cosine similarity to find the message that is relevant to the question? Please write about your system more :)
- barrenko 1y agoNot OP, but I think he literally supplies the "vanilla" .md file to the LLM and prompts.
- dvrp 1y agoYes! This in essence. Specifically, it’s a file that contains a list of Entity-Attribute-Value assertions in triplets. It’s called “FACTS.md” and each line represents a fact. Such as “<OP>, PASSPORT_NUMBER, <VALUE>” Then put it in context, ask question, and then use Telegram API and suddenly I have a “Private ChatGPT” that’s aware of my filesystem, can run my own binaries/tools, and has access to a private document store. It gets cool once you add function calling to open images on demand (or any type of file) with vision capabilities/OCR and you start running shell commands and combining that with many media types from Telegram. Funny enough, I called the project “COO” initially. Been thinking of writing up something about it. I think it’s a no brainer and I’m confident OpenAI, Claude, and Notion will go there. In the meantime, I have good-ol’ vi, .md/.txt, and HTTP/SMTP!
- unshavedyak 1y agoI really miss the ease of Telegram bots. It's so fun to write stuff like this.
- badmonster 1y agoThis is such a cool idea, would love to hack a project sometime with multi-media types and map to knowledge graphs and feed that to agents :)
- hailruda 1y agoI’d appreciate a writeup! I’d like to implement this myself, maybe add reminders.
- sgt101 1y agoMaybe ask the LLM to extract facts from the documents as datalog assertions and then use a reasoner/llm tool to answer the question?