You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+68-75Lines changed: 68 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,26 +12,8 @@
12
12
* ✅ **Plug-and-play** – drop into existing SQLite workflows with minimal effort
13
13
* ✅ **Cross-platform** – works out of the box on all major OSes
14
14
15
-
---
16
-
17
-
## 🧠 What Is Vector Search?
18
-
19
-
Vector search is the process of finding the closest match(es) to a given vector (a point in high-dimensional space) based on a similarity or distance metric. It is essential for AI and machine learning applications where data is often encoded into vector embeddings.
20
-
21
-
### Common Use Cases
22
-
23
-
***Semantic Search**: find documents, emails, or messages similar to a query
24
-
***Image Retrieval**: search for visually similar images
25
-
***Recommendation Systems**: match users with products, videos, or music
26
-
***Voice and Audio Search**: match voice queries or environmental sounds
27
-
***Anomaly Detection**: find outliers in real-time sensor data
28
-
***Robotics**: localize spatial features or behaviors using embedded observations
29
-
30
-
In the AI era, embeddings are everywhere – from language models like GPT to vision transformers. Storing and searching them efficiently is the foundation of intelligent applications.
31
-
32
-
---
33
15
34
-
## 🧩 Why Use SQLite-Vector?
16
+
## Why Use SQLite-Vector?
35
17
36
18
| Feature | SQLite-Vector | Traditional Solutions |
@@ -45,52 +27,32 @@ In the AI era, embeddings are everywhere – from language models like GPT to vi
45
27
46
28
Unlike other vector databases or extensions that require complex setup, SQLite-Vector **just works** with your existing database schema and tools.
47
29
48
-
---
49
-
50
-
### 🚀 Instant Vector Search – No Preindexing Required
51
-
52
-
Unlike other SQLite vector extensions that rely on complex indexing algorithms such as DiskANN, HNSW, or IVF, which often require **preprocessing steps that can take hours or even days**, `sqlite-vector` works out of the box with your existing data. There’s **no need to preindex your vectors**—you can start performing fast, approximate or exact vector searches **immediately**.
53
-
54
-
This means:
55
-
56
-
* 🕒 **No waiting time** before your app or service is usable
57
-
* 🔄 **Zero-cost updates** – you can add, remove, or modify vectors on the fly without rebuilding any index
58
-
* ⚡ **Works directly with BLOB columns** in ordinary SQLite tables – no special schema or virtual table required
59
-
* 🌍 **Ideal for edge and mobile use cases**, where preprocessing large datasets is not practical or possible
60
-
61
-
By eliminating the need for heavyweight indexing, `sqlite-vector` offers a **simpler, faster, and more developer-friendly** approach to embedding vector search in your applications.
62
-
63
-
---
64
-
65
-
## 🛠 Supported Vector Types
66
30
67
-
You can store your vectors as `BLOB` columns in ordinary tables. Supported formats include:
68
-
69
-
*`float32` (4 bytes per element)
70
-
*`float16` (2 bytes per element)
71
-
*`bfloat16` (2 bytes per element)
72
-
*`int8` (1 byte per element)
73
-
*`uint8` (1 byte per element)
31
+
## 📦 Installation
74
32
75
-
Simply insert a vector as a binary blob into your table. No special table types or schemas are required.
33
+
### Pre-built Binaries
76
34
77
-
---
35
+
Download the appropriate pre-built binary for your platform from the official [Releases](https://github.com/sqliteai/sqlite-vector/releases) page:
78
36
79
-
## 📐 Supported Distance Metrics
37
+
- Linux: x86 and ARM
38
+
- macOS: x86 and ARM
39
+
- Windows: x86
40
+
- Android
41
+
- iOS
80
42
81
-
Optimized implementations available:
43
+
### Loading the Extension
82
44
83
-
***L2 Distance (Euclidean)**
84
-
***Squared L2**
85
-
***L1 Distance (Manhattan)**
86
-
***Cosine Distance**
87
-
***Dot Product**
45
+
```sql
46
+
-- In SQLite CLI
47
+
.load ./vector
88
48
89
-
These are implemented in pure C and optimized for SIMD when available, ensuring maximum performance on modern CPUs and mobile devices.
49
+
-- In SQL
50
+
SELECT load_extension('./vector');
51
+
```
90
52
91
-
---
53
+
Or embed it directly into your application.
92
54
93
-
## 🔍 Example Usage
55
+
## Example Usage
94
56
95
57
```sql
96
58
-- Create a regular SQLite table
@@ -120,35 +82,66 @@ SELECT e.id, v.distance FROM images AS e
120
82
ONe.id=v.rowid;
121
83
```
122
84
123
-
---
85
+
## 📋 Documentation
124
86
125
-
## 📦 Installation
87
+
Extensive API documentation can be found in the [API page](https://github.com/sqliteai/sqlite-vector/blob/main/API.md)
126
88
127
-
### Pre-built Binaries
89
+
##🧩 Features
128
90
129
-
Download the appropriate pre-built binary for your platform from the official [Releases](https://github.com/sqliteai/sqlite-vector/releases) page:
91
+
### Instant Vector Search – No Preindexing Required
130
92
131
-
- Linux: x86 and ARM
132
-
- macOS: x86 and ARM
133
-
- Windows: x86
134
-
- Android
135
-
- iOS
93
+
Unlike other SQLite vector extensions that rely on complex indexing algorithms such as DiskANN, HNSW, or IVF, which often require **preprocessing steps that can take hours or even days**, `sqlite-vector` works out of the box with your existing data. There’s **no need to preindex your vectors**—you can start performing fast, approximate or exact vector searches **immediately**.
136
94
137
-
### Loading the Extension
95
+
This means:
138
96
139
-
```sql
140
-
-- In SQLite CLI
141
-
.load ./vector
97
+
* 🕒 **No waiting time** before your app or service is usable
98
+
* 🔄 **Zero-cost updates** – you can add, remove, or modify vectors on the fly without rebuilding any index
99
+
* ⚡ **Works directly with BLOB columns** in ordinary SQLite tables – no special schema or virtual table required
100
+
* 🌍 **Ideal for edge and mobile use cases**, where preprocessing large datasets is not practical or possible
142
101
143
-
-- In SQL
144
-
SELECT load_extension('./vector');
145
-
```
102
+
By eliminating the need for heavyweight indexing, `sqlite-vector` offers a **simpler, faster, and more developer-friendly** approach to embedding vector search in your applications.
146
103
147
-
Or embed it directly into your application.
104
+
### Supported Vector Types
148
105
149
-
## 📋 Documentation
106
+
You can store your vectors as `BLOB` columns in ordinary tables. Supported formats include:
150
107
151
-
Extensive API documentation can be found in the [API page](https://github.com/sqliteai/sqlite-vector/blob/main/API.md)
108
+
*`float32` (4 bytes per element)
109
+
*`float16` (2 bytes per element)
110
+
*`bfloat16` (2 bytes per element)
111
+
*`int8` (1 byte per element)
112
+
*`uint8` (1 byte per element)
113
+
114
+
Simply insert a vector as a binary blob into your table. No special table types or schemas are required.
115
+
116
+
117
+
### Supported Distance Metrics
118
+
119
+
Optimized implementations available:
120
+
121
+
***L2 Distance (Euclidean)**
122
+
***Squared L2**
123
+
***L1 Distance (Manhattan)**
124
+
***Cosine Distance**
125
+
***Dot Product**
126
+
127
+
These are implemented in pure C and optimized for SIMD when available, ensuring maximum performance on modern CPUs and mobile devices.
128
+
129
+
---
130
+
131
+
# 🧠 What Is Vector Search?
132
+
133
+
Vector search is the process of finding the closest match(es) to a given vector (a point in high-dimensional space) based on a similarity or distance metric. It is essential for AI and machine learning applications where data is often encoded into vector embeddings.
134
+
135
+
### Common Use Cases
136
+
137
+
***Semantic Search**: find documents, emails, or messages similar to a query
138
+
***Image Retrieval**: search for visually similar images
139
+
***Recommendation Systems**: match users with products, videos, or music
140
+
***Voice and Audio Search**: match voice queries or environmental sounds
141
+
***Anomaly Detection**: find outliers in real-time sensor data
142
+
***Robotics**: localize spatial features or behaviors using embedded observations
143
+
144
+
In the AI era, embeddings are everywhere – from language models like GPT to vision transformers. Storing and searching them efficiently is the foundation of intelligent applications.
0 commit comments