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
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










