semantic search
Semantic Search provides powerful semantic search capabilities that find text, documents, and articles based on meaning, not just keywords.
semantic search
Semantic Search provides powerful semantic search capabilities that find text, documents, and articles based on meaning, not just keywords.
semantic search
Semantic Search provides powerful semantic search capabilities that find text, documents, and articles based on meaning, not just keywords.
Vector search: English
Vector search: Multilingual
"At ML6, we see that multilingualism remains a major challenge in an English-centric NLP landscape — especially in Europe. Naturally, we are actively on the lookout for solutions and have been impressed by what we’ve seen from Cohere thus far!"
Simple APIs, powerful results
No matter your level of experience with ML/AI, the Cohere Platform makes it easy to add search to your applications.
1import cohere #Install with: pip install cohere
2import hnswlib #Install with: pip install hnswlib
3co = cohere.Client('{apiKey}')
4
5docs = [
6 'Cohere offers NLP foundation models as an easy to use service.',
7 'Semantic search is based on vectors, it works for 100+ languages.',
8 'Our generate model is powered by a large language model.'
9]
10
11#Get your document embeddings
12doc_embs = co.embed(texts=docs, model='embed-english-v3.0', input_type=search_documents).embeddings
13
14#Create a search index
15index = hnswlib.Index(space='ip', dim=1024)
16index.init_index(max_elements=len(doc_embs), ef_construction=512, M=64)
17index.add_items(doc_embs, list(range(len(doc_embs))))
18
19#Search
20query = "What is semantic search"
21query_emb = co.embed(texts=[query], model='embed-english-v3.0', input_type=search_query).embeddings
22doc_ids = index.knn_query(query_emb, k=1)[0][0]
23
24for doc_id in doc_ids:
25 print(docs[doc_id])
1Semantic search is based on vectors, it works for 100+ languages.
Our search functionality provides accurate and relevant results regardless of the language used in the search query. Search and retrieve documents in any language with our multilingual capabilities.
Our user-friendly API allows for seamless integration into your applications. Use our managed service or host it yourself, it works the same way.
Our search capabilities can be deployed on various platforms and customized to fit your specific domain needs. Plus, we keep our pricing competitive and cost-effective.
Our search functionality provides accurate and relevant results regardless of the language used in the search query. Search and retrieve documents in any language with our multilingual capabilities.
Our user-friendly API allows for seamless integration into your applications. Use our managed service or host it yourself, it works the same way.
Our search capabilities can be deployed on various platforms and customized to fit your specific domain needs. Plus, we keep our pricing competitive and cost-effective.
Semantic search documentation
Learn how to implement semantic search using Cohere’s embedding models.
Get started with Cohere today!
Reach out to us and let’s discuss your search needs.