Hi whats the difference and what's the relation with python version since the python version I believe only have 1 kind ?
from fastembed.embedding import FlagEmbedding as Embedding
from typing import List
import numpy as np
documents: List[str] = [
"passage: Hello, World!",
"query: Hello, World!", # these are two different embedding
"passage: This is an example passage.",
"fastembed is supported by and maintained by Qdrant." # You can leave out the prefix but it's recommended
]
embedding_model = Embedding(model_name="BAAI/bge-base-en", max_length=512)
embeddings: List[np.ndarray] = list(embedding_model.embed(documents)) # Note the list() call - this is a generator
The Python version supports query_embed() and passage_embed() too.
These methods prefix the text with 'query: ' and 'passage: ' respectively before generating embeddings for better results.
Hi whats the difference and what's the relation with python version since the python version I believe only have 1 kind ?
Thanks