LlamaIndex Embeddings Integration: Aleph Alpha
This README provides an overview of integrating Aleph Alpha's semantic embeddings with LlamaIndex. Aleph Alpha's API enables the generation of semantic embeddings from text, which can be used for downstream tasks such as semantic similarity and models like classifiers.
Features
- Semantic Embeddings: Generate embeddings for text prompts using Aleph Alpha models.
- Model Selection: Utilize the latest version of specified models for generating embeddings.
- Representation Types: Choose from
symmetric,document, andqueryembeddings based on your use case. - Compression: Option to compress embeddings to 128 dimensions for faster comparison.
- Normalization: Retrieve normalized embeddings to optimize cosine similarity calculations.
Installation
pip install llama-index-embeddings-alephalpha
Usage
from llama_index.embeddings.alephalpha import AlephAlphaEmbedding
-
Request Parameters:
model: Model name (e.g.,luminous-base). The latest model version is used.representation: Type of embedding (symmetric,document,query).prompt: Text or multimodal prompt to embed. Supports text strings or an array of multimodal items.compress_to_size: Optional compression to 128 dimensions.normalize: Set totruefor normalized embeddings.
-
Advanced Parameters:
hosting: Datacenter processing option (aleph-alphafor maximal data privacy).contextual_control_threshold,control_log_additive: Control attention parameters for advanced use cases.
Response Structure
model_version: Model name and version used for inference.embedding: List of floats representing the generated embedding.num_tokens_prompt_total: Total number of tokens in the input prompt.
Example
See the example notebook for a detailed walkthrough of using Aleph Alpha embeddings with LlamaIndex.
API Documentation
For more detailed API documentation and available models, visit Aleph Alpha's API Docs.
Metadata
Release files for llama-index-embeddings-alephalpha 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llama_index_embeddings_alephalpha-0.6.0.tar.gz | 5.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llama_index_embeddings_alephalpha-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / llama_index_embeddings_alephalpha-0.6.0.tar.gz
| Download URL | llama_index_embeddings_alephalpha-0.6.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f91c76d522b770296631b200f171f8b9fad365e1d031f19d76d81e5a30b74aee
|
|
BLAKE2b-256 checksum How to use checksums |
625fade81a4e6041ca320c5524727500512d524694d8d745c1df0795c74963a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_embeddings_alephalpha-0.6.0-py3-none-any.whl
| Download URL | llama_index_embeddings_alephalpha-0.6.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4de67e91514b737ab1c42d3d2b05e9821f11e11e4689b85bad0ff2cd82560afa
|
|
BLAKE2b-256 checksum How to use checksums |
c9df7d26dd6262de83351ac4da2517d642cab57026213a459730c010189c38ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llama-index-embeddings-alephalpha 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.