An example would look like:

embedding.py
from incribo import Embedding

# Create a new embedding
emb = Embedding([1.0, 2.0, 3.0], "bert-base-uncased")

# Get the vector
vector = emb.get_vector()
print(f"Embedding vector: {vector}")

# Get the model name
model = emb.get_model()
print(f"Model: {model}")

# print the Embedding object 
print(emb)

Embedding component serves as a basic but important building block for more complex embedding management systems.

It ensures that each embedding vector is always associated with information about its source, which can be crucial for tasks like model comparison, versioning, and tracking the origins of different embeddings.

tl;dr of Embedding:

  • Storing embeddings along with their provenance information,
  • Comparing embeddings from different models,
  • Organizing and managing collections of embeddings.