Postgres pgvector Extension - Vector Database with PostgreSQL / Langchain Integration

โ˜•๏ธ ๐—•๐˜‚๐˜† ๐—บ๐—ฒ ๐—ฎ ๐—ฐ๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ: To support the channel and encourage new videos, please consider buying me a coffee here: https://ko-fi.com/bugbytes โญTop resource to learn Python - https://datacamp.pxf.io/kOjKkV โญ Blog Post: https://bugbytes.io/posts/vector-data... In this video, we'll look at the pgvector extension for PostgreSQL, that allows you to turn your Postgres database into a vector data-store! pgvector adds the vector data-type and distance computation operators (L2, inner product, and cosine distance) to allow you to query for "similar" items in the vector-space. We'll see how to set pgvector up in a Docker container, and will see how to integrate it with Langchain via the PGVector object. We'll look at how to take a piece of text, split it into chunks, create embeddings from those chunks using OpenAI, and then store the embeddings in the Postgres vector database. We'll also see how to query the database for vectors/documents that are similar to a text prompt/query. ๐Ÿ“Œ ๐—–๐—ต๐—ฎ๐—ฝ๐˜๐—ฒ๐—ฟ๐˜€: 00:00 Intro 00:41 Introduction to pgvector for PostgreSQL 03:23 Splitting text file into chunks with Langchain RecursiveCharacterTextSplitter 06:10 Using OpenAI to get embeddings for each chunk with OpenAIEmbeddings object 10:54 Setting up pgvector and PostgreSQL in a Docker container 16:38 Using the Langchain PGVector object to connect to PostgreSQL 21:47 Finding similar vectors to a query in pgvector 25:29 Querying pgvector with SQL to get cosine distances ๐—ฆ๐—ผ๐—ฐ๐—ถ๐—ฎ๐—น ๐— ๐—ฒ๐—ฑ๐—ถ๐—ฎ: ๐Ÿ“– Blog: https://bugbytes.io/posts/vector-data... ๐Ÿ‘พ Github: https://github.com/bugbytes-io/ ๐Ÿฆ Twitter: ย ย /ย bugbytesioย ย  ๐Ÿ“š ๐—™๐˜‚๐—ฟ๐˜๐—ต๐—ฒ๐—ฟ ๐—ฟ๐—ฒ๐—ฎ๐—ฑ๐—ถ๐—ป๐—ด ๐—ฎ๐—ป๐—ฑ ๐—ถ๐—ป๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐˜๐—ถ๐—ผ๐—ป: Blog Post: https://bugbytes.io/posts/vector-data... pgvector: https://github.com/pgvector/pgvector pgvector DockerHub image: https://hub.docker.com/r/ankane/pgvector State of the Union text: https://github.com/hwchase17/chroma-l... OpenAI Embeddings: https://platform.openai.com/docs/guid... Langchain Vectorstores: https://python.langchain.com/docs/mod... #python #langchain #datascience #postgresql

Django & PGVector - Vector-Based Search in Django with PGVector & PostgreSQL
โ–ถ๏ธŽ

Django & PGVector - Vector-Based Search in Django with PGVector & PostgreSQL

the best way to integrate Django 6.0 with Tailwind V4
โ–ถ๏ธŽ

the best way to integrate Django 6.0 with Tailwind V4

Open Lines Friday | The Low-Code Campfire #247
โ–ถ๏ธŽ

Open Lines Friday | The Low-Code Campfire #247

5. OpenAI Embeddings API - Searching Financial Documents
โ–ถ๏ธŽ

5. OpenAI Embeddings API - Searching Financial Documents

Decisions Q&A- Lunch and Learn 6/17/2026
โ–ถ๏ธŽ

Decisions Q&A- Lunch and Learn 6/17/2026

ASMR Addictive Fast Tapping Collection For Deep Sleep & Anxiety Relief (No Talking) โ€” 2.5 Hours
โ–ถ๏ธŽ

ASMR Addictive Fast Tapping Collection For Deep Sleep & Anxiety Relief (No Talking) โ€” 2.5 Hours

I Was Right About AI
โ–ถ๏ธŽ

I Was Right About AI

God Says:"I JUST CONFIRMED โ€” ONLY YOU CAN SEE THIS LETTER"/God Message Now/God Message
โ–ถ๏ธŽ

God Says:"I JUST CONFIRMED โ€” ONLY YOU CAN SEE THIS LETTER"/God Message Now/God Message

After My Wife Passed Away, My Daughter-in-Law Smiled At The Inheritance Meeting!! | Calm Dad Stories
โ–ถ๏ธŽ

After My Wife Passed Away, My Daughter-in-Law Smiled At The Inheritance Meeting!! | Calm Dad Stories

America's Got Talent 2026 ALL AUDITIONS | Week 2
โ–ถ๏ธŽ

America's Got Talent 2026 ALL AUDITIONS | Week 2

We're 99.9% sure this pattern is true, but no one can prove it
โ–ถ๏ธŽ

We're 99.9% sure this pattern is true, but no one can prove it

What is a Vector Database? Powering Semantic Search & AI Applications
โ–ถ๏ธŽ

What is a Vector Database? Powering Semantic Search & AI Applications

Tacheles # 210: Bedingungslose Kapitulation
โ–ถ๏ธŽ

Tacheles # 210: Bedingungslose Kapitulation

Fall asleep while I build a zoo (Part 2)
โ–ถ๏ธŽ

Fall asleep while I build a zoo (Part 2)

How Instagram Scaled Postgres to 2 Billion Users
โ–ถ๏ธŽ

How Instagram Scaled Postgres to 2 Billion Users

ASMR Mysterious Growth โ“ CLOSE Medical Exam ๐Ÿ‘ฉโ€โš•๏ธProfessional Doctor Facial Examination
โ–ถ๏ธŽ

ASMR Mysterious Growth โ“ CLOSE Medical Exam ๐Ÿ‘ฉโ€โš•๏ธProfessional Doctor Facial Examination

God Says:"I WANT YOU TO KNOW THIS โ€” OPEN IT TONIGHT"/God Message Now/God Message
โ–ถ๏ธŽ

God Says:"I WANT YOU TO KNOW THIS โ€” OPEN IT TONIGHT"/God Message Now/God Message

[1hr Talk] Intro to Large Language Models
โ–ถ๏ธŽ

[1hr Talk] Intro to Large Language Models

PINK & ORANGE GRADIENT IN HD [3 HOURS]
โ–ถ๏ธŽ

PINK & ORANGE GRADIENT IN HD [3 HOURS]

I replaced my entire stack with Postgres...
โ–ถ๏ธŽ

I replaced my entire stack with Postgres...