-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature / Vector Store: Implement page
- Loading branch information
Showing
6 changed files
with
160 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,155 @@ | ||
--- | ||
orphan: true | ||
--- | ||
|
||
(hnsw)= | ||
(vector)= | ||
|
||
# Vector Store | ||
|
||
:::{todo} Implement. | ||
:::{include} /_include/links.md | ||
::: | ||
:::{include} /_include/styles.html | ||
::: | ||
|
||
:::::{grid} | ||
:padding: 0 | ||
|
||
::::{grid-item} | ||
:class: rubric-slim | ||
:columns: 9 | ||
|
||
|
||
:::{rubric} Overview | ||
::: | ||
CrateDB can be used as a [Vector Database] feature for storing and retrieving | ||
vector embeddings. | ||
|
||
:::{rubric} About | ||
::: | ||
CrateDB's `FLOAT_VECTOR` type and its `KNN_MATCH` function can be used | ||
for storing and retrieving embeddings, and for conducting HNSW similarity | ||
searches. | ||
:::: | ||
|
||
|
||
|
||
::::{grid-item} | ||
:class: rubric-slim | ||
:columns: 3 | ||
|
||
```{rubric} Reference Manual | ||
``` | ||
- [](inv:crate-reference#type-float_vector) | ||
- [](inv:crate-reference#scalar_knn_match) | ||
|
||
```{rubric} Related | ||
``` | ||
- {ref}`sql` | ||
- {ref}`machine-learning` | ||
- {ref}`query` | ||
|
||
{tags-primary}`SQL` | ||
{tags-primary}`Vector Store` | ||
{tags-primary}`Machine Learning` | ||
:::: | ||
|
||
::::: | ||
|
||
|
||
:::{rubric} Tutorials | ||
::: | ||
|
||
::::{info-card} | ||
:::{grid-item} **Vector Support and KNN Search through SQL** | ||
:columns: 9 | ||
|
||
The addition of vector support and KNN search makes CrateDB the optimal | ||
multi-model database for all types of data. Whether it is structured, | ||
semi-structured, or unstructured data, CrateDB stands as the all-in-one | ||
solution, capable of handling diverse data types with ease. | ||
|
||
In this feature-focused blog post, we will introduce how CrateDB can be | ||
used as a vector database and how the vector store is implemented. | ||
We will also explore the possibilities of the K-Nearest Neighbors (KNN) | ||
search, and demonstrate vector capabilities with easy-to-follow examples. | ||
|
||
{{ '{}[Vector support and KNN search in CrateDB]'.format(blog) }} | ||
::: | ||
:::{grid-item} | ||
:columns: 3 | ||
{tags-primary}`Introduction` \ | ||
{tags-secondary}`Vector Store` \ | ||
{tags-secondary}`SQL` | ||
::: | ||
:::: | ||
|
||
|
||
::::{info-card} | ||
:::{grid-item} **Retrieval Augmented Generation (RAG) with CrateDB and SQL** | ||
:columns: 9 | ||
|
||
This notebook illustrates CrateDB's vector store using pure SQL on behalf | ||
of an example exercising a RAG workflow. | ||
|
||
It uses the white-paper [Time series data in manufacturing] as input data, | ||
generates embeddings using OpenAI's ChatGPT, stores them into a table | ||
using `FLOAT_VECTOR(1536)`, and queries it using the `KNN_MATCH` function. | ||
|
||
{{ '{}[langchain-rag-sql-github]'.format(nb_github) }} {{ '{}[langchain-rag-sql-colab]'.format(nb_colab) }} {{ '{}[langchain-rag-sql-binder]'.format(nb_binder) }} | ||
::: | ||
:::{grid-item} | ||
:columns: 3 | ||
{tags-primary}`Fundamentals` \ | ||
{tags-secondary}`Vector Store` \ | ||
{tags-secondary}`LangChain` \ | ||
{tags-secondary}`pandas` \ | ||
{tags-secondary}`SQL` | ||
::: | ||
:::: | ||
|
||
|
||
:::{rubric} Videos | ||
::: | ||
|
||
::::{info-card} | ||
|
||
:::{grid-item} **How to Use Private Data in Generative AI?** | ||
:columns: auto auto 8 8 | ||
|
||
In this video recorded at FOSDEM 2024, we explain how to leverage private data | ||
in generative AI and which end to end solution is needed to leverage Retrieval | ||
Augmented Generation (RAG). | ||
|
||
- [How to Use Private Data in Generative AI?] | ||
::: | ||
|
||
:::{grid-item} | ||
:columns: auto auto 4 4 | ||
|
||
<iframe width="240" src="https://www.youtube-nocookie.com/embed/icquKckM4o0?si=J0w5yG56Ld4fIXfm" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> | ||
| ||
|
||
{tags-primary}`Fundamentals` \ | ||
{tags-secondary}`RAG` | ||
::: | ||
|
||
:::: | ||
|
||
|
||
|
||
:::{seealso} | ||
**Features:** | ||
[](#querying) • | ||
[](#fulltext) | ||
|
||
**Domains:** | ||
[](#industrial) • | ||
[](#machine-learning) • | ||
[](#timeseries) | ||
|
||
**Product:** | ||
[Relational Database] | ||
[Relational Database] • | ||
[Vector Database][Vector Database (Product)] | ||
::: | ||
|
||
|
||
[Relational Database]: https://cratedb.com/solutions/relational-database | ||
[How to Use Private Data in Generative AI?]: https://youtu.be/icquKckM4o0?feature=shared | ||
[Time series data in manufacturing]: https://github.com/crate/cratedb-datasets/raw/main/machine-learning/fulltext/White%20paper%20-%20Time-series%20data%20in%20manufacturing.pdf | ||
[Vector support and KNN search in CrateDB]: https://cratedb.com/blog/unlocking-the-power-of-vector-support-and-knn-search-in-cratedb |