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

Appearance settings

Commit 42a6541

Browse filesBrowse files
committed
Started Vector DB section
1 parent 592fc59 commit 42a6541
Copy full SHA for 42a6541

File tree

1 file changed

+9
-0
lines changed
Filter options

1 file changed

+9
-0
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
- [Text Generation](#text-generation)
4646
- [Text-to-Text Generation](#text-to-text-generation)
4747
- [Fill-Mask](#fill-mask)
48+
- [Vector Database](#vector-database)
4849
<!-- - [Regression](#regression)
4950
- [Classification](#classification) -->
5051

@@ -55,6 +56,7 @@ PostgresML is a PostgreSQL extension that enables you to perform ML training and
5556
- Perform natural language processing (NLP) tasks like sentiment analysis, question and answering, translation, summarization and text generation
5657
- Access 1000s of state-of-the-art language models like GPT-2, GPT-J, GPT-Neo from :hugs: HuggingFace model hub
5758
- Fine tune large language models (LLMs) on your own text data for different tasks
59+
- Use your existing PostgreSQL database as a vector database by generating embeddings from text stored in the database.
5860

5961
**Translation**
6062

@@ -767,6 +769,13 @@ SELECT pgml.transform(
767769
{"score": 0.024, "token": 29778, "sequence": "Paris is the envy of France.", "token_str": " envy"},
768770
{"score": 0.022, "token": 1867, "sequence": "Paris is the Capital of France.", "token_str": " Capital"}]
769771
```
772+
773+
# Vector Database
774+
A vector database is a type of database that stores and manages vectors, which are mathematical representations of data points in a multi-dimensional space. Vectors can be used to represent a wide range of data types, including images, text, audio, and numerical data. It is designed to support efficient searching and retrieval of vectors, using methods such as nearest neighbor search, clustering, and indexing. These methods enable applications to find vectors that are similar to a given query vector, which is useful for tasks such as image search, recommendation systems, and natural language processing.
775+
776+
PostgresML allows you to use your existing PostgreSQL database as a vector database by generating embeddings from text stored in the database. To generate embeddings, you can use the `pgml.embed` function, which takes a transformer name and a text value as input. This function automatically downloads and caches the transformer for future reuse, which saves time and resources.
777+
778+
770779
<!-- ## Sentence Similarity
771780
Sentence Similarity involves determining the degree of similarity between two texts. To accomplish this, Sentence similarity models convert the input texts into vectors (embeddings) that encapsulate semantic information, and then measure the proximity (or similarity) between the vectors. This task is especially beneficial for tasks such as information retrieval and clustering/grouping.
772781
![sentence similarity](pgml-docs/docs/images/sentence-similarity.png)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.