Node Details

  • Name: CohereEmbedding_Embeddings
  • Type: CohereEmbeddings
  • Version: 3.0
  • Category: Embeddings

Base Classes

  • CohereEmbeddings
  • (Additional base classes from LangChain’s CohereEmbeddings)

Parameters

Credential (Required)

  • Type: cohereApi
  • Required Fields: cohereApiKey

Inputs

  1. Model Name

    • Type: asyncOptions
    • Default: “embed-english-v2.0”
    • Description: The name of the Cohere embedding model to use.
    • Note: Available models are loaded dynamically.
  2. Input Type

    • Type: options
    • Default: “search_query”
    • Options:
      • search_document: For encoding documents to store in a vector database for search use-cases.
      • search_query: For querying a vector database to find relevant documents.
      • classification: For using embeddings as input to a text classifier.
      • clustering: For clustering embeddings.
    • Description: Specifies the type of input passed to the model. Required for embedding models v3 and higher.

Functionality

  1. The node first retrieves the necessary credentials (Cohere API key) and input parameters.
  2. It then initializes a CohereEmbeddings instance with the provided configuration.
  3. The resulting model can be used to generate embeddings for given text inputs.

Use Cases

  1. Semantic Search: Generate embeddings for documents and queries to perform semantic search operations.
  2. Text Classification: Create embeddings as input features for text classification tasks.
  3. Document Clustering: Generate embeddings to group similar documents together.
  4. Information Retrieval: Enhance document retrieval systems by using semantic embeddings.

Notes

  • The node dynamically loads available embedding models specific to Cohere.
  • It supports different input types, allowing for optimization based on the specific use case (search, classification, clustering).
  • The Cohere API key is required and should be securely stored and accessed.