Fireship · @fireship
Vector databases are so hot right now. WTF are they?
Uploaded April 7, 2023 · Length 3:22
Summary
Vector databases explained: what they are, how they work, and their applications in AI and machine learning.
- vector databases
- vector database tutorial
- ai driven applications
- machine learning
- long term memory for llms
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
it is April 7 2023 and you're watching
- 0:03
the code report one month ago Vector
- 0:05
database weeviate landed 16 million
- 0:07
dollars in series a funding last week
- 0:09
Pinecone DB just got a check for 28
- 0:12
million at a 700 million valuation and
- 0:14
yesterday chroma an open source project
- 0:16
with only 1.2 GitHub Stars raised 18
- 0:19
million for its embeddings database and
- 0:21
I just launched my own Vector database
- 0:23
this morning we're currently pre-revenue
- 0:24
pre-vision and pre-code and valued at
- 0:27
420 million dollars leave your credit
- 0:29
card details in the comments if you'd
- 0:30
like to invest but you might be
- 0:31
wondering what the hell is a vector
- 0:33
database or what the hell is a vector
- 0:35
even well that's easy a vector is just
- 0:37
an array of numbers but what's cool
- 0:38
about vectors is that they can represent
- 0:40
more complex objects like Words
- 0:42
sentences images or audio files in a
- 0:45
continuous High dimensional space called
- 0:46
an embedding it's kind of like this when
- 0:48
you go to a party all of the jocks sit
- 0:50
around the TV and watch football
- 0:51
meanwhile all the girls find the Dance
- 0:53
Floor while you group together with all
- 0:55
the programming introverts to talk about
- 0:56
vectors in the corner notice how all the
- 0:58
similar objects are grouped together
- 0:59
embeddings work the same way except they
- 1:02
map the semantic meaning of words
- 1:03
together or similar features in
- 1:05
virtually any other data type these
- 1:07
embeddings can then be used for things
- 1:08
like recommendation systems search
- 1:10
engines and even text generation like
- 1:12
chat GPT but once you have your
- 1:14
embeddings the question becomes where do
- 1:15
you store them and how do you query them
- 1:17
quickly that's where Vector databases
- 1:19
come in in a relational database you
- 1:21
have rows and columns in a document
- 1:22
database you have documents and
- 1:24
collections but in a vector database you
- 1:26
have arrays of numbers clustered
- 1:28
together based on similarity which can
- 1:29
be queried with ultra low latency making
- 1:31
it an ideal choice for AI driven
- 1:33
applications relational databases like
- 1:35
postgres have tools like PG Vector to
- 1:37
support this type of functionality and
- 1:39
redis also has first class Vector
- 1:41
support but a bunch of new native Vector
- 1:43
databases are popping up like weeviate
- 1:45
and milvis are open source options
- 1:46
written in go then you have Pinecone
- 1:48
which is extremely popular but is not
- 1:50
open source then you have Chromo which
- 1:52
is based on clickhouse under the hood
- 1:53
and many other options from there let's
- 1:55
jump into some code to see what it looks
- 1:57
like here I'm using chroma and
- 1:58
JavaScript and the first thing I I'll do


