Your AI Has Amnesia. Here's How I Fixed It.
Every conversation with an AI assistant starts the same way: from zero.
It doesn't matter that you told Claude your preferences yesterday. It doesn't remember that you hate em dashes. It doesn't know you're the CEO of a startup, that you prefer concise answers, or that you've been working on the same project for three months.
Every. Single. Time. You start over.
I got tired of re-explaining myself, so I built a memory system. I call it Recall.
The Problem with AI Memory (or Lack Thereof)
Most AI assistants today have the memory of a goldfish with a head injury. They're brilliant in the moment, but the moment ends when you close the chat.
The common workarounds don't cut it:
Chat history? Grows unbounded. Important context gets buried under thousands of messages. Good luck finding that decision you made two weeks ago.
RAG (Retrieval-Augmented Generation)? Better, but it only retrieves based on semantic similarity. It doesn't know that you access certain information constantly. It treats a note from six months ago the same as one from yesterday.
System prompts and context files? Manual maintenance hell. You become a librarian for your own AI, constantly updating files that inevitably go stale.
The core issue: these approaches treat all information equally. But not all context is equal. Some things matter more. Some things you use constantly. Some things fade in relevance over time.
The Solution: Memory That Learns
What if your AI's memory worked more like yours?
Human memory isn't a filing cabinet. It's adaptive:
- Important things stick (your wedding date, your kids' names)
- Frequently accessed things stay accessible (your daily routine)
- Unused information fades (what you had for lunch last Tuesday)
Recall works the same way. Every piece of information has a relevance score based on three factors:
Relevance = (Weight × 40%) + (Frequency × 30%) + (Recency × 30%)
| Factor | What it means |
|---|---|
| Weight | How important is this? (You decide: 1-10) |
| Frequency | How often do you access it? (Automatic) |
| Recency | When was it last used? (Automatic) |
This creates a system where:
- Your preferences (weight=9) always surface
- Contacts you talk to weekly rise naturally
- That project from last year fades... unless you mark it important
No manual cleanup. No reorganizing. It just works.
How Recall Works
The Data Model: Graphs, Not Documents
Here's the insight that changed everything: context comes from connections.
When you think about a person, you don't just recall their name. You remember their company, how you met, recent conversations, deals in progress. Memory is associative.
Recall stores memory as a graph:
Records (nodes): Any piece of information
- People, companies, projects
- Decisions, preferences, learnings
- Meetings, notes, tasks
Links (edges): Relationships between records
sarah --works_at--> acme_corp
sarah --attended--> q4_planning_meeting
acme_deal --involves--> sarah
last_call --about--> acme_deal
When you query "Sarah Chen", you don't just get her contact info. You get her company, the deal you're working on together, your last conversation, and the meeting where you met. The graph surfaces context that flat documents bury.
This is why traditional RAG falls short. It retrieves documents, not relationships. You get fragments, not the full picture.
Search: Semantic + Keyword
Recall uses hybrid search, combining two approaches:
- Semantic search: "What's our competitive advantage?" finds conceptually related content
- Keyword search: "MCP integration" finds exact matches
Results merge using Reciprocal Rank Fusion (RRF). You get the best of both worlds.
Here's the key insight: search also updates relevance. Every time a record appears in search results, its access count increments. Frequently useful information automatically rises.
The Relevance Formula
Here's the actual scoring function:
-- Weight: normalized from 1-10 to 0-1
weight_score := (weight - 1) / 9.0;
-- Frequency: normalized to 0-1, capped at 100 accesses
access_score := LEAST(access_count / 100.0, 1.0);
-- Recency: 1.0 today, decays to 0.1 over 30 days
days_since := EXTRACT(EPOCH FROM (NOW() - last_accessed)) / 86400;
recency_score := GREATEST(1.0 - (days_since / 30.0) * 0.9, 0.1);
-- Combine
RETURN (weight_score * 0.4) + (access_score * 0.3) + (recency_score * 0.3);
The magic is in the decay. Unused information doesn't disappear, it just fades. If you need it, search finds it. But it won't clutter your daily context.
Using Recall
Session Startup
Every AI session starts by loading context:
recall context
This returns the 20 most relevant records. Your preferences. Active projects. Recent contacts. No manual selection.
Adding Memory
# Add a preference (high weight = always surfaces)
recall add knowledge \
--topic "Communication style" \
--content "Concise, no jargon, no em dashes" \
--weight 9
# Add a contact with links
recall add person \
--name "Sarah Chen" \
--email "sarah@acme.com" \
--context "CTO at Acme. Met at re:Invent."
recall link sarah works_at acme_corp
recall link sarah attended q4_planning
Searching
# Find anything about competitive positioning
recall search "competitive positioning"
# Find knowledge specifically
recall search "pricing strategy" --type knowledge
Managing Lifecycle
# Mark something as important
recall weight <id> 9
# Archive when done (stops surfacing, stays searchable)
recall archive <id>
# Reset frequency (let it fade naturally)
recall flush <id>
The Architecture
For the technically curious:
- Database: PostgreSQL with pgvector for vector similarity search
- Embeddings: Auto-generated on insert using any embedding model
- Full-text search: Native PostgreSQL tsvector
- Hybrid merge: Reciprocal Rank Fusion (RRF) to combine semantic and keyword results
The entire system runs as database functions. No complex infrastructure. No external services beyond embeddings. Fast, reliable, and surprisingly simple.
Try It
The architecture is straightforward to replicate:
- Set up PostgreSQL with pgvector enabled
- Create the schema: records table with JSONB data, vector embeddings, relevance fields, and a links table for relationships
- Add the functions: hybrid_search, calculate_relevance, get_startup_context
- Build a CLI or integrate directly with your AI workflow
The core insight isn't the code. It's the model: automatic relevance based on weight, frequency, and recency, plus graph relationships that surface connected context.
Stop maintaining your AI's memory manually. Let it learn what matters from how you use it.
Building AI infrastructure at One. Thoughts on AI, startups, and building things that work.