Rag.NET.Abstractions 0.1.0

dotnet add package Rag.NET.Abstractions --version 0.1.0
                    
NuGet\Install-Package Rag.NET.Abstractions -Version 0.1.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="Rag.NET.Abstractions" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rag.NET.Abstractions" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Rag.NET.Abstractions" />
                    
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 Rag.NET.Abstractions --version 0.1.0
                    
#r "nuget: Rag.NET.Abstractions, 0.1.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 Rag.NET.Abstractions@0.1.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=Rag.NET.Abstractions&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Rag.NET.Abstractions&version=0.1.0
                    
Install as a Cake Tool

Rag.NET.Abstractions

The contract layer of Rag.NET: the IRagPipeline, IVectorStore, IDocumentParser and IChunkingStrategy interfaces plus the shared models (DocumentMetadata, TextChunk, SearchResult, RagError) that every other Rag.NET package builds against.

Install

dotnet add package Rag.NET.Abstractions

Reference this package directly when you implement your own parser, chunking strategy, vector store or reranker in a library that should not drag in the full pipeline — the Rag.NET core package already includes it transitively.

Setup

There is nothing to register: this package only declares the shapes. A custom parser, for example, is one interface away:

using Rag.NET.Abstractions;

public sealed class CsvDocumentParser : IDocumentParser
{
    public bool CanParse(string contentType) => contentType == "text/csv";

    // ParseAsync turns the stream into the plain text the chunking stage consumes.
}

Example

The models carry a document through the pipeline. DocumentMetadata identifies the document, and its Tags travel to the vector store for metadata filtering later:

using Rag.NET.Models;

var metadata = new DocumentMetadata
{
    DocumentId  = new DocumentId("policy-hr-001"),
    FileName    = "hr-policy.docx",
    ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
    Tags = new Dictionary<string, string>
    {
        ["category"] = "hr",
        ["version"]  = "2024-01",
    },
};

Full guide

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (32)

Showing the top 5 NuGet packages that depend on Rag.NET.Abstractions:

Package Downloads
Rag.NET

Modular RAG pipeline library for .NET — ingestion and retrieval pipeline builders, self-query, corrective RAG and conversation memory

Rag.NET.QueryTechniques

HyDE, multi-query expansion and contextual compression query techniques for Rag.NET

Rag.NET.VectorStores.AzureAISearch

Azure AI Search vector store for Rag.NET

Rag.NET.Parsers.Email

EML/MSG email parser for Rag.NET

Rag.NET.Parsers.Html

HTML document parser for Rag.NET

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 478 8/11/2026