An embedding is a sequence of numbers (a vector) that represents the semantic meaning of content such as natural language, code, or other structured data. They are widely used in Clustering, Semantic search and retrieval, Recommendation engines, Retrieval-Augmented Generation (RAG)
When using Cohere models via the embeddings API, you must include an additional field called input_type in the request. This field indicates the purpose of the embedding and must be one of the following:
search_query
search_document
classification
clustering
Copy
Ask AI
response = client.embeddings.create( model="cohere-main/embed-english-v3.0", input="Find similar documents about AI.", input_type="search_query")print(response.data[0].embedding)