AlephAlphaAsymmetricSemanticEmbedding()Aleph Alpha's asymmetric semantic embedding.
AA provides you with an endpoint to embed a document and a query. The models were optimized to make the embeddings of documents and the query for a document as similar as possible. To learn more, check out: https://docs.aleph-alpha.com/docs/tasks/semantic_embed/
Example:
.. code-block:: python from aleph_alpha import AlephAlphaAsymmetricSemanticEmbedding
embeddings = AlephAlphaAsymmetricSemanticEmbedding( normalize=True, compress_to_size=128 )
document = "This is a content of the document" query = "What is the content of the document?"
doc_result = embeddings.embed_documents([document]) query_result = embeddings.embed_query(query)