# VertexAIRank

> **Class** in `langchain_google_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-community/vertex_rank/VertexAIRank)

Document compressor using Vertex AI Ranking API.

Inherits from
[`BaseDocumentCompressor`][langchain_core.documents.compressor.BaseDocumentCompressor].

Reranks documents based on relevance to a query using Google's semantic ranking
model.

## Signature

```python
VertexAIRank(
    self,
    **kwargs: Any = {},
)
```

## Extends

- `BaseDocumentCompressor`

## Constructors

```python
__init__(
    self,
    **kwargs: Any = {},
)
```


## Properties

- `project_id`
- `location_id`
- `ranking_config`
- `model`
- `top_n`
- `ignore_record_details_in_response`
- `id_field`
- `title_field`
- `credentials`
- `credentials_path`
- `timeout`
- `client`
- `model_config`

## Methods

- [`compress_documents()`](https://reference.langchain.com/python/langchain-google-community/vertex_rank/VertexAIRank/compress_documents)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/a3f016b2a6c4af535df275545f76fa7424aa39e5/libs/community/langchain_google_community/vertex_rank.py#L20)