MENU

Fun & Interesting

Vectors in SQLite! (with libSQL)

Aaron Francis 11,685 lượt xem 6 months ago
Video Not Working? Fix It Now

In this video, I explore how to improve related article recommendations on a website by leveraging SQLite with experimental vector support in libSQL, a package created by Turso. Follow along as we use OpenAI's API to generate embeddings, store them in a database, and calculate nearest neighbors for more relevant content suggestions.

Want to learn more SQLite? Check out my SQLite course: https://highperformancesqlite.com

Mentioned Links:
Turso: https://tur.so/a
libSQL: https://turso.tech/libsql
Nuno Maduro's OpenAI PHP client: https://github.com/openai-php/client
My video about using SQLite for my site: https://youtu.be/QiocnnlcXIU

Follow me:
Twitter: https://twitter.com/aarondfrancis
LinkedIn: https://www.linkedin.com/in/aarondfrancis
Website: https://aaronfrancis.com - find articles, podcasts, courses, and more.

Chapters:
00:00 - Introduction and Website Overview
00:26 - SQLite Database for the Website
00:39 - LibSQL Vector Support Introduction
01:21 - Creating Article Embeddings with OpenAI API
02:32 - Cleaning Article Contents
03:06 - Generating Embeddings from Article Data
04:55 - Storing Embeddings in libSQL
06:00 - Setting up Database for Embeddings
07:00 - Indexing and Storing Embeddings in SQLite
08:45 - Writing SQL Query for Related Articles
10:15 - Querying Article Embeddings for Nearest Neighbors
12:00 - Testing and Fetching Related Articles
14:10 - Improved Related Articles Display
16:00 - Conclusion and Future Plans

Comment