Download Latest Version sqlite-vec-0.1.6-loadable-android-i686.tar.gz (59.3 kB)
Email in envelope

Get an email when there's a new version of sqlite-vec

Home / v0.1.6
Name Modified Size InfoDownloads / Week
Parent folder
checksums.txt 2024-11-20 2.3 kB
install.sh 2024-11-20 7.4 kB
spm.json 2024-11-20 5.4 kB
sqlite-dist-manifest.json 2024-11-20 12.3 kB
sqlite-vec-0.1.6-static-linux-x86_64.tar.gz 2024-11-20 63.8 kB
sqlite-vec-0.1.6-static-macos-aarch64.tar.gz 2024-11-20 62.4 kB
sqlite-vec-0.1.6-static-macos-x86_64.tar.gz 2024-11-20 56.6 kB
sqlpkg.json 2024-11-20 417 Bytes
sqlite-vec-0.1.6-loadable-android-x86_64.tar.gz 2024-11-20 58.4 kB
sqlite-vec-0.1.6-loadable-ios-aarch64.tar.gz 2024-11-20 47.2 kB
sqlite-vec-0.1.6-loadable-iossimulator-aarch64.tar.gz 2024-11-20 49.6 kB
sqlite-vec-0.1.6-loadable-iossimulator-x86_64.tar.gz 2024-11-20 51.1 kB
sqlite-vec-0.1.6-loadable-linux-aarch64.tar.gz 2024-11-20 48.9 kB
sqlite-vec-0.1.6-loadable-linux-x86_64.tar.gz 2024-11-20 57.8 kB
sqlite-vec-0.1.6-loadable-macos-aarch64.tar.gz 2024-11-20 52.1 kB
sqlite-vec-0.1.6-loadable-macos-x86_64.tar.gz 2024-11-20 52.3 kB
sqlite-vec-0.1.6-loadable-windows-x86_64.tar.gz 2024-11-20 139.8 kB
sqlite-vec-0.1.6-static-ios-aarch64.tar.gz 2024-11-20 172.8 kB
sqlite-vec-0.1.6-static-iossimulator-aarch64.tar.gz 2024-11-20 175.7 kB
sqlite-vec-0.1.6-static-iossimulator-x86_64.tar.gz 2024-11-20 169.8 kB
sqlite-vec-0.1.6-static-linux-aarch64.tar.gz 2024-11-20 55.8 kB
sqlite-vec-0.1.6-amalgamation.tar.gz 2024-11-20 51.4 kB
sqlite-vec-0.1.6-amalgamation.zip 2024-11-20 51.6 kB
sqlite-vec-0.1.6-loadable-android-aarch64.tar.gz 2024-11-20 57.8 kB
sqlite-vec-0.1.6-loadable-android-armv7a.tar.gz 2024-11-20 57.9 kB
sqlite-vec-0.1.6-loadable-android-i686.tar.gz 2024-11-20 59.3 kB
sqlite-vec-0.1.6-cli-cosmopolitan.tar.gz 2024-11-20 2.1 MB
README.md 2024-11-20 4.9 kB
v0.1.6 - Metadata columns, Partition keys, and Auxiliary column support source code.tar.gz 2024-11-20 592.9 kB
v0.1.6 - Metadata columns, Partition keys, and Auxiliary column support source code.zip 2024-11-20 662.3 kB
Totals: 30 Items   5.0 MB 0

sqlite-vec now supports metadata columns in vec0 virtual tables! Check out the announcement blogpost (Nov 2024) for more information.

You can now declare metadata columns, partition keys, and auxliary columns in a vec0 virtual table:

:::sql
create virtual table vec_articles using vec0(

  article_id integer primary key,

  -- Vector text embedding of the `headline` column, with 384 dimensions
  headline_embedding float[384],

  -- Partition key, internally shard vector index on article published year
  year integer partition key,

  -- Metadata columns, can appear in `WHERE` clause of KNN queries
  news_desk text,
  word_count integer,
  pub_date text,

  -- Auxiliary columns, unindexed but fast lookups
  +headline text,
  +url text
);

And perform KNN queries with extra WHERE clauses:

:::sql
select
  article_id,
  headline,
  news_desk,
  word_count,
  url,
  pub_date,
  distance
from vec_articles
where headline_embedding match lembed('pandemic')
  and k = 8
  and year = 2020
  and news_desk in ('Sports', 'Business')
  and word_count between 500 and 1000;


┌────────────┬──────────────────────────────────────────────────────────────────────┬───────────┬────────────┬─────────────────────────────┬──────────────────────────┬───────────┐
│ article_id │ headline                                                             │ news_desk │ word_count │ url                         │ pub_date                 │ distance  │
├────────────┼──────────────────────────────────────────────────────────────────────┼───────────┼────────────┼─────────────────────────────┼──────────────────────────┼───────────┤
│    2911716 │ The Pandemic’s Economic Damage Is Growing                            │ Business  │        910 │ https://www.nytimes.com/... │ 2020-07-07T18:12:40+0000 │ 0.8928120 │
│    2892929 │ As Coronavirus Spreads, Olympics Face Ticking Clock and a Tough Call │ Sports    │        987 │ https://www.nytimes.com/... │ 2020-03-06T01:34:36+0000 │ 0.9608180 │
│    2932041 │ The Pandemic Is Already Affecting Next Year’s Sports Schedule        │ Sports    │        620 │ https://www.nytimes.com/... │ 2020-11-11T13:56:25+0000 │ 0.9802038 │
│    2915381 │ The Week in Business: Getting Rich Off the Pandemic                  │ Business  │        814 │ https://www.nytimes.com/... │ 2020-08-02T11:00:03+0000 │ 1.0064692 │
│    2896043 │ The Coronavirus and the Postponement of the Olympics, Explained      │ Sports    │        798 │ https://www.nytimes.com/... │ 2020-03-25T17:45:58+0000 │ 1.0115833 │
│    2898566 │ Robots Welcome to Take Over, as Pandemic Accelerates Automation      │ Business  │        871 │ https://www.nytimes.com/... │ 2020-04-10T09:00:27+0000 │  1.019637 │
│    2898239 │ The Pandemic Feeds Tech Companies’ Power                             │ Business  │        784 │ https://www.nytimes.com/... │ 2020-04-08T16:43:13+0000 │ 1.0200014 │
│    2929224 │ In M.L.S., the Pandemic Changes the Playoff Math                     │ Sports    │        859 │ https://www.nytimes.com/... │ 2020-10-29T17:09:10+0000 │ 1.0238885 │
└────────────┴──────────────────────────────────────────────────────────────────────┴───────────┴────────────┴─────────────────────────────┴──────────────────────────┴───────────┘

Consult the sqlite-vec vec0 documentation for additional info.

Source: README.md, updated 2024-11-20