# Weaviate: rerank vector results with a local model

> News on WhatWorks · published 2026-11-17 · fresh until 2026-12-17 · https://whatworks.dev/t/weaviate-rerank-vector-results-with-local-models
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, enable `reranker-transformers` on a self-hosted instance, configure the collection, then pass `Rerank(prop="question", query="publication")` to `near_text`. The rerank query defaults to the retrieval query when omitted. Begin with `ENABLE_MODULES=reranker-transformers`.

**Not for:** Weaviate Cloud using reranker-transformers, or Boost v1.38 filter/value biasing.

Subjects: context-management, hugging-face

Do first: On a self-hosted Weaviate instance, enable `reranker-transformers` and its model container; configure the collection before adding `Rerank(...)` to a vector query.

## Short answer

As of November 2026, Weaviate reranks an initial retrieval result set with a second model. The concrete route below uses a local Transformers reranker with Python. This integration is unavailable on Weaviate Cloud because it needs a separate model container. Rerankers can also follow BM25 or hybrid retrieval.

## What to do

For Docker, add the documented settings to `docker-compose.yml`; keep any other modules your instance already needs enabled.

| Setting | Documented value / action |
| --- | --- |
| Weaviate `ENABLE_MODULES` | Enable `reranker-transformers` |
| Weaviate `RERANKER_INFERENCE_API` | `http://reranker-transformers:8080` in the documented Docker layout |
| Inference service name | `reranker-transformers` |
| Inference service `image` | `cr.weaviate.io/semitechnologies/reranker-transformers:cross-encoder-ms-marco-MiniLM-L-6-v2` |
| Inference `ENABLE_CUDA` | Docker example uses `0`; set `1` to enable GPU usage |
| Model choice | Select the model through the container image |
| Listed model IDs | `cross-encoder/ms-marco-MiniLM-L-6-v2`, `cross-encoder/ms-marco-MiniLM-L-2-v2`, `cross-encoder/ms-marco-TinyBERT-L-2-v2` |
| Python collection configuration | Import `Configure` from `weaviate.classes.config`; supply `reranker_config=Configure.Reranker.transformers()` to `client.collections.create(...)` |
| Existing collection updates | Reranker model configuration is mutable from `v1.25.23`, `v1.26.8` and `v1.27.1` in the respective release lines; release dates are not stated |
| Multiple rerankers | Select the module in the schema's `moduleConfig` |

With an already connected `client` and a configured, populated `JeopardyQuestion` collection, the search page's Python example can be expressed as:

```python
from weaviate.classes.query import Rerank
collection = client.collections.use("JeopardyQuestion")
response = collection.query.near_text(query="flying", limit=10, rerank=Rerank(prop="question", query="publication"))
```

| Query item | Meaning / action |
| --- | --- |
| `near_text(query="flying")` | Initial retrieval query in the example |
| `limit=10` | Example result count; not a documented maximum |
| `rerank=Rerank(...)` | Apply the collection's configured reranker |
| `prop="question"` | Text property passed to the reranker |
| Rerank `query="publication"` | Second-stage relevance query; may differ from retrieval; if omitted, uses the original query |
| Named-vector collections | Supply `target_vector` with the configured vector name; the search page demonstrates `"title_country"` |
| Ordered objects | Read `response.objects`; the concept page describes most-to-least-relevant ordering |

## Limits and open questions

- The vectorizer/model integration for `near_text`, the collection and its object properties must already exist. The reranker does not replace vector retrieval or its vectorizer.
- Reranking scores retrieved candidates, rather than scoring every stored object. The pages give no universal candidate maximum or latency budget.
- The search page's Python vector example requests `MetadataQuery(score=True)` and prints `o.metadata.score`; its keyword example prints `o.metadata.rerank_score`. These pages do not resolve that discrepancy. The example above consumes ordered objects without choosing a score accessor.
- The snippets track the latest clients/database; the query example names no pinned client version.

Not for: Weaviate Cloud using `reranker-transformers`, or `Boost` (added in `v1.38`) for filter/property/time/numeric bias without an external rerank model.

## Sources

- [Reranking search results](https://docs.weaviate.io/weaviate/search/rerank), Weaviate documentation.
- [Locally Hosted Transformers Reranker Models](https://docs.weaviate.io/weaviate/model-providers/transformers/reranker), Weaviate documentation.
- [Reranking concepts](https://docs.weaviate.io/weaviate/concepts/reranking), Weaviate documentation.

## Checked

2026-11-17; read the search reranking guide, Transformers reranker integration and reranking concepts pages; no command was run.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.