A high-performance .NET library for in-process vector similarity search and text embedding. No external services, no Docker, no infrastructure — just NuGet packages that work.
| Package | Description |
|---|---|
| VectorSharp.Storage | In-memory and disk-backed vector storage with SIMD-optimized cosine similarity |
| VectorSharp.Embedding | Channel-based embedding service with configurable parallelism |
| VectorSharp.Embedding.NomicEmbed | Nomic Embed Text v1.5 model for local inference (768-dim, 8192 token context) |
| VectorSharp.Chunking | Streaming text chunker with predefined formats for Markdown and C# |
dotnet add package VectorSharp.Storage
dotnet add package VectorSharp.Embedding.NomicEmbedusing VectorSharp.Storage;
using VectorSharp.Embedding;
using VectorSharp.Embedding.NomicEmbed;
// Create an embedding service with local model inference
await using EmbeddingService embedder = new EmbeddingService(NomicEmbedProvider.Create);
// Create a vector store
CosineVectorStore<int> store = VectorStore.Create<int>("my-store", embedder.Dimension);
// Embed and store documents
float[] embedding = await embedder.EmbedAsync("some document text", EmbeddingPurpose.Document);
await store.AddAsync(1, embedding);
// Search with a query
float[] queryEmbedding = await embedder.EmbedAsync("find similar docs", EmbeddingPurpose.Query);
IReadOnlyList<SearchResult<int>> results = await store.FindMostSimilarAsync(queryEmbedding, count: 10);MIT