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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steer_retrieval-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steer_retrieval-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file steer_retrieval-0.1.0.tar.gz.

File metadata

  • Download URL: steer_retrieval-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for steer_retrieval-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9deee1d10baef36b47c02b5df54e46dd4e849ffb7329a84d5cc9f56a382e3606
MD5 112392b16313e6110a754f9a4187607f
BLAKE2b-256 2d5099ace35729cf8d7da998820f423f8450a0f56f2588d7135b505bf7638079

See more details on using hashes here.

File details

Details for the file steer_retrieval-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for steer_retrieval-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b94aa0852b58b3deef13c82c5f10189fc2e0fe9a436d3bc8a3b1c5024189545
MD5 203a82c65fa05ac51843e078e85722aa
BLAKE2b-256 8d473200917903fb64dc68f9204888794945cf9cce564c146f1aa1d7d640418f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page