Status: planned / coming soon. This case study is scaffolded now and will fill in as the project moves from planned to building to shipped.
Problem
I keep a lot of notes, but finding the right one — and synthesizing across several — is slow. I want to ask a question in plain language and get a grounded answer with citations back to the source notes, not a hallucination.
Architecture
An agentic RAG loop rather than one-shot retrieval. The agent decides whether to retrieve, can refine its query after seeing early results, and stops when it has enough evidence.
question ─▶ [plan] ─▶ need context? ─yes─▶ [retrieve] ─▶ [observe]
│ │
no enough? ─no─┐
▼ │ │
[answer] ◀──────────────── yes ◀───────┘ │
▲ │
└──────────── refine query ◀──────────────┘
State flows through a LangGraph graph so every step is inspectable and the run can be checkpointed and resumed.
Stack
- FastAPI — thin HTTP layer over the agent
- LangGraph — the plan → act → observe → reflect control loop
- pgvector — embeddings stored next to the notes in Postgres
- OpenAI — embeddings + generation (swappable behind an interface)
Outcome
To be measured. Success looks like: correct, cited answers on a held-out set of questions, with retrieval precision high enough that the model rarely has to guess. I’ll track answer accuracy and retrieval hit-rate as the eval harness comes together, and write up what actually moved the numbers.
The theory behind it lives in two notes: RAG retrieval basics and LangGraph agent loops.