Spectre.Router.Plugs.EmbeddingSimilarity (Spectre v0.3.0)

Copy Markdown View Source

Embedding similarity evidence provider.

The plug embeds the current user text and compares it with per-rule examples. It logs and traces adapter failures as a skip instead of failing the whole turn, because embedding search is optional evidence: the agent can still be routed by regex, classifier, semantic cache, or LLM fallback.

on :shipping_question,
  embedding: ["where is my package?", "track my order"] do
  ask :shipping_answer
end