4 Stores
(make-store #:name name) -> store? |
(store-count s) -> exact-nonnegative-integer? |
(store-add! s text #:source source) -> entry? |
(store-add-document! s text |
#:source source |
#:chunk-size size #:chunk-overlap overlap) |
-> exact-nonnegative-integer? |
(store-search s query-text #:top-k k) |
-> (listof (cons/c flonum? entry?)) |
(store-search-vector s query-vector #:top-k k) |
-> (listof (cons/c flonum? entry?)) |
(entry text source embedding) -> entry? |
store-add-document! chunks the text and embeds all chunks in one batch call, so a document costs one round trip, not one per chunk. Search scores are dot products of unit vectors — values in [-1, 1] — best first.