You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pgml-apps/pgml-chat/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ A command line tool to build and deploy a **_knowledge based_** chatbot using Po
3
3
4
4
There are two stages in building a knowledge based chatbot:
5
5
- Build a knowledge base by ingesting documents, chunking documents, generating embeddings and indexing these embeddings for fast query
6
-
- Generate responses to user queries by retrieving relevant documents and generating responses using OpenAI and[OpenSourceAI API](https://postgresml.org/docs/introduction/apis/client-sdk/opensourceai)
6
+
- Generate responses to user queries by retrieving relevant documents and generating responses using OpenAI and[OpenSourceAI API](https://postgresml.org/docs/api/client-sdk/opensourceai)
7
7
8
8
This tool automates the above two stages and provides a command line interface to build and deploy a knowledge based chatbot.
Copy file name to clipboardExpand all lines: pgml-cms/blog/using-postgresml-with-django-and-embedding-search.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ PostgresML allows anyone to integrate advanced AI capabilities into their applic
28
28
29
29
Advanced search engines like Google use this technique to extract the meaning of search queries and rank the results based on what the user actually_wants_, unlike simple keyword matches which can easily give irrelevant results.
30
30
31
-
To accomplish this, for each document in our app, we include an embedding column stored as a vector. A vector is just an array of floating point numbers. For each item in our to-do list, we automatically generate the embedding using the PostgresML[`pgml.embed()`](https://postgresml.org/docs/introduction/apis/sql-extension/pgml.embed) function. This function runs inside the database and doesn't require the Django app to install the model locally.
31
+
To accomplish this, for each document in our app, we include an embedding column stored as a vector. A vector is just an array of floating point numbers. For each item in our to-do list, we automatically generate the embedding using the PostgresML[`pgml.embed()`](https://postgresml.org/docs/api/sql-extension/pgml.embed) function. This function runs inside the database and doesn't require the Django app to install the model locally.
32
32
33
33
An embedding model running inside PostgresML is able to extract the meaning of search queries & compare it to the meaning of the documents it stores, just like a human being would if they were able to search millions of documents in just a few milliseconds.
Copy file name to clipboardExpand all lines: pgml-cms/docs/api/client-sdk/document-search.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
#Document Search
2
2
3
-
SDK is specifically designed to provide powerful, flexible document search.`Pipeline`s are required to perform search. See the[Pipelines](https://postgresml.org/docs/introduction/apis/client-sdk/pipelines) for more information about using`Pipeline`s.
3
+
SDK is specifically designed to provide powerful, flexible document search.`Pipeline`s are required to perform search. See the[Pipelines](https://postgresml.org/docs/api/client-sdk/pipelines) for more information about using`Pipeline`s.
4
4
5
5
This section will assume we have previously ran the following code:
6
6
@@ -120,7 +120,7 @@ Just like `vector_search`, `search` takes in two arguments. The first is a `JSON
120
120
121
121
Lets break this query down a little bit more. We are asking for a maximum of 10 documents ranked by`full_text_search` on the`abstract` and`semantic_search` on the`abstract` and`body`. We are also filtering out all documents that do not have the key`user_id` equal to`1`. The`full_text_search` provides a score for the`abstract`, and`semantic_search` provides scores for the`abstract` and the`body`. The`boost` parameter is a multiplier applied to these scores before they are summed together and sorted by`score``DESC`. 
122
122
123
-
The`filter` is structured the same way it is when performing`vector_search` see[filtering with vector\_search](https://postgresml.org/docs/introduction/apis/client-sdk/search)[](https://postgresml.org/docs/introduction/apis/client-sdk/search#metadata-filtering)for more examples on filtering documents.
123
+
The`filter` is structured the same way it is when performing`vector_search` see[filtering with vector\_search](https://postgresml.org/docs/api/client-sdk/search)[](https://postgresml.org/docs/api/client-sdk/search#metadata-filtering)for more examples on filtering documents.
Copy file name to clipboardExpand all lines: pgml-cms/docs/api/client-sdk/search.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
#Vector Search
2
2
3
-
SDK is specifically designed to provide powerful, flexible vector search.`Pipeline`s are required to perform search. See[Pipelines](https://postgresml.org/docs/introduction/apis/client-sdk/pipelines)for more information about using`Pipeline`s.
3
+
SDK is specifically designed to provide powerful, flexible vector search.`Pipeline`s are required to perform search. See[Pipelines](https://postgresml.org/docs/api/client-sdk/pipelines)for more information about using`Pipeline`s.
4
4
5
5
This section will assume we have previously ran the following code:
Copy file name to clipboardExpand all lines: pgml-cms/docs/api/sql-extension/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ PostgresML integrates [🤗 Hugging Face Transformers](https://huggingface.co/tr
13
13
14
14
*[pgml.embed.md](pgml.embed.md"mention") returns vector embeddings for nearest neighbor searches and other vector database use cases
15
15
*[pgml.generate.md](pgml.generate.md"mention") returns streaming text responses for chatbots
16
-
*[pgml.transform](../../introduction/apis/sql-extension/pgml.transform"mention") allows you to perform dozens of natural language processing (NLP) tasks with thousands of models, like sentiment analysis, question and answering, translation, summarization and text generation
16
+
*[pgml.transform](../../api/sql-extension/pgml.transform/"mention") allows you to perform dozens of natural language processing (NLP) tasks with thousands of models, like sentiment analysis, question and answering, translation, summarization and text generation
17
17
*[pgml.tune.md](pgml.tune.md"mention") fine tunes an open source model on your own data
18
18
19
19
##Train & deploy your own models
@@ -34,7 +34,7 @@ SELECT pgml.train(
34
34
);
35
35
```
36
36
37
-
See[pgml.train](../../introduction/apis/sql-extension/pgml.train"mention") for more information.
37
+
See[pgml.train](../../api/sql-extension/pgml.train/README.md) for more information.
38
38
39
39
###Deploy
40
40
@@ -66,4 +66,4 @@ FROM new_sales
66
66
ORDER BY predictionDESC;
67
67
```
68
68
69
-
See[pgml.predict](../../introduction/apis/sql-extension/pgml.predict"mention") for more information.
69
+
See[pgml.predict](../../api/sql-extension/pgml.predict/"mention") for more information.
Copy file name to clipboardExpand all lines: pgml-cms/docs/api/sql-extension/pgml.predict/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ LIMIT 25;
51
51
52
52
###Classification Example
53
53
54
-
If you've already been through the[pgml.train](../../../introduction/apis/sql-extension/pgml.train"mention") examples, you can see the predictive results of those models:
54
+
If you've already been through the[pgml.train](../../../api/sql-extension/pgml.train/"mention") examples, you can see the predictive results of those models:
Copy file name to clipboardExpand all lines: pgml-cms/docs/api/sql-extension/pgml.train/clustering.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ LIMIT 10;
27
27
28
28
##Algorithms
29
29
30
-
All clustering algorithms implemented by PostgresML are online versions. You may use the[pgml.predict](../../../introduction/apis/sql-extension/pgml.predict"mention")function to cluster novel datapoints after the clustering model has been trained.
30
+
All clustering algorithms implemented by PostgresML are online versions. You may use the[pgml.predict](../../../api/sql-extension/pgml.predict/"mention")function to cluster novel datapoints after the clustering model has been trained.
Copy file name to clipboardExpand all lines: pgml-cms/docs/use-cases/chatbots/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -273,7 +273,7 @@ while True:
273
273
```
274
274
275
275
{% hint style="info"%}
276
-
We are utilizing the OpenSourceAIclassin our pgml library. Thisis actually a dropin replacementfor OpenAI. [Find the docs here](https://postgresml.org/docs/introduction/apis/client-sdk/opensourceai).
276
+
We are utilizing the OpenSourceAIclassin our pgml library. Thisis actually a dropin replacementfor OpenAI. [Find the docs here](https://postgresml.org/docs/api/client-sdk/opensourceai).
277
277
{% endhint%}
278
278
279
279
This program let's us have conversations like the following:
@@ -289,7 +289,7 @@ You just asked me what my name is, and I am a friendly and helpful chatbot named
289
289
Note that we have alist of dictionaries called`history` we use to store the chat history,and instead of feeding text into our model, we are inputting the`history`list. Our library automatically converts thislist of dictionaries into theformat expected by the model. Notice the`roles`in the dictionaries are the sameas the`roles` of the messagesin the previous example. Thislist of dictionarieswith keys`role`and`content`as a storage systemfor messagesis pretty standardand used by usas wellas OpenAIand HuggingFace.
290
290
291
291
{% hint style="info"%}
292
-
Once again we are using`pgml` to abstract away the complicated piecesfor our machine learning task. This isn't a guide on how to use our libraries, but for more information [check out our docs](https://postgresml.org/docs/introduction/apis/client-sdk/getting-started).
292
+
Once again we are using`pgml` to abstract away the complicated piecesfor our machine learning task. This isn't a guide on how to use our libraries, but for more information [check out our docs](https://postgresml.org/docs/api/client-sdk/getting-started).
293
293
{% endhint%}
294
294
295
295
Our search returned the exact section of the Wikipedia article we wanted! Let's talk a little bit about what is going on here.