VectorStore class abstract interface

A store of embedded RagDocuments that supports similarity search.

Implement this to back the index with any storage engine (SQLite, a file, an HTTP service). The bundled InMemoryVectorStore keeps everything in memory and can be serialised to and from JSON.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
length → Future<int>
The number of documents currently stored.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(List<RagDocument> documents) → Future<void>
Adds documents (each of which must carry an embedding) to the store.
clear() → Future<void>
Removes all documents from the store.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeWhere(DocumentFilter test) → Future<int>
Removes every document test accepts and returns how many were removed.
Returns the topK documents most similar to queryEmbedding, ordered by descending score.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited