Skip to main content

LlamaIndex Postprocessor Integration: Alibabacloud_Aisearch_Rerank

Installation

pip install llama-index-postprocessor-alibabacloud-aisearch-rerank

Usage

For further details, please visit ranker-api-details.

You can specify the endpoint and aisearch_api_key in the constructor, or set the environment variables AISEARCH_ENDPOINT and AISEARCH_API_KEY.

from llama_index.core.data_structs import Node
from llama_index.core.schema import NodeWithScore
from llama_index.postprocessor.alibabacloud_aisearch_rerank import (
    AlibabaCloudAISearchRerank,
)

nodes = [
    NodeWithScore(
        node=Node(id_="1", text="<text1>"),
        score=0.7,
    ),
    NodeWithScore(
        node=Node(id_="2", text="<text2>"),
        score=0.8,
    ),
    NodeWithScore(
        node=Node(id_="3", text="<text3>"),
        score=0.1,
    ),
]
reranker = AlibabaCloudAISearchRerank(top_n=2)
new_nodes = reranker.postprocess_nodes(nodes, query_str="<query>")
for node in new_nodes:
    print(f"{node.node.text[:20]}\t{node.score}")

Metadata

Release files for llama-index-postprocessor-alibabacloud-aisearch-rerank 0.5.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-postprocessor-alibabacloud-aisearch-rerank 0.5.0
File Size Uploaded Provenance Actions
llama_index_postprocessor_alibabacloud_aisearch_rerank-0.5.0.tar.gz 5.0 kB Without provenance Details for llama_index_postprocessor_alibabacloud_aisearch_rerank-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-postprocessor-alibabacloud-aisearch-rerank 0.5.0
File Interpreter ABI Platform Actions
llama_index_postprocessor_alibabacloud_aisearch_rerank-0.5.0-py3-none-any.whl Python 3 none any Details for llama_index_postprocessor_alibabacloud_aisearch_rerank-0.5.0-py3-none-any.whl

Total release size: 10.0 kB

Release files / llama_index_postprocessor_alibabacloud_aisearch_rerank-0.5.0.tar.gz

Download URL llama_index_postprocessor_alibabacloud_aisearch_rerank-0.5.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
787574037f85b3fd749a2570b7fa3ad20cc9dd453f920301a91e56539734f539
BLAKE2b-256 checksum
How to use checksums
589c195a71c14530c911b6cc0ddd1f3cb69007fd1a45650c0f28f2992c8f6d7b
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_postprocessor_alibabacloud_aisearch_rerank-0.5.0-py3-none-any.whl

Download URL llama_index_postprocessor_alibabacloud_aisearch_rerank-0.5.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1665fa70661b4c85871fd7ca24973df906b3a4594cf704ac1d18f7042730d763
BLAKE2b-256 checksum
How to use checksums
73a7f2d4e823c38ca7f324d96c0769eb559bc33ea8b8f13ea696d7c763d659ba
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-postprocessor-alibabacloud-aisearch-rerank 0.5.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