Live data from Hacker News

Vector databases are the wrong abstraction

timescale.com

21–30 of 95 posts

Re: Vector databases are the wrong abstraction

#22
> the responsibility for generating and updating them as the underlying data changes can be handed over to the database management system

And now we shift ever more slightly back towards logic in the DB. I for one am thrilled; there’s no reason other than unfamiliarity to not let RDBMS perform functions it’s designed to do. As long as these offloads are documented in code, embrace not needing to handle it in your app.

Re: Vector databases are the wrong abstraction

#23

Earlier quoted context omitted.

How does their embedding model compare in terms of retrieval accuracy to, say `text-embedding-3-small` and `text-embedding-3-large`?

It’s impossible to answer that question without knowing what content/query domain you are embedding. Checkout MTEB leaderboard, dig into the retrieval benchmark, and look for analogous datasets.

So we're talking maximizing embedding model per use case? Medical dats would require differnet model than say sales data? Sounds very fragmented approach.

Re: Vector databases are the wrong abstraction

#24
Hey, this looks great! I'm a huge fan of vectors in Postgres or wherever your data lives, and this seems like a great abstraction.

When I write a sql query that includes a vector search and some piece of logic, like: ``` select name from users where age > 21 order by limit 10; ``` Does it filter by age first or second? I've liked the DX of pg_vector, but they do vector search, followed by filtering. It seems like that slows down what should be the superpower of a setup like this.

Here's a bit more of a complicated example of what I'm talking about: https://blog.bawolf.com/p/embeddings-are-a-good-starting-poi...

Re: Vector databases are the wrong abstraction

#25

Hey, this looks great! I'm a huge fan of vectors in Postgres or wherever your data lives, and this seems like a great abstraction. When I write a sql query that includes a vector search and some piece of logic, like: ``` select name from users where age > 21 order by limit 10; ``` Does it filter by age first or second? I've liked the DX of pg_vector, but they do vector search, followed by filtering. It seems like tha…

pg_vector does post-filtering, not pre-filtering

Re: Vector databases are the wrong abstraction

#26
> Vector databases treat embeddings as independent data, divorced from the source data from which embeddings are created

With the exception of Pinecone: Chroma, Qdrant, Weaviate, Elastic, Mongo, and many others store the chunk/document alongside the embedding.

This is intentional misinformation.

Re: Vector databases are the wrong abstraction

#27
I agree.

Similar to blog post, instead of at the extension layer I built a PostgreSQL ORM for Node.js based on ActiveRecord + Django's ORM that includes the concept of vector fields [0][1] that lets you write code like this:

    // Stores the `title` and `content` fields together as a vector
    // in the `content_embedding` vector field
    BlogPost.vectorizes(
      'content_embedding',
      (title, content) => `Title: ${title}\n\nBody: ${content}`
    );

    // Find the top 10 blog posts matching "blog posts about dogs"
    // Automatically converts query to a vector
    let searchBlogPosts = await BlogPost.query()
      .search('content_embedding', 'blog posts about dogs')
      .limit(10)
      .select();
I find it tremendously useful; you can query the underlying data or the embedding content, and you can define how the fields in the model get stored as embeddings in the first place.

[0] https://github.com/instant-dev/orm?tab=readme-ov-file#using-...

[1] https://github.com/instant-dev/orm?tab=readme-ov-file#using-...

Re: Vector databases are the wrong abstraction

#28

> Vector databases treat embeddings as independent data, divorced from the source data from which embeddings are created With the exception of Pinecone: Chroma, Qdrant, Weaviate, Elastic, Mongo, and many others store the chunk/document alongside the embedding. This is intentional misinformation.

Post co-author here. The point is a little nuanced, so let me explain:

You are correct in saying that that you can store embeddings and source data together in many vectordbs. We actually point this out in the post. The main point is that they are not linked but merely stored alongside each other. If one changes, the other one does not automatically change, making the relationship between the two stale.

The idea behind Pgai Vectorizer is that it actually links embeddings with underlying source data so that changes in source data are automatically reflected in embeddings. This is a better abstraction and it removes the burden of the engineer to ensure embeddings are in sync as their data changes.

Re: Vector databases are the wrong abstraction

#30
post #28

> Vector databases treat embeddings as independent data, divorced from the source data from which embeddings are created With the exception of Pinecone: Chroma, Qdrant, Weaviate, Elastic, Mongo, and many others store the chunk/document alongside the embedding. This is intentional misinformation.

Post co-author here. The point is a little nuanced, so let me explain: You are correct in saying that that you can store embeddings and source data together in many vectordbs. We actually point this out in the post. The main point is that they are not linked but merely stored alongside each other. If one changes, the other one does not automatically change, making the relationship between the two stale. The idea behi…

i know it is the case in chroma this is supported out of the box with 0 lines of code. i’m pretty sure it’s supported everywhere else in no more than 3 lines of code.
Post reply on HN