Package org.machanism.machai.bindex.core


package org.machanism.machai.bindex.core
Supplies persistence, semantic search, and recommendation services for Bindex metadata.

A Bindex describes a library or integration, including its identity, version, description, dependencies, and Classification metadata. The types in this package form the core workflow around that description:

  • BindexRepository defines operations for saving Bindex documents, retrieving a document by its identifier, and finding relevant documents from classification filters and an embedding vector.
  • MongoBindexRepository provides the repository implementation using MongoDB. It stores the serialized Bindex together with searchable classification fields and the classification embedding, and also exposes document deletion and registration-identifier lookup.
  • Picker turns a natural-language request into one or more classifications with a configured GenAI provider, creates an embedding, and delegates semantic matching to a BindexRepository. It also registers Bindex entries and recursively resolves their dependencies.
  • BindexInfo is the compact result model used for recommendations; it contains the selected Bindex identifier, version, description, and similarity score.

A typical integration configures a Configurator, constructs a MongoBindexRepository with it, and supplies that repository to a Picker. The configurator selects the MongoDB connection and the GenAI and embedding providers. Callers should close the MongoDB repository when it is no longer needed so that its client resources are released.

For example:

 Configurator config = ...;
 BindexRepository repository = new MongoBindexRepository(config);
 Picker picker = new Picker(repository, config);
 Collection<BindexInfo> matches = picker.pick(request, 20, 0.75, config);
 
See Also:
  • Class
    Description
    Represents metadata information for a Bindex record, including its identifier, version, description, and relevance score.
    Repository interface for managing Bindex records.
    MongoDB-backed repository for persisting and retrieving Bindex documents.
    Performs Bindex registration, lookup, and semantic retrieval using embeddings and MongoDB.