Skip to main content

LlamaIndex retriever integration for Superlinked

Project description

LlamaIndex Superlinked Retriever

A LlamaIndex retriever integration for Superlinked, mirroring the structure of official LlamaIndex retriever packages.

Installation

Option A (standalone dev):

python -m venv .venv && source .venv/bin/activate
pip install -U pip
pip install -e .
pip install pytest

Option B (monorepo): Add this directory under llama-index-integrations/retrievers and install with the monorepo tooling.

Note: Examples require Python 3.10–3.12 (Superlinked does not support Python 3.9).

References and resources

Usage

from llama_index.retrievers.superlinked import SuperlinkedRetriever
from llama_index.core import QueryBundle

retriever = SuperlinkedRetriever(
    sl_client=app,  # Superlinked App
    sl_query=query_descriptor,  # Superlinked QueryDescriptor
    page_content_field="text",
    query_text_param="query_text",
    metadata_fields=None,
    top_k=4,
)

nodes = retriever.retrieve("What is a landmark in Paris?")

Development

  • Follows LlamaIndex contribution guidelines.
  • Run tests: pytest -q.

Testing without Superlinked

Tests use mocks for the superlinked imports so they can run without the dependency installed.

Example

An end-to-end example is provided in examples/steam_games_example.py.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_retrievers_superlinked-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_retrievers_superlinked-0.1.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_retrievers_superlinked-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1420c94381fa9e979891c1fc6be3df9f35fa3d413f62a3e979e9d337eb3bd30c
MD5 16230a9787ccbb37c1f165e970a14529
BLAKE2b-256 435ed235ccc982029e101303b9bd28729432a078e005f9301f068700b31aa3ac

See more details on using hashes here.

File details

Details for the file llama_index_retrievers_superlinked-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_retrievers_superlinked-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6911986a30f6283729f0f4cfc17761b8316b534bae55385660e928592c47b655
MD5 df00a765262242c105dd18167f11c726
BLAKE2b-256 af0c803d56a395f59446a3e2f260e7b1227dd07ae7ad4ecc7c72d713bf7c693b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page