Reminisce.Similarity behaviour (reminisce v0.6.0)

Copy Markdown View Source

A port to a similarity index, such as a vector store.

Recall asks it about its lexical candidates only, never the whole store, and a recall never fails because the index did: an error is reported as similarity: {:unavailable, reason} beside the lexical answer.

It has no default implementation, and this release ships none. Pass keys to it, never words that are not already in your index: the library writes text nowhere but its store.

Summary

Callbacks

scores(owner, query, keys)

@callback scores(Reminisce.owner(), query :: String.t(), keys :: [String.t()]) ::
  {:ok, %{required(String.t()) => float()}} | {:error, term()}