Skip to main content

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, and query embeddings 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
  1. 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 to true for normalized embeddings.
  2. Advanced Parameters:

    • hosting: Datacenter processing option (aleph-alpha for 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.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-embeddings-alephalpha 0.7.0
File Size Uploaded Provenance Actions
llama_index_embeddings_alephalpha-0.7.0.tar.gz 5.6 kB Without provenance Details for llama_index_embeddings_alephalpha-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-embeddings-alephalpha 0.7.0
File Interpreter ABI Platform Actions
llama_index_embeddings_alephalpha-0.7.0-py3-none-any.whl Python 3 none any Details for llama_index_embeddings_alephalpha-0.7.0-py3-none-any.whl

Total release size: 10.9 kB

Release files / llama_index_embeddings_alephalpha-0.7.0.tar.gz

Download URL llama_index_embeddings_alephalpha-0.7.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
aa1672eb7778b7fda4a8c907649a5ef1cf0f5f8d9e11de000a28e27e9a9d155a
BLAKE2b-256 checksum
How to use checksums
244cca6faad873f895a4d3ad40ca2fa3f378b929f201c0338746d933cd7530a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.7.0-py3-none-any.whl

Download URL llama_index_embeddings_alephalpha-0.7.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7767665afb664977ee0e9453fd44d3b552bc6f6f5cda96dae715d8d9e7c5fa7c
BLAKE2b-256 checksum
How to use checksums
22f60c597efb08ced0d6cefd98573591658e0d886a4936e320f6ddac9fbb087c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.7.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page