Practical overview
When it fits
Use SVDB when a Swift app needs collection-based search over text whose embeddings are generated separately, with the vector database kept local to the app.
Who it is for
- Swift developers adding local semantic or nearest-match search to app content.
- App builders who want an on-device retrieval component and can supply their own embeddings.
Documented uses
- Add document text and its embedding to a named collection.
- Search stored content using an embedding generated for a query.
- Add a local vector retrieval component to a Swift app.
Requirements & limits
The repository is public and lists an MIT license. Installation instructions use Swift Package Manager.
- The app must provide document and query embeddings; SVDB's examples use NaturalLanguage or a separate OpenAI Swift package.
- The documented interface uses named collections and adds text with its embedding before searching.
- The repository includes a demo directory for a Swift example.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add a Swift Package Manager dependency
Include SVDB in a Swift project using Swift Package Manager.
Before you start
- A Swift project using Xcode or a Package.swift manifest.
- Xcode 11 is named in the repository instructions for the Xcode installation route.
Steps
Add https://github.com/Dripfarm/SVDB.git as a package dependency in Xcode, or
Add .package(url: "https://github.com/Dripfarm/SVDB.git", from: "1.0.0") to the dependencies in Package.swift.
Expected outcome
The project manifest or Xcode project includes SVDB as a package dependency.
Guide limitations
- The documented steps cover dependency setup, not building or running an app.
Store text and search a collection
Use SVDB's documented collection workflow to store text with an embedding and query for similar results.
Before you start
- SVDB included in a Swift project.
- An embedding vector for each document and a query vector, generated separately; the README shows NaturalLanguage and an OpenAI package as examples.
Steps
Obtain an embedding for the document text.
Create or retrieve a collection with SVDB.shared.collection("animals").
Add the document text and embedding with SVDB.shared.addDocument(text:embedding:).
Obtain an embedding for the search query and pass it to animalCollection.search(query:).
Expected outcome
The collection search returns results for the supplied query embedding.
Guide limitations
- The example leaves embedding generation to separate frameworks or packages.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- Dripfarm/SVDB · Official homepage title · retained in its source language

