Nothing Special   »   [go: up one dir, main page]

Skip to content

Scalable Vector database plugin for Postgres, written in Rust, specifically designed for LLM

License

Notifications You must be signed in to change notification settings

KenMacD/pgvecto.rs

 
 

Repository files navigation

pgvecto.rs

discord invitation link trackgit-views all-contributors

pgvecto.rs is a Postgres extension that provides vector similarity search functions. It is written in Rust and based on pgrx. It is currently in the beta status, we invite you to try it out in production and provide us with feedback. Read more at 📝our launch blog.

Why use pgvecto.rs

  • 💃 Easy to use: pgvecto.rs is a Postgres extension, which means that you can use it directly within your existing database. This makes it easy to integrate into your existing workflows and applications.
  • 🔗 Async indexing: pgvecto.rs's index is asynchronously constructed by the background threads and does not block insertions and always ready for new queries.
  • 🥅 Filtering: pgvecto.rs supports filtering. You can set conditions when searching or retrieving points. This is the missing feature of other postgres extensions.
  • 🧮 Quantization: pgvecto.rs supports scalar quantization and product qutization up to 64x.
  • 🦀 Rewrite in Rust: Rust's strict compile-time checks ensure memory safety, reducing the risk of bugs and security issues commonly associated with C extensions.

Comparison with pgvector

pgvecto.rs pgvector
Transaction support ⚠️
Sufficient Result with Delete/Update/Filter ⚠️
Vector Dimension Limit 65535 2000
Prefilter on HNSW
Parallel HNSW Index build ⚡️ Linearly faster with more cores 🐌 Only single core used
Async Index build Ready for queries anytime and do not block insertions.
Quantization Scalar/Product Quantization

More details at ./docs/comparison-pgvector.md

Documentation

For users, we recommend you to try pgvecto.rs using our pre-built docker image, by running

docker run \
  --name pgvecto-rs-demo \
  -e POSTGRES_PASSWORD=mysecretpassword \
  -p 5432:5432 \
  -d tensorchord/pgvecto-rs:pg16-latest

Development with envd

For developers, you could use envd to set up the development environment with one command. It will create a docker container and install all the dependencies for you.

pip install envd
envd up

Contributing

We need your help! Please check out the issues.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Alex Chi
Alex Chi

💻
AuruTus
AuruTus

💻
Avery
Avery

💻 🤔
Ben Ye
Ben Ye

📖
Ce Gao
Ce Gao

💼 🖋 📖
Jinjing Zhou
Jinjing Zhou

🎨 🤔 📆
Keming
Keming

🐛 💻 📖 🤔 🚇
Mingzhuo Yin
Mingzhuo Yin

💻 ⚠️ 🚇
Usamoi
Usamoi

💻 🤔
odysa
odysa

📖 💻
yihong
yihong

💻
盐粒 Yanli
盐粒 Yanli

💻
Add your contributions

This project follows the all-contributors specification. Contributions of any kind welcome!

Acknowledgements

Thanks to the following projects:

  • pgrx - Postgres extension framework in Rust
  • pgvector - Postgres extension for vector similarity search written in C

About

Scalable Vector database plugin for Postgres, written in Rust, specifically designed for LLM

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 89.5%
  • Python 7.8%
  • C 1.6%
  • Other 1.1%