Cohere RAG with XERJ: private, verifiable, on your hardware

PRIVATE.
CONFIDENT.
VERIFIABLE.

You run Cohere on the platform, in your VPC or on-prem. XERJ is the retrieval layer that sits next to your data: it indexes files, folders, object storage and live Postgres tables on one CPU server, runs hybrid search, and passes the best hits to Cohere Rerank, Embed and Command. Private: with Cohere in your private deployment, the data stays inside. Confident: hybrid retrieval, Rerank and exact counts from the data. Verifiable: every citation resolves to a file and page. All three hooks shipped in rc.102 and stay off until you set a key and an endpoint. XERJ is not affiliated with Cohere.

FOR·COHERE TEAMS·PRIVATE DEPLOYMENTS·RAG AND AGENT BUILDERS

WHERE XERJ FITS IN A COHERE STACK.

Files, a Postgres database and object storage feed one XERJ node on a CPU server inside your network. XERJ runs hybrid search. Optional calls go to Cohere Rerank, Embed and Command, at a private Cohere deployment or Cohere's API. YOUR NETWORK · ONE CPU SERVER FILES · PDF · OFFICExerj autoindex POSTGRESxerj connect (live) S3 · MINIO · ARCHIVESxerj autoindex s3:// XERJ NODE (ONE BINARY) · BM25 + kNN + RRF hybrid search · aggregations over live tables · citations back to file and page · MCP tools for agents · Elasticsearch-compatible API cohere hooks (off by default) COHERE Rerank · Embed · Command private deployment, or api.cohere.com text leaves only when you turn a hook on
SHIPPED · RC.102

RERANK

Add "rerank": {"provider": "cohere"} to a _search. XERJ sends the top hits to Rerank and returns them in Rerank's order. Models: rerank-v5.0-fast, rerank-v5.0-pro, rerank-v3.5. #2985

SHIPPED · RC.102

EMBED

semantic_text fields get Embed vectors, for example embed-v5.0-pro, through Cohere's OpenAI-compatible route. Then BM25, kNN and RRF run in one search. #2983

SHIPPED · RC.102

COMMAND

Send the best hits to the Chat endpoint as documents. Each document id is the XERJ _id, so every citation maps to a file and page. cohere-tools.json gives Command six XERJ tools. #2983

SHIPPED

YOUR DATA, CONNECTED ONCE

xerj autoindex for files and folders. xerj connect postgres://... follows a live table, so new rows are searchable without a re-index. #2984

WHAT A COHERE TEAM GETS.

You haveXERJ adds
Command for RAGretrieval over your files and databases, with citations that resolve to a file and page
Reranka first-stage search to rerank: BM25, kNN or both, in one call
Embedan index that stores the vectors and searches them next to keyword matches
A private deployment, on-prem or VPCa search layer that runs on one CPU server in the same network, no GPU
Agentsan MCP server and Chat v2 tool schemas for search and memory

CONFIGURE IT IN TWO BLOCKS.

# xerj.toml
[rerank.cohere]
api_key  = "co-..."                             # or COHERE_API_KEY
endpoint = "https://api.cohere.com/v2/rerank"   # or your private deployment

[embedding]
mode = "proxy"
default_endpoint = "https://api.cohere.ai/compatibility/v1"
default_model = "embed-v5.0-pro"
curl -s -XPOST localhost:9200/policy-docs/_search -H 'content-type: application/json' -d '{
  "query": {"match": {"body": "appeal deadline"}},
  "rerank": {"provider": "cohere", "model": "rerank-v5.0-fast", "window": 30}
}'
# verify: the response has "_rerank": {"applied": true, "provider": "cohere", ...}

What leaves the machine, and only when you turn it on: the query and the text of up to window hits for Rerank; the text of embedded fields for Embed; the question and the selected hits for Command. Point each endpoint at a private Cohere deployment to keep all of it inside. Full reference: docs/COHERE.md.

WHAT SHIPS TODAY.

CapabilityStatus
Cohere Rerank provider on _searchshipped (rc.102)
Cohere Embed via the proxy embedder, Command tool schema, Command RAG cookbookshipped (rc.102)
Live Postgres source, table rows to factsshipped (rc.102)
Files, folders, S3, SQLite, SQL dumps via xerj autoindexshipped
Native /v2/embed with input_type, int8 and binary vectors; MCP over HTTProadmap

SEE IT RUN ON REAL DATA.

One machine, 13 public NIST and CMS documents and a synthetic 200,000-row claims table: the Cohere RAG worked example. Private, confident and verifiable, in one post: Cohere RAG with XERJ.

FOR YOUR AI AGENT

Install XERJ from https://xerj.org/llms.txt and index the folder I point you to. Turn on Cohere Rerank for _search with my COHERE_API_KEY, using the setup at https://xerj.org/integrations/cohere. Run one search with and without rerank, and show me both top 5 lists and the _rerank block.

Retrieval guides

Follow the Cohere RAG with XERJ walkthrough. Then read about reranking, hybrid search, reciprocal rank fusion and vector search in XERJ.