MimirDocumentationSign in
Documentation

How search works

Two retrievers run over the same rows: a vector arm over the embedding column, and a keyword arm over PostgreSQL full-text search. Their result lists are fused with reciprocal rank fusion at k = 60. Fusion is used because a cosine distance and a ts_rank_cd score are not comparable numbers; ranks are.

Path scoping

path_prefix restricts both arms to a directory. Prefixes are literal: auth matches auth and auth/…, never authentication. Scoping is the main defence against a deployment note polluting an authentication query.

When results are poor

  • Check that an embedding model is configured in Admin → Settings. Without one, search is keyword only — still useful, much narrower.
  • Check that memories have embeddings. A write never fails because a provider is down; it stores the row with no vector and a backfill job fills it in later.
  • Turn on Learn from this project so each memory gains a summary. The digest and the search results both show summaries, so the agent reads less for the same answer.
  • Use paths that describe meaning, not files: conventions/state-management, not src/store/index.ts.
How search works