← Insights

AI · 5 min read ·

Keyword knowledge before vector RAG

  • RAG
  • retrieval
  • knowledge base

Problem

Dumping the whole site into one prompt wastes tokens and still hallucinates.

Approach

Split approved facts into tagged chunks (about, projects, architecture, services). Score by keyword overlap. Keep the retrieval interface ready for embeddings later.

Result

Live in src/data/knowledge.ts + src/lib/knowledge/retrieve.ts — mode labeled keyword, not vector.

What I learned

Ship auditable retrieval first. Vector search is an upgrade path, not a day-one requirement for a portfolio assistant.

Related insights

Keep exploring

Ask the grounded assistant about this decision, or open the lab playground.