ReferenceCLIReranker
Reranker Create
Reranker Create CLI command reference
goodmem reranker create
Create a new reranker
Synopsis
Create a new reranker in the GoodMem service with the specified configuration.
goodmem reranker create [flags]Examples
# Create a Cohere reranker with a client-provided ID
goodmem reranker create \
--id "123e4567-e89b-12d3-a456-426614174000" \
--display-name "Cohere Reranker" \
--provider-type COHERE \
--endpoint-url "https://api.cohere.com" \
--model-identifier "rerank-english-v3.0" \
--cred-api-key "YOUR_COHERE_API_KEY"
# Create a Cohere reranker (server-generated ID)
goodmem reranker create \
--display-name "Cohere Reranker" \
--provider-type COHERE \
--endpoint-url "https://api.cohere.com" \
--model-identifier "rerank-english-v3.0" \
--cred-api-key "YOUR_COHERE_API_KEY"
# Create a Jina reranker with inline credentials
goodmem reranker create \
--display-name "Jina Reranker" \
--provider-type JINA \
--endpoint-url "https://api.jina.ai" \
--model-identifier "jina-reranker-v3" \
--cred-api-key "YOUR_JINA_API_KEY"
# Create a Voyage AI reranker with inline credentials
goodmem reranker create \
--display-name "Voyage Reranker" \
--provider-type VOYAGE \
--endpoint-url "https://api.voyageai.com/v1" \
--model-identifier "rerank-2.5" \
--cred-api-key "YOUR_VOYAGE_API_KEY"
# Create a local vLLM reranker (self-hosted, no credentials needed)
goodmem reranker create \
--display-name "Local vLLM" \
--provider-type VLLM \
--endpoint-url "http://localhost:8000" \
--model-identifier "BAAI/bge-reranker-v2-m3" \
--label environment=dev
# Create a TEI reranker (HuggingFace Text Embeddings Inference)
goodmem reranker create \
--display-name "TEI Local" \
--provider-type TEI \
--endpoint-url "http://localhost:8081" \
--model-identifier "cross-encoder/ms-marco-MiniLM-L-6-v2"
# Create a reranker for another user (requires admin permissions)
goodmem reranker create \
--display-name "Team Cohere Reranker" \
--provider-type COHERE \
--endpoint-url "https://api.cohere.com" \
--model-identifier "rerank-english-v3.0" \
--cred-api-key "TEAM_API_KEY" \
--owner 123e4567-e89b-12d3-a456-426614174000
# Create a DashScope text reranker in Singapore using the native API
goodmem reranker create \
--display-name "DashScope qwen3-rerank" \
--provider-type DASHSCOPE \
--endpoint-url "https://dashscope-intl.aliyuncs.com" \
--model-identifier "qwen3-rerank" \
--modalities TEXT \
--dashscope-api-dialect RERANK_NATIVE_NESTED \
--cred-api-key-prompt
# Verify a DashScope endpoint and dialect before creating the reranker
goodmem doctor reranker "https://dashscope-intl.aliyuncs.com" \
--model "qwen3-rerank" \
--probe-dialect \
--cred-api-key-prompt
# Create a vLLM reranker with a task instruction and a document template.
# vLLM has an instruction field, so GoodMem sends the instruction there.
# The document template puts the memory's title in front of each candidate.
goodmem reranker create \
--display-name "Qwen3 Reranker" \
--provider-type VLLM \
--endpoint-url "http://localhost:8000" \
--model-identifier "Qwen/Qwen3-Reranker-0.6B" \
--instruction "Given a web search query, retrieve relevant passages that answer the query" \
--document-template "Title: {{ memory.metadata.title | default('none') }} / {{ content }}"
# Create a reranker whose provider has no instruction field: the query template places
# the instruction. $'...' makes \n a real line break; GoodMem does not interpret \n itself.
goodmem reranker create \
--display-name "Voyage Reranker with instruction" \
--provider-type VOYAGE \
--endpoint-url "https://api.voyageai.com/v1" \
--model-identifier "rerank-2.5" \
--cred-api-key "YOUR_VOYAGE_API_KEY" \
--instruction "Prefer documents that give a definition" \
--query-template $'{{ instruction }}\nQuery: {{ content }}'Options
--api-path string Optional API operation path; omitted values use a provider- and dialect-specific default
--cred-api-key string API key for provider endpoint (use "-" to read from piped stdin)
--cred-api-key-file string Read API key from file (file should be mode 0600)
--cred-api-key-prompt[=true|false] Prompt for API key interactively (requires TTY, input hidden)
--cred-gcp[=true|false] Use Google Application Default Credentials
--cred-gcp-quota string Quota project for Google ADC requests
--cred-gcp-scope strings Additional Google ADC OAuth scope (can be specified multiple times)
--dashscope-api-dialect string DashScope API dialect for DashScope resources only (RERANK_NATIVE_NESTED or RERANK_COMPATIBLE_FLAT)
--description string Description of the reranker
--display-name string Display name for the reranker (required)
--document-template string Template applied to each candidate before it is ranked; it must output {{ content }} exactly once and can read memory.metadata.<key>, memory.createdAt, and chunk.sequenceNumber. A line break in a template must be a real line break, not the two characters \n: use the matching -file flag or shell quoting such as $'...'
--document-template-file string File that holds the document template. One leading UTF-8 BOM and one final line break are removed; the remaining content must be nonempty
--endpoint-url string Provider endpoint base URL without the operation path (required)
-h, --help[=true|false] help for create
--id string Optional: Client-provided UUID for the reranker (16 bytes). Server generates if omitted.
--instruction string Task instruction, as plain text (not a template). The query template places it where it reads {{ instruction }}; otherwise it is sent in the provider's instruction field when the provider has one
--label strings Labels in key=value format (can be specified multiple times)
--modalities strings Supported modalities (TEXT, IMAGE, AUDIO, VIDEO); defaults to TEXT
--model-identifier string Model identifier (required)
--monitoring-endpoint string Monitoring endpoint URL
--owner string Owner ID (for admin use, requires CREATE_RERANKER_ANY permission)
--provider-type string Provider type (VLLM, TEI, LLAMA_CPP, VOYAGE, COHERE, JINA, DASHSCOPE) (required)
--query-template string Template applied to query text; it must output {{ content }} exactly once. A line break in a template must be a real line break, not the two characters \n: use the matching -file flag or shell quoting such as $'...'
--query-template-file string File that holds the query template. One leading UTF-8 BOM and one final line break are removed; the remaining content must be nonempty
--version string Version informationOptions inherited from parent commands
--api-key string API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
--server string GoodMem server URL (gRPC API; default ports: https=443, http=80)SEE ALSO
- goodmem reranker - Manage GoodMem rerankers