Top AI Repos โ open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
๐ SimilaritySearchKit is a Swift package providing on-device text embeddings and semantic search functionality for iOS and macOS applications.
| Date | Stars |
|---|---|
| 2026-07-24 | 533 |
| 2026-07-25 | 532 |
| 2026-07-28 | 532 |
| 2026-07-30 | 532 |
| 2026-07-31 | 530 |
| 2026-08-06 | 530 |
Today
โ stars today
This week
-2 stars this week
This month
โ stars this month
Momentum
0.0
growth rate 0.00%/day
# SimilaritySearchKit
[](https://github.com/ZachNagengast/similarity-search-kit/actions/workflows/swift.yml)
[](https://swiftpackageindex.com/ZachNagengast/similarity-search-kit)
[](https://swiftpackageindex.com/ZachNagengast/similarity-search-kit)
[](#examples)


**SimilaritySearchKit** is a Swift package enabling *on-device* text embeddings and semantic search functionality for iOS and macOS applications in just a few lines. Emphasizing speed, extensibility, and privacy, it supports a variety of built-in state-of-the-art NLP models and similarity metrics, in addition to seamless integration for bring-your-own options.
[](https://youtu.be/yYfQX4QdNJI)
## Use Cases
Some potential use cases for **SimilaritySearchKit** include:
- **Privacy-focused document search engines:** Create a search engine that processes sensitive documents locally, without exposing user data to external services. (See example project "ChatWithFilesExample" in the [Examples](#examples) directory.)
- **Offline question-answering systems:** Implement a question-answering system that finds the most relevant answers to a user's query within a local dataset.
- **Document clustering and recommendation engines:** Automatically group and organize documents based on their textual content on the edge.
By leveraging **SimilaritySearchKit**, developers can easily create powerful applications that keep data close to home without major tradeoffs in functionality or performance.
## Installation
To install **SimilaritySearchKit**, simply add it as a dependency to your Swift project using the Swift Package Manager. I recommend using the Xcode method personally via:
`File` โ `Add Packages...` โ `Search or Enter Package Url` โ `https://github.com/ZachNagengast/similarity-search-kit.git`
Xcode should give you the following options to choose which model you'd like to add (see [available models](#available-models) below for help choosing):

If you want to add it via `Package.swift`, add the following line to your dependencies array:
```swift
.package(url: "https://github.com/ZachNagengast/similarity-search-kit.git", from: "0.0.1")
```
Then, add the appropriate target dependency to the desired target:
```swift
.target(name: "YourTarget", dependencies: [
"SimilaritySearchKit",
"SimilaritySearchKitDistilbert",
"SimilaritySearchKitMiniLMMultiQA",
"SimilaritySearchKitMiniLMAll"
])
```
If you only want to use a subset of the available models, you can omit the corresponding dependency. This will reduce the size of your final binary.
## Usage
To use SimilaritySearchKit in your project, first import the framework:
```swift
import SimilaritySearchKit
```
Next, create an instance of SimilarityIndex with your desired distance metric and [embedding model](#available-models) (see below for options):
```swift
let similarityIndex = await SimilarityIndex(
model: NativeEmbeddings(),
metric: CosineSimilarity()
)
```
Then, add your text that you want to make searchable to the index:
```swift
await simiExcerpt of 10,737 characters
Read on GitHubZach Nagengast ยท @argmaxinc ยท United States
26
2
2
1
1
1
1
1
1
1
Would you bet a product on this? Bounded 0โ100 and slow moving.
matched fp:6866654e3fe1140a, topic:semantic-search, name:similarity search, readme:similarity search
matched fp:6866654e3fe1140a, topic:text-embeddings, readme:embedding model, desc:text embeddings
matched fp:6866654e3fe1140a, topic:nlp
matched fp:6866654e3fe1140a, topic:question-answering