Skip to content

Introduce Vector abstraction #3193

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
mp911de opened this issue Nov 4, 2024 · 0 comments
Closed

Introduce Vector abstraction #3193

mp911de opened this issue Nov 4, 2024 · 0 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@mp911de
Copy link
Member

mp911de commented Nov 4, 2024

With a growing number of databases now supporting vector data (array of floating-point numbers or quantized int8 (8-bit-integer)) we should explore introducing a Vector abstraction.

This is mainly to simplify declaration, portability, and default storage options.

In a domain model, one could declare:

class Article {

  List<Double> embedding;

  List<Float> embedding;

  double[] embedding;

  Double[] embedding;

  CqlVector embedding; // Cassandra

  Vector embedding; // MongoDB
}

By using store-specific types, a domain type becomes no longer portable across databases. We aim to provide an answer for the following questions:

  • What is the ideal property type to declare a vector?
  • How to persist (configure?) the vector if the underlying store provides various storage options?
  • How to handle vector data efficiently and optimize for zero-copy and address mutability issues?
@mp911de mp911de added the type: enhancement A general enhancement label Nov 4, 2024
@mp911de mp911de self-assigned this Nov 4, 2024
@mp911de mp911de closed this as completed in 059d09a Feb 4, 2025
mp911de pushed a commit that referenced this issue Feb 4, 2025
Also add shortcuts for empty sources and simplify copy calls that do not transform source values.

See #3193
Original pull request: #3194
mp911de added a commit that referenced this issue Feb 4, 2025
Introduce empty constants to reduce allocations.

See #3193
Original pull request: #3194
@mp911de mp911de added this to the 3.5 M1 (2025.0.0) milestone Feb 4, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant