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.
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
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
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
xerj autoindex for files and folders. xerj connect postgres://... follows a live table, so new rows are searchable without a re-index. #2984
| You have | XERJ adds |
|---|---|
| Command for RAG | retrieval over your files and databases, with citations that resolve to a file and page |
| Rerank | a first-stage search to rerank: BM25, kNN or both, in one call |
| Embed | an index that stores the vectors and searches them next to keyword matches |
| A private deployment, on-prem or VPC | a search layer that runs on one CPU server in the same network, no GPU |
| Agents | an MCP server and Chat v2 tool schemas for search and memory |
# 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.
| Capability | Status |
|---|---|
Cohere Rerank provider on _search | shipped (rc.102) |
| Cohere Embed via the proxy embedder, Command tool schema, Command RAG cookbook | shipped (rc.102) |
| Live Postgres source, table rows to facts | shipped (rc.102) |
Files, folders, S3, SQLite, SQL dumps via xerj autoindex | shipped |
Native /v2/embed with input_type, int8 and binary vectors; MCP over HTTP | roadmap |
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.
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.
Follow the Cohere RAG with XERJ walkthrough. Then read about reranking, hybrid search, reciprocal rank fusion and vector search in XERJ.