AlephAlphaSymmetricSemanticEmbedding()Whether the embeddings should be normalized to unit vectors
Symmetric version of the Aleph Alpha's semantic embeddings.
The main difference is that here, both the documents and queries are embedded with a SemanticRepresentation.Symmetric Example: .. code-block:: python
from aleph_alpha import AlephAlphaSymmetricSemanticEmbedding
embeddings = AlephAlphaAsymmetricSemanticEmbedding(
normalize=True, compress_to_size=128
)
text = "This is a test text"
doc_result = embeddings.embed_documents([text])
query_result = embeddings.embed_query(text)
Call out to Aleph Alpha's Document endpoint.
Call out to Aleph Alpha's asymmetric, query embedding endpoint Args: text: The text to embed.