sqlite-vec/site/index.md
2024-05-26 20:55:15 -07:00

4.3 KiB

layout hero features
home
name text tagline actions
sqlite-vec A vector search SQLite extension that runs anywhere!
theme text link
brand Getting Started /getting-started
theme text link
alt API Reference /api-reference
title details
Runs everywhere On the server, in the browser with WASM, mobile devices, and more!
title details
Bindings for many languages Python, Ruby, Node.js/Deno/Bun, Go, Rust, and more!
title details
Only SQL No extra configuration or server, only CREATEs, INSERTs, and SELECTs
create virtual table vec_movies using vec0(
  synopsis_embedding float[768]
);

insert into vec_movies(rowid, synopsis_embedding)
  select
    rowid,
    embed(synopsis) as synopsis_embedding
  from movies;

select rowid, distance
from vec_movies
where synopsis_embedding match embed('scary futuristic movies')
order by distance
limit 20;

sqlite
create virtual table vec_movies using vec0(
  synopsis_embedding float[768]
);

insert into vec_movies(rowid, synopsis_embedding)
  select
    rowid,
    embed(synopsis) as synopsis_embedding
  from movies;

select rowid, distance
from vec_movies
where synopsis_embedding match embed('scary futuristic movies')
order by distance
limit 20;