Cohere in open-source AI tools: rerank, embeddings and Command models for RAG in 2026
Who Cohere is
Cohere was founded in 2019 by Aidan Gomez, one of the authors of the 2017 "Attention Is All You Need" paper that introduced the transformer, with Nick Frosst and Ivan Zhang. Unlike OpenAI or Anthropic, it has never sold a mass-market chatbot. It sells models and platforms to companies: the Command family for generation, Embed for vectors, Rerank for search, and North, a workplace AI platform. Its pitch rests on data control. Cohere models can run in Cohere's cloud, through AWS, Azure, Google Cloud and Oracle marketplaces, inside a customer's own virtual private cloud, or fully on-premise.
Which directory projects use it
| Project | How it uses Cohere |
|---|---|
| Dify | Rerank model for knowledge bases, plus Command and Embed providers |
| Langflow | Cohere components for chat, embeddings and reranking in flows |
| AnythingLLM | Cohere as an LLM and embedding provider for document chat |
In all three, Cohere is optional. The most common pattern is to keep whatever chat model you already use and add Cohere Rerank to the retrieval step.
How reranking fits a RAG pipeline
A retrieval-augmented generation pipeline answers questions from your documents in four steps:
- Chunk and embed. Split documents into passages and store a vector for each in a database such as Qdrant or Postgres with pgvector.
- Retrieve. Embed the question and fetch the 25 to 100 nearest passages.
- Rerank. Send the question and those passages to a reranker, which returns relevance scores. Keep the top three to ten.
- Generate. Send the question and the kept passages to a chat model with instructions to answer from them.
Vector search is fast but approximate: it measures whether two texts are about similar things, not whether a passage answers the question. A reranker is a cross-encoder that reads both together, which is slower but far more precise. Because it only scores a few dozen candidates per question, it adds a fraction of a second and a small cost. In Dify, turning on rerank is a checkbox in the knowledge base retrieval settings once a Cohere key is added.
Prices
| Model | Billing | Price |
|---|---|---|
| Command A | Per token | $2.50 input, $10 output per million |
| Embed | Per token | Listed on Cohere's pricing page |
| Rerank | Per search | Listed on Cohere's pricing page |
Generation, embedding and rerank are billed separately. For a RAG app, embedding costs are front-loaded when you index documents and small afterward, rerank costs scale with the number of questions, and generation costs depend on the chat model you choose, which need not be Cohere's.
Trial keys versus production keys
This catches many self-hosted projects. A Cohere account comes with a trial key immediately, and it works in Dify or AnythingLLM. But Cohere's terms say trial keys are for testing and learning only, with lower rate limits, and may not be used in production or for commercial purposes. When a team rolls an internal tool out to colleagues, it needs a production key with a billing method attached. The switch is a key change in settings; no code changes.
Command A as a chat model
Command A, released in March 2025, is Cohere's most capable documented generation model. Cohere designed it for business tasks: grounded answers with citations from supplied documents, tool use for agents, and many languages, with strong results in Arabic, Japanese, Korean and European languages. It runs on as few as two GPUs in private deployments, which matters to customers who host it themselves. At $2.50 input and $10 output, it costs more per token than Mistral Large 3 or open models on Groq, and less than Claude Opus 5.5 on output. Most self-hosted chat apps add it as one option rather than the default.
Embeddings choices
Cohere's Embed models support many languages and offer compressed vector formats, such as int8 and binary, that cut vector database storage substantially with small accuracy loss. That matters at scale: ten million passages at 1,024 dimensions in float32 take about 40 GB before indexes; binary vectors take about 1.3 GB. Qdrant and other vector stores support these formats.
Remember that embeddings are not interchangeable. If you index with Cohere Embed, every question must also be embedded with the same model. Switching embedding providers means re-indexing every document.
Setting it up
- Create an account at dashboard.cohere.com and copy the trial key for testing.
- Add a billing method and generate a production key before real use.
- In Dify, open Settings, Model Provider, add Cohere, then pick Cohere Rerank in a knowledge base's retrieval settings.
- In Langflow, drag a Cohere Rerank component between the retriever and the prompt.
- In AnythingLLM, choose Cohere under LLM or Embedder preferences.
Measuring the gain
Before and after adding a reranker, run 30 to 50 real questions with known answers through your app and record whether the right passage appeared in the top five and whether the answer was correct. Rerank usually lifts both, but the size of the gain depends on your documents. If retrieval was already accurate, a reranker adds cost for little benefit; if users complain that answers miss information that is in the documents, it is often the cheapest fix.
Chunking still matters
A reranker can only choose among the passages retrieval returns, so the way documents are split sets the ceiling on quality. Chunks of a few hundred words with a small overlap work for most prose. Keep tables, code blocks and list items whole rather than cutting them mid-row. Add the document title and section heading to each chunk's text so both the embedding and the reranker know where it came from. Dify and AnythingLLM expose chunk size and overlap as settings; try two or three values against your test questions rather than accepting the default.
Private deployment
Cohere's private deployments install its models in a customer's own cloud account or data center, with no data sent to Cohere. This is the main reason regulated organizations pick it over consumer-focused providers. Pricing is negotiated. For open-source alternatives with similar control, consider open rerankers such as BGE Reranker or Jina Reranker running on your own GPU, or open embedding models served by LocalAI.
Alternatives
| Need | Cohere option | Alternatives |
|---|---|---|
| Reranking | Rerank | Jina Reranker, Voyage rerank, open BGE models |
| Embeddings | Embed | OpenAI embeddings, Voyage, Mistral Embed, open Nomic and BGE models |
| Chat | Command A | GPT, Claude, Gemini, Mistral, open models |
Related: Qdrant stack, PostgreSQL stack, OpenAI API stack, Dify, Stack index.
Frequently asked questions
What does a reranker do?
A vector search returns, say, the 50 chunks most similar to a question. A reranker reads the question and each chunk together and scores how well the chunk answers it, then you keep the top five. This catches relevant passages that vector similarity ranks too low and drops near misses, and it usually improves answer quality more than any other single change to a RAG pipeline.
Is Cohere free?
Cohere offers free trial keys with rate limits for testing and learning. Its terms do not allow trial keys in production or for commercial use. Production keys are billed per token for generation and embeddings and per search for reranking.
How much does Command A cost?
$2.50 per million input tokens and $10 per million output tokens on Cohere's API. Embedding and rerank models have their own lower prices listed on Cohere's pricing page.
Can I use Cohere Rerank with OpenAI or Claude?
Yes. Reranking is independent of the chat model. Many self-hosted apps embed with one provider, rerank with Cohere, and answer with GPT, Claude or a local model. Dify lets you choose each piece separately.
Are Cohere's model weights open?
Cohere has published weights for some Command models through its research arm under a non-commercial license. You can study and test them, but commercial use requires a license or the API. The API and private deployments are the normal routes for business use.
Do I need Cohere if I already use OpenAI embeddings?
Not for embeddings. Keep OpenAI embeddings and add Cohere Rerank on top if answers miss relevant passages. Switching embedding providers would require re-indexing every document.