ZachNagengast/similarity-search-kit

Disk indexing coming?

Closed this issue ยท 9 comments

aehlke commented

Is disk storage for the indexes planned, or is it fast enough to use that the indexes can be built on every app launch?

Thanks to this PR you can save and load indexes on disk already #16

aehlke commented

Amazing thank you

While I'm here - it looks like this lib also needs upgrading to be able to support the new iOS 17 NLContextualEmbedding, is that correct? https://www.wwdcnotes.com/notes/wwdc23/10042/

aehlke commented

Thank you, I've seen this one example plus a couple articles in Japanese that discuss the code. However what I can't make sense of is how to go from having the contextual embeddings, to using them in a similarity search.

Do you plan to add this new API to this library? If so I'd just adopt the current embeddings options and offer the iOS 17 feature to capable devices later on. I'd help add it but don't understand how to generalize beyond using it as an input for SD. Thanks

I have a draft of this API that I'm hoping to finish up soon, FYI

aehlke commented

FWIW I'm also now waiting for USearch to add text similarity search around end of this month, which is usable from Swift as well as WASM/others. Then I plan to use it with NLContextualEmbedding on iOS/mac, or something else for web deployment via SwiftWASM.

I just pushed #22 as a PR, if you can check it out and let me know how it works for you that would be helpful!

Merged #22 into main which contains this new embedding class.