Cohere + Moorcheh
This integration uses Cohere to generate embeddings and Moorcheh vector namespaces to store and search them with ITS ranking. Use this approach when you want full control over the embedding model (for example,embed-v4.0) and upload pre-computed vectors directly to Moorcheh.
Architecture
Embedding Generation
Generate vectors with Cohere
embed-v4.0Vector Storage
Store vectors in Moorcheh vector namespaces
Semantic Retrieval
Search by vector query for high-relevance results
Model Flexibility
Keep your preferred embedding provider while using Moorcheh search
Prerequisites
MOORCHEH_API_KEYfrom the Moorcheh ConsoleCOHERE_API_KEYfrom Cohere- Python 3.9+
End-to-end Example
Important Notes
Vector dimension must match
Vector dimension must match
The namespace
vector_dimension must exactly match the dimension returned by your Cohere embedding configuration.Use the right input type
Use the right input type
Use
search_document when embedding stored documents and search_query for user queries.Store text in metadata for direct display
Store text in metadata for direct display
Include
text in each uploaded vector object. Moorcheh stores it as metadata, so search results can return the original content without refetching from another data source.Improve relevance with chunking and threshold
Improve relevance with chunking and threshold
Use coherent chunks (typically 500-1000 characters) with overlap, keep query phrasing intent-rich, and tune
kiosk_mode + threshold to filter weaker matches.Keep model settings consistent
Keep model settings consistent
Use the same embedding model/version and parameters for both index-time and query-time embeddings.
Troubleshooting
No vector namespace found: Create the namespace first withtype="vector".Dimension mismatch: Recreate the namespace with the correctvector_dimensionfor your embedding output.- Low relevance: Re-check chunking strategy and ensure document/query input types are correct.