Vectors in SQLite! (with libSQL) @aarondfrancis
Vectors in SQLite! (with libSQL)  @aarondfrancis
Uploaded October 2024 | Updated September 2026, 1 hour ago
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: highperformancesqlite.com

Get your free SQLite reference guide: highperformancesqlite.com/products/sqlite-reference-guide

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

Follow me:
Twitter: twitter.com/aarondfrancis
LinkedIn: linkedin.com/in/aarondfrancis
Website: 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
Vectors in SQLite! (with libSQL)The Music Makers Podcast - 025 - A Little Bit of Slope Makes Up For a Lot of Y-InterceptI made $10,000 from a vibecoded appCode tip: Dont undo what you havent doneBuilding a Fly.io driver for Laravel SidecarPHP is the futureThe Music Makers Podcast - 012 - Career Advice: Dont Try To Be The BestThe Music Makers Podcast - 028 - StuffHow I hacked Laravel to ignore missing route bindingsLevel up your design with this CSS propertyDesigning the data model for our course platform (with Stripe)Laravel adds a new email provider
Aaron Francis |

Vectors in SQLite! (with libSQL)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER