Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf9c5ff2

Browse files
committed
Clarify examples and add some more information about cross-encoders
1 parent46dfe4a commitf9c5ff2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎pgml-cms/docs/api/sql-extension/pgml.rank.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,22 @@ pgml.rank(
1919

2020
##Example
2121

22+
Ranking documents is as simple as calling the the function with the documents you want to rank, and text you want to rank against:
23+
2224
```postgresql
2325
SELECT pgml.rank('mixedbread-ai/mxbai-rerank-base-v1', 'test', ARRAY['doc1', 'doc2']);
2426
```
2527

28+
By default the`pgml.rank()` function will return and rank all of the documents. The function can be configured to only return the relevance score and index of the top k documents by setting`return_documents` to`false` and`top_k` to the number of documents you want returned.
29+
2630
```postgresql
27-
SELECT pgml.chunk('mixedbread-ai/mxbai-rerank-base-v1', 'test', ARRAY['doc1', 'doc2'], '{"return_documents": false, "top_k": 10}'::JSONB);
31+
SELECT pgml.rank('mixedbread-ai/mxbai-rerank-base-v1', 'test', ARRAY['doc1', 'doc2'], '{"return_documents": false, "top_k": 10}'::JSONB);
2832
```
2933

3034
##Supported ranking models
3135

32-
We support the following ranking models:
36+
We currently support cross-encoders for re-ranking. Check out[Sentence Transformer's documentation](https://sbert.net/examples/applications/cross-encoder/README.html) for more information on how cross-encoders work.
37+
38+
By default we provide the following ranking models:
3339

3440
*`mixedbread-ai/mxbai-rerank-base-v1`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp