Skip to content

Add pgvector support#112

Open
kendagriff wants to merge 1 commit intoCircleCI-Public:mainfrom
banzai-inc:support-pgvector
Open

Add pgvector support#112
kendagriff wants to merge 1 commit intoCircleCI-Public:mainfrom
banzai-inc:support-pgvector

Conversation

@kendagriff
Copy link

Description

Adds support for pgvector, an extension essential to working with GPT4, and isn't included natively in contrib.

Reasons

I haven't been able to find an effective way to add pgvector support to CircleCI without a custom image—this PR brings pgvector support of the box. pgvector is useful for training LLMs, e.g. GPT4, adding embeddings and similarity queries to Postgres.

An embedding is a vector (list) of floating point numbers. The between two vectors measures their relatedness. Small distances suggest high relatedness and large distances suggest low relatedness.

https://platform.openai.com/docs/guides/embeddings/what-are-embeddings

NOTE: I added the installation steps for pgvector to the initial RUN as apt-get purge removes clang, which is necessary for make install.

Checklist

  • I have made changes to the Dockerfile.template file only
  • I have not made any manual changes to automatically generated files
  • My PR follows best practices as described in the contributing guidelines
  • (Optional, but recommended) My commits are signed

https://github.com/pgvector/pgvector

pgvector is essential for running similarity queries for LLMs like GTP4.
@kendagriff kendagriff requested a review from a team as a code owner December 19, 2023 19:36
@kendagriff
Copy link
Author

@ryanbourdais Any interest in this?

@kendagriff
Copy link
Author

@JalexChen: Bumping this again to see if there's any interest.

@BrandonMathis
Copy link

I would be quite interested in seeing this merged. I've started doing a lot of work with storing vector embeddings in postgres and currently use this docker image in my CircleCI builds.

Any tips on how i can switch to an image build with the code in this PR to test it out? I currently have this in my CircleCI config file

      - image: cimg/postgres:12.15
        environment:
          POSTGRES_USER: 'user'
          POSTGRES_DB: 'test'
          POSTGRES_PASSWORD: ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants