What is Cohere?
Cohere provides production-ready AI models for enterprises, specializing in embeddings, classification, and retrieval augmented generation (RAG). Cohere’s models excel at semantic search, text classification, and reranking results for improved relevance.Key features
- Enterprise embeddings: High-quality multilingual embeddings for semantic search
- Text classification: Classify text into categories with custom examples
- Semantic reranking: Improve search relevance by reordering results
- Chat with RAG: Ground responses in your documents
- Production-ready: Built for scale with enterprise support
Prerequisites
To use Cohere functions, you need:- A Cohere API key from dashboard.cohere.com
- API key configured in your database (see configuration section below)
Quick start
Generate embeddings
Create vector embeddings for semantic search:Classify text
Categorize text using custom examples:Rerank search results
Improve search relevance by reordering results:Chat completion
Have conversations grounded in your documents:Configuration
Store your Cohere API key securely in the database:Available functions
Embeddings
cohere_embed(): generate vector embeddings from text
Classification
cohere_classify(): classify text with full API responsecohere_classify_simple(): classify text with simplified response
Reranking
cohere_rerank(): rerank documents with full API responsecohere_rerank_simple(): rerank documents with simplified response
Chat
cohere_chat_complete(): chat with RAG support
Tokenization
cohere_tokenize(): convert text to tokenscohere_detokenize(): convert tokens back to text
Model management
cohere_list_models(): list available Cohere models
Available models
Cohere offers specialized models for different tasks:- Embeddings:
embed-english-v3.0,embed-multilingual-v3.0 - Reranking:
rerank-english-v3.0,rerank-multilingual-v3.0 - Chat:
command-r-plus,command-r