Rag.NET.GraphRag 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rag.NET.GraphRag --version 0.1.0
                    
NuGet\Install-Package Rag.NET.GraphRag -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.GraphRag" 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.GraphRag" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Rag.NET.GraphRag" />
                    
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.GraphRag --version 0.1.0
                    
#r "nuget: Rag.NET.GraphRag, 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.GraphRag@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.GraphRag&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Rag.NET.GraphRag&version=0.1.0
                    
Install as a Cake Tool

Rag.NET.GraphRag

GraphRAG for Rag.NET: an LLM extracts entities and relationships during ingestion, Leiden community detection organises them (via Rag.NET.Graph), and retrieval answers entity questions with local graph search or corpus-wide questions with community-report map-reduce.

Install

dotnet add package Rag.NET.GraphRag

Setup

GraphRAG adds behaviors to both pipelines:

using Rag.NET.DependencyInjection;
using Rag.NET.GraphRag;
using Rag.NET.Ingestion.Behaviors;
using Rag.NET.Retrieval.Behaviors;

services.AddRagNet(
    configure: rag => rag.UseGraphRag(
        options => options.GleaningPasses = 1,
        retrieval: options => options.PageRankWeight = 0.3,
        graph: store => store.UseSqlite("graphrag.db")),
    ingestion: p => p
        .Add<GraphEntityExtractionBehavior>(after: typeof(EmbeddingBehavior))
        .Add<CommunityDetectionBehavior>(after: typeof(GraphEntityExtractionBehavior)),
    retrieval: p => p
        .Add<GraphLocalSearchBehavior>(before: typeof(RerankingBehavior)));

Example

Constrain extraction and route cheap models to the high-volume LLM work:

rag.UseGraphRag(options =>
{
    options.GleaningPasses             = 1;                        // follow-up extraction passes
    options.EntityTypes                = ["Person", "Organization"]; // null = open set
    options.MaxEntityDescriptionLength = 500;                      // summarisation threshold
});

Which search runs is decided by the behaviors you add to the retrieval pipeline: GraphLocalSearchBehavior for entity questions, GraphGlobalSearchBehavior for "what are the main themes?" questions over community reports. UseMindMapExtraction adds hierarchical mind-map nodes instead of flat entities.

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

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
1.0.0 94 9/15/2026
0.1.0 112 8/11/2026