pgvector / pgvector/pgvector-dotnet
Add convention plugin to configure vector properties as not auto-loaded
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 299
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
When loading entities, EF currently always loads all their properties; in the case of vector properties, this isn't needed in the vast majority of cases (as embeddings are used for similarity search in the database but rarely need to be fetched back), and the non-trivial size of embeddings make this a performance problem. For EF 11, we are mitigating this in https://github.com/dotnet/efcore/issues/37277.
We should apply this for pgvector as well. This means introducing an IConventionSetPlugin that would add a convention to mark pgvector properties as non-auto-loaded, similar to the SQL Server convention. I'm happy to submit a PR for this.
@ankane in general regarding versioning... I see that the latest version of Pgvector.EntityFrameworkCore depends on EF 9.0. With 10.0 out and 9.0 going out of support this year, we should probably (a) release a version that targets EF 10.0, and then (b) prepare (and possibly release) another prelease version (incrementing the major or minor version) to target EF 11 (which should be out in November). We should also probably take a look at the lower-level pgvector/Npgsql versions as well.
Let me know what you think, am happy to work on all this as needed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the IConventionSetPlugin entry point described in the issue and compare it with the linked SQL Server convention changes. Determine how pgvector properties should be marked non-auto-loaded, then verify that the convention applies correctly to entity loading; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, postgresql
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100