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
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
testaccepts and returns how many were removed. -
search(
List< double> queryEmbedding, {int topK = 4, DocumentFilter? where}) → Future<List< ScoredDocument> > -
Returns the
topKdocuments most similar toqueryEmbedding, ordered by descending score. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited