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.2.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.2.tar.gz.

File metadata

File hashes

Hashes for llama_index_retrievers_superlinked-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b3b8d14f1e237b14e0cfd82e3296c21644edab330c7b8a83b2a2aed05ced7b59
MD5 cf16247fe2d660cae85392613385bb23
BLAKE2b-256 d05b1d0d9f6c4808064aa94c02f9d30e5b6cf5d6aa3478a570d55b3358af69c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_retrievers_superlinked-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6cb3df82518ee7adc87418ba48ed12a7aa8d98397ee0b34a36a74bbc5f1638fc
MD5 1151b5aa3b2991f28d06535df714666c
BLAKE2b-256 dfb7a28f3ac972f4c37b77febfea26f765bd9ce8480e79b3166b069e352a7bc1

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