Skip to main content

LlamaIndex Postprocessor Integration: AWS Bedrock Rerankers

Sample Usage

from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
from llama_index.postprocessor.bedrock_rerank import BedrockRerank


documents = SimpleDirectoryReader("./data/paul_graham/").load_data()
index = VectorStoreIndex.from_documents(documents=documents)
reranker = BedrockRerank(
    top_n=3,
    rerank_model_name="cohere.rerank-v3-5:0",
    region_name="us-west-2",
)
query_engine = index.as_query_engine(
    similarity_top_k=10,
    node_postprocessors=[reranker],
)
response = query_engine.query(
    "What did Sam Altman do in this essay?",
)

print(response)

print(response.source_nodes)

Metadata

Release files for llama-index-postprocessor-bedrock-rerank 0.8.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-bedrock-rerank 0.8.0
File Size Uploaded Provenance Actions
llama_index_postprocessor_bedrock_rerank-0.8.0.tar.gz 5.6 kB Without provenance Details for llama_index_postprocessor_bedrock_rerank-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-postprocessor-bedrock-rerank 0.8.0
File Interpreter ABI Platform Actions
llama_index_postprocessor_bedrock_rerank-0.8.0-py3-none-any.whl Python 3 none any Details for llama_index_postprocessor_bedrock_rerank-0.8.0-py3-none-any.whl

Total release size: 10.9 kB

Release files / llama_index_postprocessor_bedrock_rerank-0.8.0.tar.gz

Download URL llama_index_postprocessor_bedrock_rerank-0.8.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e4ee73bc42531d1666c5f8cd819610774e1837bda8d94a480b3b870d11db89a6
BLAKE2b-256 checksum
How to use checksums
e7797525400cb25840f70ee816e21e4e0344e21febab2543c075b2628bb8d3eb
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_postprocessor_bedrock_rerank-0.8.0-py3-none-any.whl

Download URL llama_index_postprocessor_bedrock_rerank-0.8.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea5df91341d90112ca06ed3bfa3c6bba29e69e792c11cccbd8b8f1a860c68806
BLAKE2b-256 checksum
How to use checksums
76474848cadca55a3e89030ce1e12e90b169aa883f6d5b2d50d04a2399f5ad9a
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-postprocessor-bedrock-rerank 0.8.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