Cider.NET 0.1.52

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

Cider.NET

Low-level System One decision model library (Choice, Score, Noul) for .NET, written in G#.

Cider.NET evaluates structured or unstructured application state against bounded, typed questions in a single prefill forward pass, reading next-token logits over permitted option labels to return calibrated probability distributions and confidence scores without autoregressive text generation.

Installation

dotnet add package Cider.NET

For in-process GGUF weight loading (libllama Metal/CPU P/Invoke and pure-G# selective LM-head projection), also install Cider.Native.

Quick Start (G#)

package Demo

import Cider
import System

let backend = OllamaRawBackend("http://127.0.0.1:11434")
let client = DecisionClient(backend, "qwen3:0.6b")

let req = DecisionRequest.Create(
    "qwen3:0.6b",
    "Customer says: I was charged twice on my invoice and need an immediate refund.",
    NamedQuestion("team", Question.Choice(
        "Which team should handle this ticket?",
        ChoiceOption("billing", "Invoices, charges, and refunds"),
        ChoiceOption("technical", "Product bugs and outages")
    )),
    NamedQuestion("urgency", Question.Score(
        "How urgent is this request?",
        "Routine", "Time-sensitive", "Critical"
    )),
    NamedQuestion("refund", Question.Noul("Is the customer explicitly requesting a refund?"))
)

let resp = client.Decide(req)
Console.WriteLine("Team: ${resp.GetAnswer("team")?.SelectedChoice}")
Console.WriteLine("Urgency: ${resp.GetAnswer("urgency")?.ScoreValue}")
Console.WriteLine("Refund P(yes): ${resp.GetAnswer("refund")?.NoulValue}")

Features

  • Three Decision Primitives: Choice (up to 255 options), Score (up to 50 ordered rubric levels), and Noul (calibrated binary probability in [0, 1]).
  • Pluggable Prompt Policies & Model-Family Layouts: PromptStructureV1 (Simple-Jev v1), StateFirstV1 (state-first V1 layout for cross-request KV/prefix reuse across different questions), Tev1 (Together AI Tev1), and Decider (Mapika/decider), paired with PromptLayout / PromptLayoutRegistry supporting chatml (Qwen, default), llama3 (Llama 3 / 3.1 / 3.2), gemma (Gemma 2 / 3), phi3 (Phi-3 / 3.5), mistral (Mistral Instruct), custom layouts, GGUF metadata auto-detection (DetectFromGgufMetadata), and per-layout control-token sanitization.
  • Strict Readout-Boundary Label Validation: Validates via LabelTokenValidator and DecisionClient.ValidateLabels(request) that every candidate label encodes to a single, pairwise-distinct vocabulary token at the active assistant prefill boundary without splitting or merging, throwing typed InvalidLabelTokenException (HTTP 422) on mismatch.
  • Position-Bias Cancellation: Permutations = 2 evaluates forward and reversed option orders and averages probabilities.
  • Anti-Injection State Fencing & Label-Mass Guard: Random 64-bit hex <state-{nonce}> boundary tags and MinLabelMass enforcement.
  • Calibration Math & Packaged Calibration Workflow: Jev 1.13 ChoiceConfidence & ScoreConfidence, EntropyConfidence, ExpectedCalibrationError (ECE), BrierScore, NegativeLogLikelihood, FitTemperature, FitPlattScaling, and EstimateLabelPriorBias, packaged into CalibrationWorkflow.Fit / FitAsync (CalibrationExample, CalibrationFitOptions, suggested confidence threshold for target selective accuracy) and a NativeAOT-safe versioned JSON format (CalibrationProfile, schema v1) keyed by IModelIdentityProvider SHA-256 model_hash, prompt_layout, prompt_policy, and per-question_id entries loaded fail-closed onto DecisionClient (LoadCalibration / SetCalibration, throwing CalibrationMismatchException on model hash, layout, policy, or question-shape mismatch).
  • Cancellation & Deadlines: DecideAsync(..., ct), per-request DecisionOptions.Timeout / Deadline, and non-throwing TryDecideAsync / TryDecideOutcome returning DecisionOutcome (Succeeded, Cancelled, DeadlineExceeded, NoAnswer, StateTooLarge, Failed).
  • State Token Budgeting & Truncation: CountPromptTokens(request) for exact pre-flight token accounting, opt-in StateTruncationPolicy (Reject [default], KeepHeadAndTail, KeepHead, KeepTail) that truncates only inside the cryptographic state fence, typed StateTooLargeException, and DecisionResponse.StateBudget reporting StateTokensUsed and StateTokensDropped.
  • Stateless Embeddings Contract & Vector Math: IEmbeddingBackend (Embed / EmbedAsync), EmbeddingPooling (Auto, Mean, Last, Cls), EmbeddingOptions (Normalize, TruncateToContext, opt-in MaxSequencesPerBatch for native multi-sequence evaluation), EmbeddingProvenance (model ID, SHA-256 ModelHash, resolved pooling, normalization flag, dimensions), EmbeddingBatchResult (with ordered per-row RowTokens original/effective counts and truncation flags, and NativeEvaluations; see ADR-0019), and EmbeddingMath (CosineSimilarity, L2Normalize, L2Norm), also implemented on DeterministicLogitBackend for fast CI-safe testing.
  • Explicit-Configuration Mode & Logging Hook: Set ExplicitConfiguration = true on DecisionClient, SystemOneHttpBackend (SystemOneHttpBackendOptions), and OllamaRawBackend to disable default remote/local URLs and default model jev-latest; attach a zero-dependency ICiderLogger (DelegateCiderLogger) to capture structured (CiderLogLevel, category, message) diagnostics without writing to stderr.
  • NativeAOT & Trimming Compatible: Marked <IsAotCompatible>true</IsAotCompatible> with zero reflection-based JSON serialization and zero IL2xxx/IL3xxx warnings under PublishAot=true, verified in CI for JIT/NativeAOT output parity on Linux, Windows, and macOS.

License

MIT — see LICENSE.

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.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Cider.NET:

Package Downloads
Cider.Native

In-process GGUF v3 weight loader, byte-level BPE tokenizer, K-row selective LM-head projection engine, and libllama Metal/CPU P/Invoke backend for Cider.NET.

Hyperplane.Cider

Optional reader adapter for Hyperplane.NET: CiderEmbedder turns any Cider.NET IEmbeddingBackend (including Cider.Native's in-process llama.cpp LlamaEmbedder over GGUF models) into a Hyperplane IEmbedder with an honest, provenance-derived experimental profile.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.52 0 12/4/2026
0.1.51 0 12/4/2026
0.1.35 126 11/29/2026
0.1.34 228 11/28/2026
0.1.33 315 11/25/2026
0.1.13 116 11/18/2026
0.1.11 144 11/16/2026
0.1.9 139 11/16/2026
0.1.8 145 11/16/2026
0.1.5 162 11/14/2026
0.1.2 156 11/13/2026