MarkdownVectorSearch.Loading 0.2.0

dotnet add package MarkdownVectorSearch.Loading --version 0.2.0
                    
NuGet\Install-Package MarkdownVectorSearch.Loading -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MarkdownVectorSearch.Loading" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MarkdownVectorSearch.Loading" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="MarkdownVectorSearch.Loading" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MarkdownVectorSearch.Loading --version 0.2.0
                    
#r "nuget: MarkdownVectorSearch.Loading, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MarkdownVectorSearch.Loading@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MarkdownVectorSearch.Loading&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=MarkdownVectorSearch.Loading&version=0.2.0
                    
Install as a Cake Tool

MarkdownVectorSearch.Loading

Local-first semantic search and RAG library for Markdown documentation. .NET 8, powered by Ollama. No cloud APIs, no API keys.

Features

  • Paragraph-aware chunking with configurable size and overlap (MarkdownLoader)
  • Ollama clients for embeddings (OllamaEmbeddingService) and chat (OllamaChatService, with streaming)
  • In-memory vector store with cosine-similarity vector search and BM25 keyword search (VectorStore)
  • SHA-256 keyed embedding cache with model tagging — survives renames / chunk reordering (EmbeddingCache)
  • RAG orchestrator with streaming answers and [N] source citations (QuestionAnswerer)

Install

dotnet add package MarkdownVectorSearch.Loading

Quick start

using MarkdownVectorSearch.Loading.Services;

// 1. Load + chunk a folder of .md files
var chunks = MarkdownLoader.LoadFolder(@"C:\docs", chunkSize: 1000, overlap: 150);

// 2. Embed via Ollama
using var embedder = new OllamaEmbeddingService("nomic-embed-text", "http://localhost:11434");
var store = new VectorStore();
foreach (var chunk in chunks)
    store.Add(new EmbeddedChunk { Chunk = chunk, Embedding = await embedder.EmbedAsync(chunk.Content) });

// 3. Search
var queryVec = await embedder.EmbedAsync("how do I configure X?");
var hits = store.Search(queryVec, topK: 5);
foreach (var h in hits) Console.WriteLine($"{h.Score:F2}  {h.Chunk.FileName}");

Persist embeddings

EmbeddingCache.Save(@"C:\docs\.embeddings.nomic-embed-text.json", "nomic-embed-text", embeddedChunks);
var rehydrated = EmbeddingCache.LoadVectorStore(@"C:\docs\.embeddings.nomic-embed-text.json", "nomic-embed-text");

RAG

using var qa = QuestionAnswerer.FromCacheFile(
    cachePath: @"C:\docs\.embeddings.nomic-embed-text.json",
    embedModel: "nomic-embed-text",
    chatModel: "llama3.2",
    ollamaUrl: "http://localhost:11434");

await foreach (var token in qa.AskStreamAsync("How do I configure X?", sources => { /* render sources */ }))
    Console.Write(token);

Project

Source, examples, indexer CLI, RAG REPL, and Web API: https://github.com/pankajdey198320/AI.EmbedingTool

License

MIT © 2026 Pankaj Dey. Public use must credit the original author and link back to the source repository.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 47 5/29/2026