Metadata-Enhanced RAG: A Controlled Experiment
Vector-based RAG retrieval fails on questions that aren't semantic: what did I decide, what did I abandon, which conclusion replaced which. I hypothesized these failures map to missing metadata dimensions (decision status, time, relationships) and that a governed metadata layer would fix them without hurting what vector search already does well. I built one, ran a controlled before-and-after experiment, and measured it. Precision@5 rose 40%, Recall@5 rose 61%, and the gains landed exactly where I predicted.
ROLE
PROBLEM
Conversational AI history is a high-value knowledge asset with difficult characteristics. Pure vector search can't tell a decision from an exploration, or a current conclusion from one that was superseded. The same topic gets re-decided across months, and naive retrieval flattens that evolution and merges contradictions. One topic scatters across many conversations. I catalogued ten distinct failure modes, each traceable to a missing metadata field.
RESULTS
Precision@5: 0.30 to 0.42 (up 40%). Recall@5: 0.51 to 0.81 (up 61%)
Decision-status questions improved from near-total failure (0.00 to 0.20) to near-perfect (0.80 to 1.00)
Metadata and vector retrieval proved complementary. Semantic questions stayed flat, so nothing broke to fix the gaps
The design was falsifiable, and it found real limits: one regression, and an 83.5% LLM over-segmentation rate
What vector search can't see
Every organization building on RAG hits the same wall: the system finds text that looks relevant, but can't answer "what did we actually decide?" or "is this still current?" That's not a search problem — it's a metadata problem.
Vector-based RAG retrieval finds semantically similar text well. It's blind to almost everything else. Ask it "what did I decide about X?" and it can't tell a firm decision from an idle thought. Ask "is that still true?" and it can't distinguish a current conclusion from one that was superseded months ago.
I had lived with these failures in my large archive of AI conversations, so I catalogued them: ten distinct failure modes. Missing temporal dimension. Decision evolution flattened. Rejections forgotten. Confidence not differentiated. Each traced back to the same cause: the data had semantic content but no structured description of decision context. That's a metadata problem, exactly the kind metadata management exists to solve.
I set up a hypothesis I could test: a governed metadata layer would fix the non-semantic failures without damaging what vector search already did well.

Building the layer, governing the corpus
I started by governing the corpus. I reduced 88 conversations to 66 using documented inclusion and exclusion criteria, justifying every cut. Then I built a two-layer codebook (7 primary categories, 22 sub-codes) through saturation sampling and versioned it as a living document with an evolution log.
Next came the schema. I designed segment-level metadata fields, each mapped to a failure mode: decision_status (a six-state enum), maturity, importance, valid_from and valid_to, superseded_by, related_segments, prerequisites, conflict_with. I also separated fact time from knowledge time (when a decision was valid versus when I annotated it). Metadata is a snapshot of understanding at a moment, not eternal truth.
The pipeline threw real problems at me. Segments truncated by an upstream tool got rebuilt without loss from boundary metadata, which saved twelve hours of recomputation. Identifier offset errors. Circular merge references that needed a direction constraint. I tested whether local language models could do the structured annotation themselves. They couldn't, reliably, across three prompting strategies. That's why the architecture stayed human-annotation-plus-rules, and why everything ran locally for data sovereignty.
This architecture is portable. Any organization with a knowledge base, internal wiki, or document repository faces the same retrieval failures — and the same metadata layer would fix them.


What the numbers said, including what I got wrong
The experiment held everything constant except retrieval logic: same corpus, same embedding model, same questions. Naive vector search versus a metadata-enhanced version with status filtering, relationship expansion, and annotation notes fed into retrieval text. Ground truth was validated question by question.
Precision@5 rose 40%, Recall@5 rose 61%, and the gains landed where I predicted. Decision-status questions went from near-total failure to near-perfect, while semantic questions stayed flat. Metadata and vector retrieval were complementary, not competing. A single field, decision_status, with hard filtering, gave the highest return of anything I tried.
This was designed to be falsifiable, and it found real limits. One question regressed when I fed notes into the retrieval text. Shifting the vector space pushed out two previously-correct results. That showed me every intervention needs its own validation instead of assumed benefit. LLM-assisted segmentation over-split by 83.5%, so human review stayed necessary. And conversations capture what I intended to decide, not what I actually executed. Single-source metadata has structural blind spots that only multi-source lineage would close.
Skills developed: Metadata schema design, corpus governance, codebook development, bi-temporal data modeling, data quality remediation, data lineage, RAG architecture, experiment design and evaluation, LLM capability assessment, local-first data sovereignty.
For any team using RAG in production, the takeaway is concrete: adding a single structured field (decision_status) with hard filtering delivered the highest retrieval improvement of any mechanism tested — at zero additional inference cost.


