text: Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAleph AlphaAzureOpenAIBedrock EmbeddingsClarifaiCohereDashScopeDeepInfraElasticsearchEmbaasFake EmbeddingsGoogle Cloud Platform Vertex AI PaLMGPT4AllHugging Face HubInstructEmbeddingsJinaLlama-cppLocalAIMiniMaxModelScopeMosaicML embeddingsNLP CloudOpenAISageMaker Endpoint EmbeddingsSelf Hosted EmbeddingsSentence Transformers EmbeddingsSpacy EmbeddingTensorflowHubAgent toolkitsToolsVector storesGrouped by providerIntegrationsText embedding modelsAleph AlphaOn this pageAleph AlphaThere are two possible ways to use Aleph Alpha's semantic embeddings. If you have texts with a dissimilar structure (e.g. a Document and a Query) you would want to use asymmetric embeddings. Conversely, for texts with comparable structures, symmetric embeddings are the suggested approach.Asymmetricâ€‹from langchain.embeddings import AlephAlphaAsymmetricSemanticEmbeddingdocument = "This is a content of the document"query = "What is the contnt of the document?"embeddings = AlephAlphaAsymmetricSemanticEmbedding()doc_result = embeddings.embed_documents([document])query_result = embeddings.embed_query(query)Symmetricâ€‹from langchain.embeddings import AlephAlphaSymmetricSemanticEmbeddingtext = "This is a test text"embeddings = AlephAlphaSymmetricSemanticEmbedding()doc_result = embeddings.embed_documents([text])query_result = embeddings.embed_query(text)PreviousText embedding modelsNextAzureOpenAIAsymmetricSymmetricCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.