Nullean.Snapshots.Relevance 0.21.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Nullean.Snapshots.Relevance --version 0.21.0
                    
NuGet\Install-Package Nullean.Snapshots.Relevance -Version 0.21.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="Nullean.Snapshots.Relevance" Version="0.21.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nullean.Snapshots.Relevance" Version="0.21.0" />
                    
Directory.Packages.props
<PackageReference Include="Nullean.Snapshots.Relevance" />
                    
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 Nullean.Snapshots.Relevance --version 0.21.0
                    
#r "nuget: Nullean.Snapshots.Relevance, 0.21.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 Nullean.Snapshots.Relevance@0.21.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=Nullean.Snapshots.Relevance&version=0.21.0
                    
Install as a Cake Addin
#tool nuget:?package=Nullean.Snapshots.Relevance&version=0.21.0
                    
Install as a Cake Tool

Nullean.Snapshots.Relevance

snapshots.

Search-relevance snapshots for Nullean.Snapshots, on judy: run a judgement set against your search code, fail on a gate, and keep the scorecard and the rank of each query's first relevant result as a snapshot. A difference that is only noise passes. A real regression fails.

NuGet

Install

dotnet add package Nullean.Snapshots.Relevance

Quick start

using AwesomeAssertions;
using Nullean.Judy.Running;
using Nullean.Snapshots.Relevance;
using Nullean.Snapshots.TUnit;                         // [RelevanceFiles]

public class SearchRelevanceTests
{
	[Test]
	[RelevanceFiles]                                    // one case per relevance/*.judgements.yaml
	public async Task Holds(SnapshotFile file)
	{
		var target = new DelegateTarget("app", async (request, ct) =>
		{
			var ids = await MySearch.FindAsync(request.Query, request.Size, ct);   // your code
			return new SearchOutcome([.. ids.Select(id => new Hit(id, null, null, null))], null);
		});

		var report = await RelevanceRun.RunAsync(file.Path, target);

		report.Should().PassItsGates();                 // the gates in the judgement set
		report.Should().MatchRelevanceSnapshot();       // .snapshots/relevance/{set}.{target}.verified.yml
	}
}

A judgement set says which pages answer each query, and which numbers must hold (gates:). See the judy docs.

The snapshot is compared as a tree by query: $.results["salon chair"].first: 2 → 5. When it differs, the format decides:

  • Noise passes. The assertion passes, the received file is written, and a note prints the move (ndcg@10 0.712 → 0.698 (-0.014): 3 better, 5 worse, p = 0.31). snap review accepts it.
  • A real regression fails. The drop in the main metric is significant in judy's paired randomization test (p < 0.05).
  • A change to the set always fails. Queries added or removed, or a failed search, must be accepted on purpose.

Documentation: https://snapshots.nullean.net/formats/relevance/

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.  net11.0 is compatible. 
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.24.1 0 12/3/2026
0.24.0 0 12/3/2026
0.23.0 0 12/3/2026
0.22.0 0 12/3/2026
0.21.0 0 12/3/2026