← SELECTED WORK

ENGINEERING STUDY / LOCAL RETRIEVAL

Memory with
permission.

Exploring retrieval-augmented generation through approved notes, local embeddings and a rebuildable vector index.

Context
Within the personal AI Coach
Status
Implemented prototype component
Technology
Ollama · Qdrant · Supabase

01

The retrieval problem

Useful context is not just a record of activities. It can include goals, preferences and notes. The engineering question was how to retrieve relevant narrative context without treating every stored note as approved for AI use.

02

How the pattern works

  1. A person explicitly approves a note for retrieval.
  2. A local embedding model turns note text into a vector: a numerical representation used to find similar meaning.
  3. Qdrant stores the vector and record identifiers, filtered by owner.
  4. Search results are checked again against the authoritative records for current ownership and approval.
  5. Approved note text is supplied with calculated facts to the local explanation model.

This is retrieval-augmented generation, or RAG: retrieve relevant context before generating an explanation.

03

Keep the source authoritative

Supabase remains authoritative for note text, ownership and approval. Qdrant is a search index that can be rebuilt. A search match alone is not sufficient permission to use a note.

Approve→Embed→Find→Recheck→Explain

The code includes index deletion and a keyword fallback when local vector services are unavailable.

04

Scope and remaining evaluation

The component retrieves approved notes. It is not a full vector index of every ride or a large training-reference library, and approving a note does not fine-tune the model.

Retrieval quality, stale context, permission changes and unsupported interpretation all need ongoing evaluation.

05

Why the pattern could transfer

Similar questions arise in organisational knowledge work: which source is authoritative, who may access it, whether it is still approved, and how a reviewer can understand what informed an answer.

Applying this pattern to an enterprise setting would require its own discovery, security design, evaluation and operational controls. No enterprise client deployment is claimed here.

RELATED WORK

This is an architectural study of the same personal AI Coach project ↗, rather than a separate client case study.

Continue the conversation.

anjil@ascelon.co.uk