Skip to content

feat: Add Supabase integration with PgVector document store and embedding retriever #3164

Open
pontuselmrin wants to merge 20 commits intodeepset-ai:mainfrom
pontuselmrin:supabase
Open

feat: Add Supabase integration with PgVector document store and embedding retriever #3164
pontuselmrin wants to merge 20 commits intodeepset-ai:mainfrom
pontuselmrin:supabase

Conversation

@pontuselmrin
Copy link
Copy Markdown

Related Issues

Proposed Changes:

  • Adds a new supabase integration (integrations/supabase/) that provides SupabasePgVectorDocumentStore and SupabasePgvectorEmbeddingRetriever as thin wrappers around the existing pgvector-haystack integration, pre-configured for Supabase's connection model.
  • They subclass the PgvectorDocumentStore and PgvectorEmbeddingRetriever, respectively

How did you test it?

The testing functionality is done using a Supabase instance but because the feature is wrapping the pgvector integration the tests are essentially lifted from there.

  • Unit tests covering init (defaults, custom params, invalid store), serialization (to_dict/from_dict), run, and run_async
  • All existing integration tests continue to pass
  • integrated a full CI workflow via supabase.yml

Notes for the reviewer

Tested on Mac OS and Supabase CLI run via Docker locally.

Checklist

@pontuselmrin pontuselmrin requested a review from a team as a code owner April 14, 2026 18:11
@pontuselmrin pontuselmrin requested review from julian-risch and removed request for a team April 14, 2026 18:11
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 14, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added topic:CI type:documentation Improvements or additions to documentation labels Apr 14, 2026
@pontuselmrin pontuselmrin marked this pull request as draft April 14, 2026 18:12
@pontuselmrin pontuselmrin marked this pull request as ready for review April 14, 2026 18:32
@julian-risch julian-risch requested review from bogdankostic and removed request for julian-risch April 15, 2026 13:13
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to rename the file from document_store.py to pg_document_store.py the reason for the same is this issue makes use of SupabaseVectorBucketDocumentStore. Hence the question.
cc @davidsbatista

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its a good idea to wait for this one to be merged. I already scaffolded the integration so I think it could simplify the workflow for you a bit. @srini047

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what even I think orelse the effort gets duplicated here. So only my question on file naming remains.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's first merge this one - it's already in a very good state, just a few things need being addressed

@davidsbatista davidsbatista self-requested a review April 16, 2026 08:16
@davidsbatista
Copy link
Copy Markdown
Contributor

@pontuselmrin I did a first review and pushed some adjustments and fixed a few issues. But, overall, the PR looks pretty good!

Just some small improvements to complete it, and it should be ready to go:

  • We can also add a SupabasePgvectorKeywordRetriever as with the embedding retriever inheriting from the PgvectorEmbeddingRetriever
  • No retriever integration test, all the tests are still unit tests, we should add some integration tests that run against a docker instance
  • The README is missing setup instructions, env var, connection modes, and examples

Let me know if you have any questions/doubts

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

Labels

topic:CI type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SupabasePgVectorDocumentStore and SupabasePgvectorEmbeddingRetriever

4 participants