Open jmartisk opened 3 months ago
I can contribute on the PgVector part. Any advise to start ? Here is the example i'm thinking to start : https://github.com/langchain4j/langchain4j-examples/blob/main/rag-examples/src/main/java/_06_Metadata_Filtering.java#L100
You'll need to override the EmbeddingStore.search
method in PgVectorEmbeddingStore
in a way that it doesn't ignore the passed filter, but instead transforms the filter into a suitable WHERE
SQL clause and uses that clause when retrieving embeddings from the database...
LangChain4j 0.28 has a new metadata filter API for embedding stores. We should implement that for embedding stores where it is appropriate - for some embedding stores we don't just take the upstream implementation, we have our own instead.
Tracking: