Rag.NET.Abstractions
1.0.0
dotnet add package Rag.NET.Abstractions --version 1.0.0
NuGet\Install-Package Rag.NET.Abstractions -Version 1.0.0
<PackageReference Include="Rag.NET.Abstractions" Version="1.0.0" />
<PackageVersion Include="Rag.NET.Abstractions" Version="1.0.0" />
<PackageReference Include="Rag.NET.Abstractions" />
paket add Rag.NET.Abstractions --version 1.0.0
#r "nuget: Rag.NET.Abstractions, 1.0.0"
#:package Rag.NET.Abstractions@1.0.0
#addin nuget:?package=Rag.NET.Abstractions&version=1.0.0
#tool nuget:?package=Rag.NET.Abstractions&version=1.0.0
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, MetadataValue>
{
["category"] = "hr",
["version"] = "2024-01",
},
};
Full guide
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.AI.Abstractions (>= 10.9.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- ZeroAlloc.Results (>= 1.2.0)
- ZeroAlloc.Specification (>= 1.1.0)
- ZeroAlloc.Validation (>= 1.5.6)
- ZeroAlloc.ValueObjects (>= 2.0.5)
NuGet packages (34)
Showing the top 5 NuGet packages that depend on Rag.NET.Abstractions:
| Package | Downloads |
|---|---|
|
Rag.NET.QueryTechniques
HyDE, multi-query expansion and contextual compression query techniques for Rag.NET |
|
|
Rag.NET
Modular RAG pipeline library for .NET — ingestion and retrieval pipeline builders, self-query, corrective RAG and conversation memory |
|
|
Thalos.NET.Memory.RagNet
Rag.NET pgvector adapter for Thalos.NET.Memory: IMemoryIndex over Rag.NET IVectorStore (PgVectorStore) and an IEmbeddingGenerator, with schema initialisation and dimension checks. |
|
|
Rag.NET.Chunking
Chunking strategies for Rag.NET: hierarchical-merge, code-aware, late, proposition, token-aware and embedding-based semantic chunking |
|
|
Rag.NET.Parsers.Office
Word, Excel and PowerPoint document parsers for Rag.NET |
GitHub repositories
This package is not used by any popular GitHub repositories.