Skip to main content

STEER

Semantic Transformation for Embedding-space Exploration in Retrieval

A retrieval primitive for controllable semantic navigation in embedding spaces. No retraining, no fine-tuning, works with any embedding model.

Paper: STEER: An Honest Evaluation of Sixteen Algebraic Operations

Install

pip install steer-retrieval

Quick Start

from steer import Steerer

# Initialize with any sentence-transformer model
steerer = Steerer(model_name="all-MiniLM-L6-v2")

# Index your corpus
steerer.index(["doc1 text...", "doc2 text...", ...])

# Baseline search
results = steerer.search("VEGF inhibition in retinal disease")

# Steered search: explore adjacent domain
results = steerer.search(
    "VEGF inhibition in retinal disease",
    target="oncology drug mechanisms",
    alpha=0.1,
)

# Contrastive: push toward positive, away from negative
results = steerer.contrastive_search(
    "VEGF inhibition in retinal disease",
    positive_target="oncology drug mechanisms",
    negative_target="basic laboratory research",
    alpha=0.1,
    beta=0.2,
)

# Gradient walk: see how results change across alpha values
walk = steerer.gradient_walk(
    "VEGF inhibition in retinal disease",
    target="oncology drug mechanisms",
)
for step in walk:
    print(f"alpha={step['alpha']}: {step['results'][0]['id']}")

Operations

STEER provides 16 operations built from a single primitive: normalize(q + alpha * t).

Operation Function Description
Rotate Toward rotate_toward(q, t, alpha) Move query toward target domain
Rotate Away rotate_away(q, t, alpha) Move query away (bias correction)
Contrastive contrastive(q, t_pos, t_neg, alpha, beta) Push/pull simultaneously
Amplify amplify(q, centroid, alpha) Intensify specificity
Diffuse diffuse(q, centroid, alpha) Generalize, increase diversity
Multi-View multi_view(q, targets, corpus, alpha) Parallel search + RRF fusion
Gradient Walk gradient_walk(q, t, corpus) Degradation curve for calibration
Consensus consensus(q, targets, alpha) Mean of multiple targets
Orbit orbit(q, targets, corpus, alpha) N separate result sets
Bridge bridge(q, source, dest, alpha) Domain transfer
Triangulate triangulate(q, t1, t2, a1, a2) Sequential 2-target steering
Isotropy Correct isotropy_correct(embeddings, k) Top-k PCA removal
Adaptive Alpha adaptive_alpha(q, t, alpha_max) Auto-calibrate per query
RRF Fusion rrf_fusion(scores_list, k) Reciprocal rank fusion

Key Findings

  • Contrastive asymmetric (alpha=0.1, beta=0.2) produces the strongest results: +3.5% nDCG
  • Rotate Away unexpectedly improves retrieval: +3.6% nDCG (bias correction)
  • Adaptive alpha reduces degradation by 88-93%
  • Multi-vector RRF eliminates 100% of degradation
  • Classifier with per-query LLM targets achieves F1=0.91 as automatic router

Citation

@article{gomes2026steer,
  title={STEER: Semantic Transformation for Embedding-space Exploration in Retrieval --- An Honest Evaluation of Sixteen Algebraic Operations},
  author={Gomes, Renato Aparecido},
  doi={10.5281/zenodo.19325724},
  year={2026}
}

License

MIT

Metadata

Release files for steer-retrieval 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 steer-retrieval 0.1.0
File Size Uploaded
steer_retrieval-0.1.0.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for steer-retrieval 0.1.0
File Interpreter ABI Platform
steer_retrieval-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / steer_retrieval-0.1.0.tar.gz

Download URL steer_retrieval-0.1.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9deee1d10baef36b47c02b5df54e46dd4e849ffb7329a84d5cc9f56a382e3606
BLAKE2b-256 checksum
How to use checksums
2d5099ace35729cf8d7da998820f423f8450a0f56f2588d7135b505bf7638079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

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

Download URL steer_retrieval-0.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b94aa0852b58b3deef13c82c5f10189fc2e0fe9a436d3bc8a3b1c5024189545
BLAKE2b-256 checksum
How to use checksums
8d473200917903fb64dc68f9204888794945cf9cce564c146f1aa1d7d640418f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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