# How to use a custom rerank model in query?

**URL:** <https://forum.weaviate.io/t/how-to-use-a-custom-rerank-model-in-query/21854>\
**Category:** Support\
**Created:** [August 19, 2025, 3:06pm UTC](https://forum.weaviate.io/t/how-to-use-a-custom-rerank-model-in-query/21854 "2025-08-19T15:06:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![espkaiser](https://avatars.discourse-cdn.com/v4/letter/e/3bc359/32.png) [@espkaiser](https://forum.weaviate.io/u/espkaiser)\
**Post date:** [August 19, 2025, 3:06pm UTC](https://forum.weaviate.io/t/how-to-use-a-custom-rerank-model-in-query/21854/1 "2025-08-19T15:06:13Z")

</div>

### Description

I have deployed a bge-reranker-v2-m3 model on a server. We assume the endpoint is http://192.168.1.1:30000.I want to use that rerank model when querying. How should I do? Should I edit the docker-compose.yaml? I use weaviate-client to use weaviate. I create a collection like this, and create a vector store, and query from that. The code like this:

```auto
weaviate_client = weaviate.connect_to_custom(http_host=os.getenv("WEAVIATE_HOST"), http_port=18080, http_secure=False, auth_credentials=os.getenv("WEAVIATE_KEY"), grpc_host=os.getenv("WEAVIATE_HOST"), grpc_port=50051, grpc_secure=False) 
weaviate_client.collections.create(name="collection1", vectorizer_config=None, properties=[Property(name="text", data_type=DataType.TEXT), Property(name="source", data_type=DataType.TEXT)])
vector_store = WeaviateVectorStore( client=weaviate_client, index_name="collection1", text_key="text", embedding=embeddings ) 
results = vector_store.similarity_search_with_score("query text") 

```

In this process, how can I use rerank model? I notice that the function create has an argument “reranker\_config”:

```auto
def create(
        self,
        name: str,
        *,
        description: Optional[str] = None,
        generative_config: Optional[_GenerativeProvider] = None,
        inverted_index_config: Optional[_InvertedIndexConfigCreate] = None,
        multi_tenancy_config: Optional[_MultiTenancyConfigCreate] = None,
        properties: Optional[Sequence[Property]] = None,
        references: Optional[List[_ReferencePropertyBase]] = None,
        replication_config: Optional[_ReplicationConfigCreate] = None,
        reranker_config: Optional[_RerankerProvider] = None,
        sharding_config: Optional[_ShardingConfigCreate] = None,
        vector_index_config: _VectorIndexConfigCreate,
        vectorizer_config: Optional[
            Union[_VectorizerConfigCreate, List[_NamedVectorConfigCreate]]
        ] = None,
        vector_config: Optional[Union[_VectorConfigCreate, List[_VectorConfigCreate]]] = None,
        data_model_properties: Optional[Type[Properties]] = None,
        data_model_references: Optional[Type[References]] = None,
        skip_argument_validation: bool = False,
    ) -> Collection[Properties, References]: ...

```

Is that argument useful?

### Server Setup Information

- Weaviate Server Version:1.30.2
- Deployment Method: docker-compose
- Multi Node? Number of Running Nodes:singleton
- Client Language and Version:python weaviate\_client 4.16.6
- Multitenancy?:no

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [August 21, 2025, 9:12am UTC](https://forum.weaviate.io/t/how-to-use-a-custom-rerank-model-in-query/21854/2 "2025-08-21T09:12:10Z")

</div>

Hey @espkaiser

Welcome to our community, it’s great to have you here 🥳

You can modify the docker-compose.yaml as described in the docs here:

[Weaviate Reranker Configuration – Docker Option 2](https://docs.weaviate.io/weaviate/model-providers/transformers/reranker#docker-option-2-add-the-configuration-manually)

> **[Reranker | Weaviate Documentation](https://docs.weaviate.io/weaviate/model-providers/transformers/reranker#docker-option-2-add-the-configuration-manually)**
>
> Enhance search results with the transformers reranker module in Weaviate.

Have you given that a try?

Best regards,

Mohamed Shahin  
Weaviate Support Engineer  
(Ireland, UTC±00:00/+01:00)
