Embeddings
Provider-agnostic text embeddings over the OpenAI-compatible /embeddings API (OpenAI, Mistral, Gemini, Voyage, Ollama or a custom host, chosen by env) plus rank_by_similarity for semantic search with scores
About
A Graphrt plugin for text embeddings that does not tie a workflow to one provider. It calls the OpenAI-compatible POST /embeddings endpoint that OpenAI, Mistral, Gemini, Voyage AI, Ollama and many other hosts serve, and adds rank_by_similarity: semantic search over a short list that returns scores, not vectors. Both operations are workflow nodes and agent tools.
What it can do
- embed_texts: up to 1000 texts, data[] holds {index, embedding} in the OpenAI shape for every provider. Optional dimensions (OpenAI, Gemini, Ollama), output_dimension (Voyage, Mistral codestral-embed) and input_type (Voyage)
- rank_by_similarity: embeds a query and up to 999 documents in one call and returns the top_k matches as {index, document, score} (cosine similarity), best first
Actions
Each action is a step you can add to a workflow. Agents can also use most of them as tools.
- Embed texts
embeddings.embed_texts - Rank by similarity
embeddings.rank_by_similarity
Settings
Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.
-
EMBEDDINGS_PROVIDEROptionalopenai (default), mistral, gemini, voyage, ollama or custom -
EMBEDDINGS_API_KEYRequiredThe provider's API key, sent as Authorization: Bearer. For Ollama any non-empty value (e.g. ollama): Ollama ignores it -
EMBEDDINGS_MODELOptionalModel used when a call names none (required for custom) -
EMBEDDINGS_BATCH_SIZEOptionalTexts per request for rank_by_similarity (1-1000), default per provider below -
EMBEDDINGS_BASE_URLFor customBase URL that serves /embeddings, e.g. https://api.together.xyz/v1 or http://localhost:1234/v1, also overrides a provider's URL (https, or http on localhost only)
How to use it
In Graphrt Desktop
- Open Plugins and search for Embeddings.
- Click Install and approve it.
- Follow the setup steps on the plugin's page, then paste the settings it needs.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
$ graphrt plugin install embeddings - id: best
type: embeddings.rank_by_similarity
query: "{{#start.question#}}"
documents: "{{#faq.data.answers#}}"
top_k: 3
- id: answer
type: answer
answer: "{{#best.data.matches.0.document#}}"