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

Commitff02bb7

Browse files
committed
Merge branch 'master' into dan-product-notifications
2 parentsd6c598c +cabbfa5 commitff02bb7

File tree

12 files changed

+1124
-5
lines changed

12 files changed

+1124
-5
lines changed

‎pgml-cms/blog/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#Table of contents
22

33
*[Home](README.md)
4+
*[Unified RAG](unified-rag.md)
45
*[Announcing the Release of our Rust SDK](announcing-the-release-of-our-rust-sdk.md)
56
*[Serverless LLMs are dead; Long live Serverless LLMs](serverless-llms-are-dead-long-live-serverless-llms.md)
67
*[Speeding up vector recall 5x with HNSW](speeding-up-vector-recall-5x-with-hnsw.md)

‎pgml-cms/blog/unified-rag.md

Lines changed: 535 additions & 0 deletions
Large diffs are not rendered by default.
Loading

‎pgml-cms/docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
*[Chatbots](guides/chatbots/README.md)
6464
*[Example Application](use-cases/chatbots.md)
6565
*[Supervised Learning](guides/supervised-learning.md)
66+
*[Unified RAG](guides/unified-rag.md)
6667
*[OpenSourceAI](guides/opensourceai.md)
6768
*[Natural Language Processing](guides/natural-language-processing.md)
6869

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
description:Rank documents against a piece of text using the specified ranking model.
3+
---
4+
5+
#pgml.rank()
6+
7+
The`pgml.rank()` function is used to compute a relevance score between documents and some text. This function is primarily used as the last step in a search system where the results returned from the initial search are re-ranked by relevance before being used.
8+
9+
##API
10+
11+
```postgresql
12+
pgml.rank(
13+
transformer TEXT, -- transformer name
14+
query TEXT, -- text to rank against
15+
documents TEXT[], -- documents to rank
16+
kwargs JSON -- optional arguments (see below)
17+
)
18+
```
19+
20+
##Example
21+
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+
24+
```postgresql
25+
SELECT pgml.rank('mixedbread-ai/mxbai-rerank-base-v1', 'test', ARRAY['doc1', 'doc2']);
26+
```
27+
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+
30+
```postgresql
31+
SELECT pgml.rank('mixedbread-ai/mxbai-rerank-base-v1', 'test', ARRAY['doc1', 'doc2'], '{"return_documents": false, "top_k": 10}'::JSONB);
32+
```
33+
34+
##Supported ranking models
35+
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:
39+
40+
*`mixedbread-ai/mxbai-rerank-base-v1`

‎pgml-cms/docs/guides/unified-rag.md

Lines changed: 528 additions & 0 deletions
Large diffs are not rendered by default.

‎pgml-extension/pgml.control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
comment = 'pgml: Created by the PostgresML team'
1+
comment = 'Machine Learning and AI functions from postgresml.org'
22
default_version = '@CARGO_VERSION@'
33
module_pathname = '$libdir/pgml'
44
relocatable = false

‎pgml-sdks/pgml/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name ="pgml"
3-
version ="1.0.4"
3+
version ="1.1.0"
44
edition ="2021"
55
authors = ["PosgresML <team@postgresml.org>"]
66
homepage ="https://postgresml.org/"

‎pgml-sdks/pgml/javascript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"pgml",
3-
"version":"1.0.3",
3+
"version":"1.1.0",
44
"description":"Open Source Alternative for Building End-to-End Vector Search Applications without OpenAI & Pinecone",
55
"keywords": [
66
"postgres",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp