![]() |
VOOZH | about |
dotnet add package Mostlylucid.LucidRAG.Storage.Core --version 2.7.5
NuGet\Install-Package Mostlylucid.LucidRAG.Storage.Core -Version 2.7.5
<PackageReference Include="Mostlylucid.LucidRAG.Storage.Core" Version="2.7.5" />
<PackageVersion Include="Mostlylucid.LucidRAG.Storage.Core" Version="2.7.5" />Directory.Packages.props
<PackageReference Include="Mostlylucid.LucidRAG.Storage.Core" />Project file
paket add Mostlylucid.LucidRAG.Storage.Core --version 2.7.5
#r "nuget: Mostlylucid.LucidRAG.Storage.Core, 2.7.5"
#:package Mostlylucid.LucidRAG.Storage.Core@2.7.5
#addin nuget:?package=Mostlylucid.LucidRAG.Storage.Core&version=2.7.5Install as a Cake Addin
#tool nuget:?package=Mostlylucid.LucidRAG.Storage.Core&version=2.7.5Install as a Cake Tool
NuGet: Mostlylucid.LucidRAG.Storage.Core
Unified vector storage library for LucidRAG with support for InMemory, DuckDB, and Qdrant backends.
This library provides a single, unified interface (IVectorStore) for embedding storage and retrieval across all
LucidRAG pipelines:
| Backend | Persistence | Use Case | Default Mode |
|---|---|---|---|
| InMemory | ❌ Ephemeral | Tool/MCP mode, one-shot analysis | MCP server, CLI tools |
| DuckDB | ✅ File-based | Standalone mode, development | Standalone apps |
| Qdrant | ✅ Server-based | Production, distributed systems | Production deployments |
dotnet add package Mostlylucid.LucidRAG.Storage.Core
For one-shot analysis where you don't need to persist embeddings:
services.AddVectorStoreForToolMode();
For standalone apps with embedded persistence:
services.AddVectorStoreForStandaloneMode(dataDirectory: "./data");
For production deployments with dedicated vector database:
services.AddVectorStoreForProductionMode(qdrantHost: "localhost", qdrantPort: 6334);
services.AddVectorStore(options =>
{
options.Backend = VectorStoreBackend.DuckDB;
options.PersistVectors = true;
options.ReuseExistingEmbeddings = true;
options.DuckDB.DatabasePath = "./vectors.duckdb";
options.DuckDB.EnableVSS = true;
options.DuckDB.VectorDimension = 384;
});
var vectorStore = serviceProvider.GetRequiredService<IVectorStore>();
var schema = new VectorStoreSchema
{
VectorDimension = 384,
DistanceMetric = VectorDistance.Cosine,
StoreText = true // false for privacy-preserving mode
};
await vectorStore.InitializeAsync("documents", schema);
var documents = new[]
{
new VectorDocument
{
Id = "doc1:segment0",
Embedding = new float[384], // your embedding vector
ParentId = "doc1",
ContentHash = ContentHasher.ComputeHash(text),
Text = text,
Metadata = new Dictionary<string, object>
{
["type"] = "text",
["language"] = "en",
["confidence"] = 0.95
}
}
};
await vectorStore.UpsertDocumentsAsync("documents", documents);
var query = new VectorSearchQuery
{
QueryEmbedding = queryVector,
TopK = 10,
MinScore = 0.7,
IncludeDocument = false, // privacy-preserving - only return IDs
Filters = new Dictionary<string, object>
{
["language"] = "en"
}
};
var results = await vectorStore.SearchAsync("documents", query);
foreach (var result in results)
{
Console.WriteLine($"{result.Id}: {result.Score:F3}");
Console.WriteLine($" Metadata: {string.Join(", ", result.Metadata)}");
}
// Get documents by content hash (for deduplication)
var hashes = new[] { "abc123", "def456" };
var cached = await vectorStore.GetDocumentsByHashAsync("documents", hashes);
if (cached.TryGetValue("abc123", out var doc))
{
Console.WriteLine("Reusing existing embedding!");
}
// Remove stale segments, keep new ones
var validHashes = new[] { "hash1", "hash2", "hash3" };
await vectorStore.RemoveStaleDocumentsAsync("documents", parentId: "doc1", validHashes);
IMultiVectorStore : IVectorStore (unified interface)
├── InMemoryVectorStore (ephemeral, fastest)
├── DuckDBVectorStore (persistent, embedded, HNSW indexes)
└── QdrantVectorStore (persistent, server-based, production)
Used by:
├── DocSummarizer.Core (text embeddings)
├── ImageSummarizer.Core (OCR + CLIP embeddings)
├── AudioSummarizer.Core (voice embeddings via EmbeddingStorageWave)
├── DataSummarizer.Core (data profile embeddings)
└── LucidRAG (all of the above)
{
"VectorStore": {
"Backend": "DuckDB",
"CollectionName": "documents",
"PersistVectors": true,
"ReuseExistingEmbeddings": true,
"DuckDB": {
"DatabasePath": "./data/vectors.duckdb",
"EnableVSS": true,
"EnablePersistence": true,
"VectorDimension": 384,
"HNSW": {
"M": 16,
"EfConstruction": 200,
"EfSearch": 100
}
},
"Qdrant": {
"Host": "localhost",
"Port": 6334,
"ApiKey": null,
"VectorSize": 384,
"UseHttps": false
},
"InMemory": {
"MaxDocuments": 0,
"Verbose": false
}
}
}
Pros:
Cons:
Best for: MCP tools, one-shot CLI analysis, unit tests
Pros:
Cons:
Best for: Standalone apps, development, embedded scenarios
Pros:
Cons:
Best for: Production, multi-tenant, high-scale
| Documents | HNSW (VSS) | Brute-Force | Speedup |
|---|---|---|---|
| 1,000 | 2ms | 15ms | 7.5× |
| 10,000 | 5ms | 150ms | 30× |
| 100,000 | 10ms | 1,500ms | 150× |
| Backend | 1,000 docs | 10,000 docs | Persistence |
|---|---|---|---|
| InMemory | ~5s | ~50s | ❌ |
| DuckDB | ~2s | ~5s | ✅ |
| Qdrant | ~1s | ~2s | ✅ |
Set StoreText = false in schema to avoid storing plaintext:
var schema = new VectorStoreSchema
{
VectorDimension = 384,
StoreText = false // Only store embeddings, not text
};
Search results will only return IDs and scores, not text content.
IMultiVectorStore extends IVectorStore with named vector support for multi-modal embeddings. All three backends (
InMemory, DuckDB, Qdrant) implement it.
public interface IMultiVectorStore : IVectorStore
{
Task InitializeMultiVectorAsync(
string collectionName,
VectorStoreSchema primarySchema,
IEnumerable<NamedVectorConfig> namedVectors,
CancellationToken ct = default);
Task UpsertMultiVectorDocumentsAsync(
string collectionName,
IEnumerable<MultiVectorDocument> documents,
CancellationToken ct = default);
Task<List<VectorSearchResult>> SearchByNamedVectorAsync(
string collectionName,
string vectorName,
VectorSearchQuery query,
CancellationToken ct = default);
}
var store = serviceProvider.GetRequiredService<IMultiVectorStore>();
// Initialize with primary + named vectors
await store.InitializeMultiVectorAsync("images", primarySchema, new[]
{
new NamedVectorConfig { Name = "visual", Dimension = 512 },
new NamedVectorConfig { Name = "color", Dimension = 128 },
});
// Upsert documents with named vectors
var doc = new MultiVectorDocument
{
Id = "img1", Embedding = primaryEmbedding,
NamedVectors = { ["visual"] = clipVector, ["color"] = colorVector }
};
await store.UpsertMultiVectorDocumentsAsync("images", [doc]);
// Search by named vector
var results = await store.SearchByNamedVectorAsync("images", "visual", query);
| Backend | Named Vector Strategy |
|---|---|
| InMemory | Stored in MultiVectorDocument.NamedVectors dictionary, cosine search in-memory |
| DuckDB | Side table {collection}_named_vectors with (document_id, vector_name) PK, cosine search in-memory |
| Qdrant | Native VectorParamsMap with per-vector HNSW indexes, native search via vectorName parameter |
Enables separate embeddings for:
IVectorStore interfaceVectorDocument, VectorSearchQuery, VectorSearchResult modelsDuckDBVectorStore from DataSummarizerIVectorStore methods implementedKey Features:
SET hnsw_enable_experimental_persistence = true[val1,val2,...]::FLOAT[dim]array_distance() or in-memory cosineInMemoryVectorStore from DocSummarizer.CoreQdrantVectorStore from DocSummarizer.CoreIMultiVectorStore for multi-modal pipelines (image, audio)InMemoryVectorStore Features:
MaxDocuments limitQdrantVectorStore Features:
MIT - Part of the LucidRAG project
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Mostlylucid.LucidRAG.Storage.Core:
| Package | Downloads |
|---|---|
|
Mostlylucid.LucidRAG.DocSummarizer
Local-first document summarization library using BERT embeddings, RAG, and optional LLM synthesis. Supports markdown, PDF, DOCX, and URLs. Every claim is grounded with citations. Runs entirely offline with ONNX models, or optionally uses Ollama/Docling for enhanced features. |
|
|
Mostlylucid.LucidRAG.AudioSummarizer
AudioSummarizer - Forensic audio characterization library with speech-to-text and speaker analysis |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.7.5 | 619 | 3/30/2026 |
| 2.7.4 | 507 | 3/30/2026 |
| 2.7.3 | 608 | 3/30/2026 |
| 2.7.2 | 257 | 3/30/2026 |
| 2.7.1 | 577 | 3/29/2026 |
| 2.7.0 | 524 | 3/29/2026 |
| 2.6.0 | 537 | 3/29/2026 |
| 2.5.0-alpha0 | 642 | 2/10/2026 |
| 2.1.0 | 579 | 2/9/2026 |
| 2.1.0-preview2 | 564 | 2/9/2026 |
| 2.0.1-rc2 | 122 | 2/9/2026 |
| 2.0.1-rc0 | 617 | 2/9/2026 |
| 2.0.0-rc5 | 223 | 2/9/2026 |
| 1.1.1 | 147 | 2/4/2026 |
| 1.0.0 | 136 | 2/4/2026 |
| 0.0.0-alpha.0.266 | 71 | 2/9/2026 |
| 0.0.0-alpha.0.265 | 73 | 2/9/2026 |
| 0.0.0-alpha.0.263 | 67 | 2/9/2026 |
| 0.0.0-alpha.0.262 | 70 | 2/8/2026 |
| 0.0.0-alpha.0.258 | 70 | 2/8/2026 |