Fireship · @fireship

Vector databases are so hot right now. WTF are they?

Uploaded April 7, 2023 · Length 3:22

Vector databases are so hot right now. WTF are they?

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.

  1. 0:00

    it is April 7 2023 and you're watching

  2. 0:03

    the code report one month ago Vector

  3. 0:05

    database weeviate landed 16 million

  4. 0:07

    dollars in series a funding last week

  5. 0:09

    Pinecone DB just got a check for 28

  6. 0:12

    million at a 700 million valuation and

  7. 0:14

    yesterday chroma an open source project

  8. 0:16

    with only 1.2 GitHub Stars raised 18

  9. 0:19

    million for its embeddings database and

  10. 0:21

    I just launched my own Vector database

  11. 0:23

    this morning we're currently pre-revenue

  12. 0:24

    pre-vision and pre-code and valued at

  13. 0:27

    420 million dollars leave your credit

  14. 0:29

    card details in the comments if you'd

  15. 0:30

    like to invest but you might be

  16. 0:31

    wondering what the hell is a vector

  17. 0:33

    database or what the hell is a vector

  18. 0:35

    even well that's easy a vector is just

  19. 0:37

    an array of numbers but what's cool

  20. 0:38

    about vectors is that they can represent

  21. 0:40

    more complex objects like Words

  22. 0:42

    sentences images or audio files in a

  23. 0:45

    continuous High dimensional space called

  24. 0:46

    an embedding it's kind of like this when

  25. 0:48

    you go to a party all of the jocks sit

  26. 0:50

    around the TV and watch football

  27. 0:51

    meanwhile all the girls find the Dance

  28. 0:53

    Floor while you group together with all

  29. 0:55

    the programming introverts to talk about

  30. 0:56

    vectors in the corner notice how all the

  31. 0:58

    similar objects are grouped together

  32. 0:59

    embeddings work the same way except they

  33. 1:02

    map the semantic meaning of words

  34. 1:03

    together or similar features in

  35. 1:05

    virtually any other data type these

  36. 1:07

    embeddings can then be used for things

  37. 1:08

    like recommendation systems search

  38. 1:10

    engines and even text generation like

  39. 1:12

    chat GPT but once you have your

  40. 1:14

    embeddings the question becomes where do

  41. 1:15

    you store them and how do you query them

  42. 1:17

    quickly that's where Vector databases

  43. 1:19

    come in in a relational database you

  44. 1:21

    have rows and columns in a document

  45. 1:22

    database you have documents and

  46. 1:24

    collections but in a vector database you

  47. 1:26

    have arrays of numbers clustered

  48. 1:28

    together based on similarity which can

  49. 1:29

    be queried with ultra low latency making

  50. 1:31

    it an ideal choice for AI driven

  51. 1:33

    applications relational databases like

  52. 1:35

    postgres have tools like PG Vector to

  53. 1:37

    support this type of functionality and

  54. 1:39

    redis also has first class Vector

  55. 1:41

    support but a bunch of new native Vector

  56. 1:43

    databases are popping up like weeviate

  57. 1:45

    and milvis are open source options

  58. 1:46

    written in go then you have Pinecone

  59. 1:48

    which is extremely popular but is not

  60. 1:50

    open source then you have Chromo which

  61. 1:52

    is based on clickhouse under the hood

  62. 1:53

    and many other options from there let's

  63. 1:55

    jump into some code to see what it looks

  64. 1:57

    like here I'm using chroma and

  65. 1:58

    JavaScript and the first thing I I'll do