pgvector/pgvector-dotnet

pgvector support for .NET (C#, F#, and Visual Basic)

What it solves

pgvector-dotnet adds support for the pgvector PostgreSQL extension to .NET applications, allowing developers to store and query vector embeddings directly from C#, F#, and Visual Basic.

How it works

It provides .NET data types for standard vectors, half vectors, and sparse vectors, integrating directly with popular database libraries like Npgsql, Dapper, and Entity Framework Core to handle insertions, similarity searches, and approximate index creation.

Who it’s for

It is designed for .NET developers building AI applications, recommendation systems, or search features that rely on PostgreSQL for vector storage.

Highlights

  • Supports C#, F#, and Visual Basic.
  • Integrates with Npgsql, Dapper, Entity Framework Core, and Npgsql.FSharp.
  • Supports vector, half-vector, and sparse vector data types.
  • Enables nearest-neighbor queries and distance calculations using L2 distance, inner product, and cosine distance.
  • Supports approximate indexing methods like HNSW and IVFFlat.

Related

  • Project
  • Project
  • Project
  • Project
  • Project