Interface BindexRepository

All Known Implementing Classes:
MongoBindexRepository

public interface BindexRepository
Repository interface for managing Bindex records.

Provides methods for retrieving, saving, and recommending Bindex entries based on classification, score, embedding vectors, and configuration.

  • Method Summary

    Modifier and Type
    Method
    Description
    find(org.machanism.machai.schema.Classification[] classifications, List<Double> embedding, long vectorSearchLimits, Double score, Configurator config)
    Finds and retrieves matching Bindex records using a combination of vector similarity search and metadata classification filtering.
    org.machanism.machai.schema.Bindex
    getBindex(String bindexId)
    Retrieves a Bindex entry by its unique identifier.
    save(org.machanism.machai.schema.Bindex bindex, List<Double> embeddingBson)
    Saves a Bindex entry to the repository, along with its embedding vector.
  • Method Details

    • find

      Collection<BindexInfo> find(org.machanism.machai.schema.Classification[] classifications, List<Double> embedding, long vectorSearchLimits, Double score, Configurator config)
      Finds and retrieves matching Bindex records using a combination of vector similarity search and metadata classification filtering.

      This method performs semantic searches using the provided vector embedding, narrows down results based on specific classification tags, and applies threshold filters to deliver highly relevant results.

      Parameters:
      classifications - an array of Classification filters to restrict the search scope, or null/empty to search across all categories
      embedding - the query vector representation used for calculating semantic similarity
      vectorSearchLimits - the maximum number of candidates to evaluate or retrieve during the vector search phase
      score - the minimum similarity score threshold (only records with a relevance score equal to or higher than this value will be returned)
      config - the Configurator containing execution or contextual configurations
      Returns:
      a collection of BindexInfo elements matching the search criteria, typically sorted by descending similarity score
    • getBindex

      org.machanism.machai.schema.Bindex getBindex(String bindexId)
      Retrieves a Bindex entry by its unique identifier.
      Parameters:
      bindexId - the unique identifier of the Bindex entry
      Returns:
      the Bindex entry if found, or null if not found
    • save

      String save(org.machanism.machai.schema.Bindex bindex, List<Double> embeddingBson)
      Saves a Bindex entry to the repository, along with its embedding vector.
      Parameters:
      bindex - the Bindex object to save
      embeddingBson - the embedding vector associated with the Bindex entry
      Returns:
      the unique identifier assigned to the saved Bindex entry