DocsLearn

Search & recall

What happens when an agent calls recall, and the one call to use for code questions.

Search pipeline

recall({ query }) — step by step

  1. 1
    Embed the queryon-device ONNX model · LRU-cached
  2. 2
    Pre-filter by taginverted index — only candidates with your tags
  3. 3
    SemanticHNSW nearest neighbours, with time decay
    KeywordFTS5 BM25, normalised 0–1
  4. 4
    Merge0.7 × semantic + 0.3 × keyword
  5. 5
    Ranksmall boosts for priority, recency, access and importance
Two indexes, one score: meaning from the vector index, exact words from full-text search.

Ranking is gentle on purpose: priority (0–10, centred on 5) moves a score by about ±12% at most. It breaks ties between relevant memories; it never lifts an irrelevant one to the top.

Code questions

A code question, two ways

Fine-grained tools

  1. code(locate) find the symbol
  2. read the file
  3. code(grep) find its callers
  4. read the imports

Several calls — the agent stitches the answer together.

recall(answer)

  1. recall({ query }) one call
  • symbol body
  • siblings
  • imports
  • provenance

Proven graph lookup first, hybrid search if nothing can be proven.

Reach for the fine-grained tools only when you need to verify something literally.

Explore (Pro+)

recall({ explore: true })returns the hits plus the memories linked to them — by shared tags, time and meaning — with derived facts and open loops. Use it for "how does X relate to Y". On Free and Pro it returns tier_required and plain recall keeps working (compare plans).

Something missing or wrong? Email support@memorylayer.in or open an issue.