Workflow

The Optimal Model Retrieval Protocol (OMRP) follows a specific workflow to process user prompts and select appropriate AI models. This section outlines the step-by-step process of the OMRP workflow, focusing on the core discovery functionality.

1. Prompt Reception

  • An external system submits a user's prompt to OMRP through the Input Interface.

  • The Discovery Service receives the prompt along with any relevant metadata.

2. Query Embedding Generation

  • The Discovery Service sends the prompt to the Embedding Service.

  • The Embedding Service generates a vector representation (embedding) of the prompt.

  • The query embedding is returned to the Discovery Service.

3. Model Embedding Retrieval

  • The Discovery Service queries the ModelDB for relevant model embeddings.

  • The ModelDB returns a set of model embeddings that potentially match the query.

4. Nearest Neighbor Search Algorithm

  • The Discovery Service performs a k-Nearest Neighbors (k-NN) search using the query embedding and the retrieved model embeddings.

  • Cosine similarity is calculated between the query embedding and each model embedding.

  • The k most similar models are selected as potential matches.

5. Model Selection Process

  • The Generative Prompt Search Model, a proprietary reinforcement learning algorithm, is used to find the best-suited models for the user's query.

  • The ranking algorithm suggests free models and returns the fastest and free response to the user.

  • Additional information regarding models that would be best suited for this prompt but require credits is presented to the user.

6. Return Results

  • The identifiers of the selected models are returned to the Discovery Service.

  • The Discovery Service prepares the response, including selected model identifiers and any relevant metadata.

  • The response is sent back to the calling external system through the Output Interface.

This workflow demonstrates how OMRP efficiently handles the process of matching user prompts to optimal AI models. It leverages its various components to ensure accurate and efficient model discovery, providing a crucial service within a larger AI interaction ecosystem.

Last updated