One AI Assistant Technical Overview

About the One AI Embedding Service

Embedding services turn text into a numerical format that captures its meaning, making it easier for computers to understand, find, and compare information. It’s like giving computers a way to understand and process language in a smart, efficient manner.

One AI uses OpenAI embedding services to generate and maintain embeddings. The One AI Embedding service takes a user-defined set of metrics and dimensions and turns them into a numeric representation (an embedding), which is stored in a Vector database - One Model uses pgvector and this is managed within the One Model AWS environment. These embeddings are used by the One AI Assistant Query Generator to map user concepts to user data (e.g., people = Headcount SOP).

Input Term:

“Headcount”

Generated Embedding (example vector):

[0.312, -0.578, 0.126, -0.987, 0.453, 0.112, -0.764, 0.239, -0.041, 0.789, ...]

Explanation:

Each number in the vector represents a dimension in the embedding space. The length of the vector captures various aspects of the term “Headcount.” The embedding allows the Query Generator to match concepts in a free text request to real data concepts within your data model ( ex: People = Headcount ) by comparing the similarity of the vectors between two terms. 

When and What Embedding Data is Stored in OpenAI

The OpenAI embedding endpoint is utilized during processing on a One Model site. Users have full control over the type and details of the data transmitted to the embedding endpoint, which can be managed from the Embeddings settings page. 

After the embeddings are generated using the OpenAI endpoint, they are stored within One Model’s infrastructure. Please note that the embedding data is not stored with OpenAI.

About the One AI Query Generator Service

The One AI Query Generator service takes a free-text request from a user and generates a query to run against a user’s dataset using the One Model Query Engine. Currently, we use OpenAI’s Chat Completion endpoints with fine-tuned assistants. These assistants are trained on synthetic data. We share the raw input text from the user with these fine-tuned models, which are hosted on OpenAI.

Example Request:

“Forecast headcount in Japan over the next 3 months using the past 5 years of data.”

The fine-tuned models decompose the request to label key words that we will match concepts to in order to run a query against One Model.

Example Decomposition:

“dimension_nodes” = “Japan”

Once the fine-tuned models have decomposed all the required concepts, we use these concepts to match against an embeddings database. The matched concepts are then used to build and run a query within One Model. 

When and What Data One AI Query Generator Stores in OpenAI

When a user submits a request through the frontend of the One AI assistant, the request is sent to fine-tuned models hosted on OpenAI. After the request is processed, the data is transferred to One Model. Currently, requests are not stored on OpenAI.

Looking ahead, we plan to introduce threads that will allow users to have iterative conversations and refine their queries further. Once this feature is launched, user requests will be temporarily stored in a thread on OpenAI while the thread remains active. These threads will be cleared once the user closes the One AI assistant, ensuring that any conversation data is also removed from OpenAI at that time.

Overview Diagram

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.