Models
Zero Entropy offers two reranking models:zerank-1: Flagship state-of-the-art reranker (non-commercial license)zerank-1-small: Open-source model (Apache 2.0 license)
Installation
Configuration
Python
TypeScript (self-hosted)
The TypeScript OSS SDK (mem0ai/oss) ships the Zero Entropy reranker under the same provider name as Python, zero_entropy. It reads the key from config or ZERO_ENTROPY_API_KEY and defaults to the zerank-1 model.
Environment Variables
Set your API key as an environment variable:Usage Example
Python
Configuration Parameters
Performance
- Fast: Optimized neural architecture for low latency
- Accurate: State-of-the-art relevance scoring
- Cost-effective: ~$0.025/1M tokens processed
Best Practices
- Model Selection: Use
zerank-1for best quality,zerank-1-smallfor faster processing - Batch Size: Process multiple queries together when possible
- Top-k Limiting: Set reasonable
top_kvalues (5-20) for best performance - API Key Management: Use environment variables for secure key storage