faiss VS postgres

Compare faiss vs postgres and see what are their differences.

faiss

A library for efficient similarity search and clustering of dense vectors. (by facebookresearch)

postgres

Unmodified Postgres with some useful plugins (by supabase)
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
workos.com
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
faiss postgres
71 15
28,202 1,269
4.4% 5.4%
9.4 9.5
3 days ago 4 days ago
C++ Shell
MIT License PostgreSQL License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

faiss

Posts with mentions or reviews of faiss. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-28.
  • Haystack DB – 10x faster than FAISS with binary embeddings by default
    3 projects | news.ycombinator.com | 28 Apr 2024
    There are also FAISS binary indexes[0], so it'd be great to compare binary index vs binary index. Otherwise it seems a little misleading to say it is a FAISS vs not FAISS comparison, since really it would be a binary index vs not binary index comparison. I'm not too familiar with binary indexes, so if there's a significant difference between the types of binary index then it'd be great to explain what that is too.

    [0] https://github.com/facebookresearch/faiss/wiki/Binary-indexe...

  • Show HN: Chromem-go – Embeddable vector database for Go
    4 projects | news.ycombinator.com | 5 Apr 2024
    Or just use FAISS https://github.com/facebookresearch/faiss
  • OpenAI: New embedding models and API updates
    1 project | news.ycombinator.com | 25 Jan 2024
  • You Shouldn't Invest in Vector Databases?
    4 projects | news.ycombinator.com | 25 Nov 2023
    You can try txtai (https://github.com/neuml/txtai) with a Faiss backend.

    This Faiss wiki article might help (https://github.com/facebookresearch/faiss/wiki/Indexing-1G-v...).

    For example, a partial Faiss configuration with 4-bit PQ quantization and only using 5% of the data to train an IVF index is shown below.

    faiss={"components": "IVF,PQ384x4fs", "sample": 0.05}

  • Approximate Nearest Neighbors Oh Yeah
    5 projects | news.ycombinator.com | 30 Oct 2023
    If you want to experiment with vector stores, you can do that locally with something like faiss which has good platform support: https://github.com/facebookresearch/faiss

    Doing full retrieval-augmented generation (RAG) and getting LLMs to interpret the results has more steps but you get a lot of flexibility, and there's no standard best-practice. When you use a vector DB you get the most similar texts back (or an index integer in the case of faiss), you then feed those to an LLM like a normal prompt.

    The codifer for the RAG workflow is LangChain, but their demo is substantially more complex and harder-to-use than even a homegrown implementation: https://news.ycombinator.com/item?id=36725982

  • Can someone please help me with this problem?
    2 projects | /r/learnprogramming | 24 Sep 2023
    According to this documentation page, faiss-gpu is only supported on Linux, not on Windows.
  • Ask HN: Are there any unsolved problems with vector databases
    1 project | news.ycombinator.com | 16 Sep 2023
    Indexes for vector databases in high dimensions are nowhere near are effective as the 2-d indexes used in GIS or the 1-d B-tree indexes that are commonly used in databases.

    Back around 2005 I was interested in similarity search and read a lot of conference proceedings on the top and was basically depressed at the state of vector database indexes and felt that at least for the systems I was prototyping I was OK with a full scan and later in 2013 I had the assignment of getting a search engine for patents using vector embeddings in front of customers and we got performance we found acceptable with full scan.

    My impression today is that the scene is not too different than it was in 2005 but I can't say I haven't missed anything. That is, you have tradeoffs between faster algorithms that miss some results and slower algorithms that are more correct.

    I think it's already a competitive business. You have Pinecone which had the good fortune of starting before the gold rush. Many established databases are adding vector extension. I know so many engineering managers who love postgresql and they're just going to load a vector extension and go. My RSS reader YOShInOn uses SBERT embeddings to cluster and classify text and certainly More Like This and semantic search are on the agenda, I'd expect it to take about an hour to get

    https://github.com/facebookresearch/faiss

    up and working, I could spend more time stuck on some "little" front end problem like getting something to look right in Bootstrap than it would take to get working.

    I can totally believe somebody could make a better vector db than what's out there but will it be better enough? A startup going through YC now could spend 2-3 to get a really good product and find customers and that is forever in a world where everybody wants to build AI applications right now.

  • Code Search with Vector Embeddings: A Transformer's Approach
    3 projects | dev.to | 27 Aug 2023
    As the size of the codebase grows, storing and searching through embeddings in memory becomes inefficient. This is where vector databases come into play. Tools like Milvus, Faiss, and others are designed to handle large-scale vector data and provide efficient similarity search capabilities. I've wrtten about how to also use sqlite to store vector embeddings. By integrating a vector database, you can scale your code search tool to handle much larger codebases without compromising on search speed.
  • Unum: Vector Search engine in a single file
    8 projects | news.ycombinator.com | 31 Jul 2023
    But FAISS has their own version ("FastScan") https://github.com/facebookresearch/faiss/wiki/Fast-accumula...
  • Introduction to Vector Similarity Search
    4 projects | news.ycombinator.com | 11 Jul 2023
    https://github.com/facebookresearch/faiss

postgres

Posts with mentions or reviews of postgres. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-15.
  • Supabase – General Availability Week
    7 projects | news.ycombinator.com | 15 Apr 2024
    - Now, the connection between our API servers and the database was slow (a few hundred ms per query), so we moved to self-hosting Postgres which was pretty painful. We tried to use https://github.com/supabase/postgres, but the documentation was very lacking and we had to make a bunch of modifications to get it to work. After we got it working, it was pretty smooth though - pretty easy to implement backups, etc.
  • Any comprehensive guide on self hosting ?
    4 projects | /r/Supabase | 1 Jul 2023
  • Vector support in PostgreSQL services to power AI-enabled applications
    3 projects | news.ycombinator.com | 1 Jul 2023
    I think Supabase generally does good work, but I don't think they can be given credit for pgvector, if that's what you're indicating (I might have misread).

    As I understand, Andrew Kane is the principal author of pgvector, and has worked on it for almost two years before Supabase added support for it.

    See also https://github.com/pgvector/pgvector/issues/54 and https://github.com/supabase/postgres/pull/472.

  • Storing OpenAI embeddings in Postgres with pgvector
    9 projects | news.ycombinator.com | 6 Feb 2023
    we merged the pgvector PR about 2 weeks ago (https://github.com/supabase/postgres/pull/472). If you're missing anything for your CLI don't hesitate to reach out and we'll see if we can integrate it into the product (my email is in my profile)

    as an aside, Pinecone looks great

  • Given an ansible playbook, how do I "execute" it on a server?
    5 projects | /r/homelab | 3 May 2022
    One of the things they recommend is separating the PostgreSQL DB from the rest of the stack. And they also provide an ansible playbook to set up a postgres DB: https://github.com/supabase/postgres/blob/625899e687047a9da658f3f8cc6dd91ac9769694/ansible/playbook.yml
  • GraphQL is now available on Supabase
    14 projects | news.ycombinator.com | 29 Mar 2022
    > entire solution from docker

    We PR'd this into our docker-compose today [0]. We're always a bit slammed during Launch Week, so if you spot any problems let use know and we'll patch it up asap.

    The extension is also deployed directly into our PG bundle [1] which is available in docker [2]

    > The Gui for adding roles and tying them to postgres access is very slick with hasura. Is this done manually via SQL commands with supabase?

    I haven't tried Hasura so I don't know if this is a direct comparison. pg_graphql works with Postgres Row Level Security - we provide a GUI for this in our Dashboard, but they are also just native PG Policies, so you can write them in raw SQL

    [0] https://github.com/supabase/supabase/pull/6138/files#diff-41...

    [1] https://github.com/supabase/postgres

    [2] https://hub.docker.com/r/supabase/postgres

  • PG 14 now available in Supabase
    2 projects | /r/PostgreSQL | 29 Nov 2021
    and can also PR if it's something useful for everyone: https://github.com/supabase/postgres
  • GitHub - supabase/postgres: Unmodified Postgres with some useful plugins
    1 project | /r/PostgreSQL | 7 Sep 2021
  • Hacker News top posts: Sep 6, 2021
    5 projects | /r/hackerdigest | 6 Sep 2021
    Show HN: Postgres Docker image with common extensions\ (23 comments)
  • Show HN: Postgres Docker image with common extensions
    5 projects | news.ycombinator.com | 5 Sep 2021
    Hi! I'm one of the contributors to the repo. Just to clarify, our Docker image [0] only contains the latest version of Postgres (13) and the common extensions listed out here [1]. All the other features such as this [2] and this [3] are only available in the AWS EC2 or DO droplet images. We've since updated our README to make that clearer :-)

    You can still connect the DB with a PgBouncer image spun up in another container however. Unfortunately, I can't really recommend you which one since there doesn't seem to be an official Docker image for PgBouncer and I myself have never tried any of the existing ones out there. If you're looking to use PostgREST however, they do have an official Docker image that you can use over here [4].

    [0]: https://hub.docker.com/r/supabase/postgres

    [1]: https://github.com/supabase/postgres#extensions

    [2]: https://github.com/supabase/postgres#enhanced-security

    [3]: https://github.com/supabase/postgres#additional-goodies

    [4]: https://hub.docker.com/r/postgrest/postgrest/

What are some alternatives?

When comparing faiss and postgres you can also consider the following projects:

annoy - Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk

postgres-operator - Postgres operator creates and manages PostgreSQL clusters running in Kubernetes

Milvus - A cloud-native vector database, storage for next generation AI applications

DBngin - DB Engine

hnswlib - Header-only C++/python library for fast approximate nearest neighbors

http-proxy - A full-featured http proxy for node.js

pgvector - Open-source vector similarity search for Postgres

postgres-operator - Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service.

Weaviate - Weaviate is an open-source vector database that stores both objects and vectors, allowing for the combination of vector search with structured filtering with the fault tolerance and scalability of a cloud-native database​.

edgedb - A graph-relational database with declarative schema, built-in migration system, and a next-generation query language

qdrant - Qdrant - High-performance, massive-scale Vector Database for the next generation of AI. Also available in the cloud https://cloud.qdrant.io/

docker-openldap - OpenLDAP container image 🐳🌴