postgres-new icon indicating copy to clipboard operation
postgres-new copied to clipboard

database.build documentation, e.g. for embeddings?

Open sfkeller opened this issue 9 months ago • 2 comments
trafficstars

Improve documentation

Link

I'm referring to this absolutely amazing experiment with database.build (formerly postgres.new).

Describe the problem

Question 1: Is there a documentation for database.build?

Question 2: How to work with embeddings? I'm using the same dataset of athletes from the 2024 Paris Olympics as in the blog post and intro video, and I'd like to ask: Get the names of the athletes whose nick_names are not similar to their names. How can I do this?

I'm aware that database.build uses transformers.js and PGLite that supports pgvector.

Describe the improvement

This could be the start of the documentation:

Using embeddings: database.build uses pgvector to store embeddings and transformers.js to create embeddings inside the browser. Instead of storing the embeddings "next to" the data the user provides, database.build creates a table meta that can be referenced (because embeddings can be large). When the LLM sees a reference to meta.embeddings, it knows it can "fetch" that data later when it's needed (for RAG etc).

Using the dataset of athletes from the 2024 Paris Olympics as in the blog post and intro video, and I'd like to ask: Get the names of the athletes whose nick_names are not similar to their names. (tbc. ...)

Additional context

A quick tip here on how to achieve a similarity search would be enough for me in the first place.

sfkeller avatar Feb 17 '25 09:02 sfkeller