<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Senthil V</title>
    <description>The latest articles on DEV Community by Senthil V (@mrrazor22).</description>
    <link>https://dev.to/mrrazor22</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3549688%2Fefc3f94a-e088-4ff2-8084-4327d98533c5.jpg</url>
      <title>DEV Community: Senthil V</title>
      <link>https://dev.to/mrrazor22</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrrazor22"/>
    <language>en</language>
    <item>
      <title>I built RAGSharp: a lightweight RAG library for .NET</title>
      <dc:creator>Senthil V</dc:creator>
      <pubDate>Mon, 06 Oct 2025 18:55:05 +0000</pubDate>
      <link>https://dev.to/mrrazor22/i-built-ragsharp-a-lightweight-rag-library-for-net-3f69</link>
      <guid>https://dev.to/mrrazor22/i-built-ragsharp-a-lightweight-rag-library-for-net-3f69</guid>
      <description>&lt;p&gt;I’ve been exploring Retrieval-Augmented Generation (RAG) in .NET and noticed that most approaches I tried either came bundled with more features than I needed or required setting up external services like vector databases or cloud APIs.&lt;/p&gt;

&lt;p&gt;So I built RAGSharp - a small C# library that focuses on the basics:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;load → chunk → embed → search&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;What it includes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Document loading (files, directories, web, Wikipedia; custom loaders supported)&lt;/li&gt;
&lt;li&gt;Token-aware text chunking (SharpToken for GPT-style tokenization)&lt;/li&gt;
&lt;li&gt;Embeddings (works with OpenAI-compatible endpoints, so LM Studio, Ollama, vLLM, or custom providers)&lt;/li&gt;
&lt;li&gt;Vector stores (in-memory/file-backed, no DB required; extensible to Postgres/Qdrant)&lt;/li&gt;
&lt;li&gt;A simple retriever to tie it all together&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Quick example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var docs = await new FileLoader().LoadAsync("sample.txt");

var retriever = new RagRetriever(
    new OpenAIEmbeddingClient("http://localhost:1234/v1", "lmstudio", "bge-large"),
    new InMemoryVectorStore()
);

await retriever.AddDocumentsAsync(docs);
var results = await retriever.Search("quantum mechanics", topK: 3);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Links: &lt;a href="https://www.nuget.org/packages/RAGSharp" rel="noopener noreferrer"&gt;Nuget&lt;/a&gt; | &lt;a href="https://github.com/mrrazor22/ragsharp" rel="noopener noreferrer"&gt;Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re experimenting with RAG in .NET, I’d love to hear your feedback or ideas for making it more useful in real projects.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>machinelearning</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
