Skip to main content

ruvector-rerank: Attention ranking for RAG in Python

Attention ranking for RAG: Python API to PyO3 to Rust

What is ruvector-rerank?

ruvector-rerank provides attention ranking for rag through ruvector-attention in the RuVector Rust library family. It adds a focused Python API over the existing ruvector PyO3 runtime. It does not ship a separate native engine or reduce the shared runtime's installation size.

Install

pip install ruvector-rerank==0.1.0

Release candidate: this command works only after publication. From a checkout, install ruvector==0.1.2 and then pip install ./python/portfolio/ruvector-rerank. Python 3.10 or newer; native platform support follows the shared runtime wheels.

Quick start

from ruvector_rerank import rank
hits = rank([1, 0], [[0, 1], [1, 0], [-1, 0]], top_k=2)
assert [hit.index for hit in hits] == [1, 0]

API and limitations

Public exports: RankedCandidate, rank. Scaled dot product attention ranking, not a trained semantic cross encoder. It cannot improve ordering over the same dot product scores. Useful for attention weights, deterministic candidate ordering and RAG plumbing.

Input conversion can copy arrays. Reuse contiguous float32 arrays for repeated operations. No service, telemetry or credentials are added by this package. Apply application memory and request limits for untrusted data.

How does it relate to RuVector?

The algorithm executes through the existing Rust PyO3 binding, pinned to ruvector==0.1.2. Python implements convenience conversion and result formatting. For vector search use pip install ruvector; for other capabilities see the Python portfolio.

Verification and security

CI tests built wheels against a native runtime compiled from this repository, checks sdists and README rendering, audits resolved dependencies and publishes through PyPI Trusted Publishing. Native vulnerability scanning is a separate required gate. See security scope.

Metadata

Release files for ruvector-rerank 0.1.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 ruvector-rerank 0.1.0
File Size Uploaded Provenance Actions
ruvector_rerank-0.1.0.tar.gz 3.3 kB Without provenance Details for ruvector_rerank-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ruvector-rerank 0.1.0
File Interpreter ABI Platform Actions
ruvector_rerank-0.1.0-py3-none-any.whl Python 3 none any Details for ruvector_rerank-0.1.0-py3-none-any.whl

Total release size: 7.4 kB

Release files / ruvector_rerank-0.1.0.tar.gz

Download URL ruvector_rerank-0.1.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1391ed03d050d02cd37dc4e227ccdaa626b21ac14deaf14294cfead136f25a56
BLAKE2b-256 checksum
How to use checksums
3141731a4c85e93f8d9082ef2406d5623155cd1974c496215b2cabc13eca5415
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / ruvector_rerank-0.1.0-py3-none-any.whl

Download URL ruvector_rerank-0.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d6140de18b85e6d20e7f91f0847dcda019c46aae667229f3d718f2b2e28dfe3
BLAKE2b-256 checksum
How to use checksums
8e3ceeec8e2c3804a8a9f412244d693ef0559558ca761e0e09163734d4ab2203
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for ruvector-rerank 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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