Table of Contents

Class AiModelResultOptions<T, TInput, TOutput>

Namespace
AiDotNet.Models.Options
Assembly
AiDotNet.dll

Represents the configuration options for creating a AiModelResult.

public class AiModelResultOptions<T, TInput, TOutput>

Type Parameters

T

The numeric type used for calculations, typically float or double.

TInput

The type of input data (e.g., Matrix<T>, Vector<T>).

TOutput

The type of output predictions (e.g., Vector<T>).

Inheritance
AiModelResultOptions<T, TInput, TOutput>
Inherited Members

Remarks

This class consolidates all the configuration parameters needed to construct a AiModelResult into a single, organized object. Instead of passing 20+ parameters to constructors, this options class groups related settings together for better readability and maintainability.

The options are organized into logical categories:

  • Core Model: The trained model and its optimization/normalization data
  • Ethical AI: Bias detection and fairness evaluation components
  • RAG: Retrieval-Augmented Generation components for document retrieval
  • Graph RAG: Knowledge graph components for enhanced retrieval
  • Prompt Engineering: Templates, chains, optimizers, and analysis tools
  • Fine-tuning: LoRA and meta-learning configurations
  • Agent & Reasoning: AI agent and advanced reasoning configurations
  • Deployment: Export, caching, versioning, and telemetry settings
  • Inference: JIT compilation and optimization configurations
  • Tokenization: Text tokenizer and configuration

For Beginners: This class is like a settings container for creating a trained model.

Instead of writing code like this (hard to read):

var result = new AiModelResult(opt, norm, bias, fair, ret, rerank, gen, ...20 more);

You can write this (easy to read):

var options = new AiModelResultOptions<double, Matrix, Vector>
{
    OptimizationResult = opt,
    NormalizationInfo = norm,
    BiasDetector = bias,
    PromptTemplate = myTemplate,
    // ... only set what you need
};
var result = new AiModelResult(options);

Benefits:

  • You only set the options you need (everything else has sensible defaults)
  • Named properties make it clear what each setting does
  • Easy to see all available settings via IntelliSense
  • Adding new options doesn't break existing code

Properties

AgentConfig

Gets or sets the agent configuration for AI assistance during inference.

public AgentConfiguration<T>? AgentConfig { get; set; }

Property Value

AgentConfiguration<T>

Remarks

Contains API keys, model settings, and other configuration needed to use AI agents for assistance during model building or inference.

For Beginners: This stores settings for using AI assistants (like GPT-4) to help with model decisions. The API key is stored here securely.

AgentRecommendation

Gets or sets the agent's recommendations from model building.

public AgentRecommendation<T, TInput, TOutput>? AgentRecommendation { get; set; }

Property Value

AgentRecommendation<T, TInput, TOutput>

Remarks

Contains recommendations made by AI agents during model selection and tuning, including suggested model types, hyperparameters, and reasoning.

For Beginners: If an AI helped choose your model type and settings, this stores what it recommended and why.

AugmentationConfig

Gets or sets the unified augmentation configuration.

public AugmentationConfig? AugmentationConfig { get; set; }

Property Value

AugmentationConfig

Remarks

This configuration covers both training-time augmentation and Test-Time Augmentation (TTA) for improved inference accuracy. It includes: - Core settings (enabled, probability, seed) - TTA settings (enabled by default, aggregation method) - Modality-specific settings (image, tabular, audio, text, video)

For Beginners: Augmentation creates variations of your data: - During training: Helps the model learn to recognize objects regardless of orientation, lighting, etc. - During inference (TTA): Makes predictions on multiple variations and combines them for better accuracy.

Example use cases:

  • Image classification: Train on flipped, rotated versions; predict on multiple views
  • Tabular data: Add noise, apply MixUp for regularization
  • Audio: Apply time stretch, pitch shift for robustness

AutoMLSummary

Gets or sets an optional AutoML run summary for this trained model.

public AutoMLRunSummary? AutoMLSummary { get; set; }

Property Value

AutoMLRunSummary

Remarks

This is intended for facade outputs and should not contain hyperparameter values, weights, or other sensitive implementation details. If AutoML was not used, this can be null.

For Beginners: If you used AutoML, this stores a short history of the AutoML search (how many trials ran and what the scores looked like), without exposing internal tuning details.

BenchmarkReport

Gets or sets the most recent benchmark report produced during model build/evaluation.

public BenchmarkReport? BenchmarkReport { get; set; }

Property Value

BenchmarkReport

Remarks

This is populated when the user enables benchmarking through the facade (for example, AiModelBuilder.ConfigureBenchmarking(...)) and a benchmark report is generated.

For Beginners: This is the "report card" produced when you run benchmark suites like GSM8K or MMLU. It contains summary metrics and timing.

BiasDetector

Gets or sets the bias detector for identifying potential biases in model predictions.

public IBiasDetector<T>? BiasDetector { get; set; }

Property Value

IBiasDetector<T>

Remarks

When set, enables bias detection capabilities on the resulting model. Use this to check if your model treats different demographic groups fairly.

For Beginners: This helps you check if your model is unfair to certain groups. For example, it can detect if a loan approval model treats men and women differently.

CheckpointManager

Gets or sets the checkpoint manager for model persistence operations.

public ICheckpointManager<T, TInput, TOutput>? CheckpointManager { get; set; }

Property Value

ICheckpointManager<T, TInput, TOutput>

Remarks

Provides access to checkpoint operations including saving updated models, listing available checkpoints, and managing checkpoint lifecycle.

For Beginners: This manages saved copies of your model. You can use it to: - Save the model after making changes (like fine-tuning) - List all saved checkpoints - Load different versions of your model - Clean up old checkpoints to save disk space

CheckpointPath

Gets or sets the checkpoint path where the model was saved during training.

public string? CheckpointPath { get; set; }

Property Value

string

Remarks

When checkpoint management is configured, this contains the path to the best or latest checkpoint, enabling training resumption or model loading.

For Beginners: This is where your model was saved during training. If training is interrupted, you can resume from this checkpoint.

CrossValidationResult

Gets or sets the results from cross-validation.

public CrossValidationResult<T, TInput, TOutput>? CrossValidationResult { get; set; }

Property Value

CrossValidationResult<T, TInput, TOutput>

Remarks

Contains fold-by-fold performance metrics and aggregated statistics from cross-validation, helping assess model consistency and generalization.

For Beginners: Cross-validation tests your model multiple times on different parts of the data. This stores all those test results so you can see how consistently your model performs.

DataVersionHash

Gets or sets the data version hash for the training data.

public string? DataVersionHash { get; set; }

Property Value

string

Remarks

When data version control is configured, this contains a hash that uniquely identifies the training data used, enabling reproducibility.

For Beginners: This is a fingerprint of your training data. It ensures you can always know exactly what data was used to train this model.

DeploymentConfiguration

Gets or sets the deployment configuration for model export and production use.

public DeploymentConfiguration? DeploymentConfiguration { get; set; }

Property Value

DeploymentConfiguration

Remarks

Aggregates all deployment-related settings including quantization, caching, versioning, A/B testing, telemetry, and export configurations.

For Beginners: This contains all the settings for using your model in production: - Quantization: Make the model smaller/faster - Caching: Remember previous predictions - Versioning: Track different model versions - A/B Testing: Compare model versions - Telemetry: Monitor performance

ExperimentId

Gets or sets the experiment ID that this run belongs to.

public string? ExperimentId { get; set; }

Property Value

string

Remarks

The experiment ID groups related training runs together for organization and comparison purposes.

For Beginners: This groups training runs together. For example, all runs testing different learning rates might belong to the same experiment.

ExperimentRun

Gets or sets the experiment run associated with this model.

public IExperimentRun<T>? ExperimentRun { get; set; }

Property Value

IExperimentRun<T>

Remarks

When experiment tracking was used during training, this provides direct access to the run object for logging additional metrics, artifacts, or notes post-training.

For Beginners: This is the training session record. You can use it to: - Log additional metrics after training completes - Add notes about model performance in production - Record artifacts like deployment logs

ExperimentRunId

Gets or sets the experiment run ID from experiment tracking.

public string? ExperimentRunId { get; set; }

Property Value

string

Remarks

When experiment tracking is configured, this contains the unique identifier for the training run, enabling reproducibility and comparison with other runs.

For Beginners: This is a unique ID for your training session. You can use it to find and compare this training run with others later.

ExperimentTracker

Gets or sets the experiment tracker used during training.

public IExperimentTracker<T>? ExperimentTracker { get; set; }

Property Value

IExperimentTracker<T>

Remarks

Provides access to the experiment tracking system for retrieving other runs, creating comparison reports, or starting new related experiments.

For Beginners: This gives you access to the experiment tracking system. You can use it to: - Compare this model with other training runs - Find the best-performing model from an experiment - Start new training runs based on this one

FairnessEvaluator

Gets or sets the fairness evaluator for computing fairness metrics.

public IFairnessEvaluator<T>? FairnessEvaluator { get; set; }

Property Value

IFairnessEvaluator<T>

Remarks

When set, enables fairness evaluation capabilities including demographic parity, equalized odds, and other fairness metrics.

For Beginners: This calculates specific numbers that tell you how fair your model is. Higher fairness scores mean your model treats different groups more equally.

FewShotExampleSelector

Gets or sets the few-shot example selector for choosing examples to include in prompts.

public IFewShotExampleSelector<T>? FewShotExampleSelector { get; set; }

Property Value

IFewShotExampleSelector<T>

Remarks

A few-shot example selector chooses the most relevant examples to include in prompts based on the current query. Strategies include random, fixed, semantic similarity, diversity-based, and clustering-based selection.

For Beginners: When you want to show the AI examples of what you want, this picks the best examples to show based on your current question.

For example, if you're translating a technical document, it picks technical examples rather than casual conversation examples.

GraphStore

Gets or sets the graph store backend for persistent graph storage.

public IGraphStore<T>? GraphStore { get; set; }

Property Value

IGraphStore<T>

Remarks

Provides the underlying storage mechanism for the knowledge graph, supporting persistence, transactions, and efficient graph traversal.

For Beginners: This is the database that stores your knowledge graph. It keeps the graph saved even when your program restarts.

HybridGraphRetriever

Gets or sets the hybrid retriever combining vector search with graph traversal.

public HybridGraphRetriever<T>? HybridGraphRetriever { get; set; }

Property Value

HybridGraphRetriever<T>

Remarks

Combines traditional vector similarity search with knowledge graph traversal, providing richer context by following entity relationships.

For Beginners: This combines regular search with following connections in the knowledge graph. It finds documents that are similar AND documents about related topics.

HyperparameterOptimizationResult

Gets or sets the hyperparameter optimization result.

public HyperparameterOptimizationResult<T>? HyperparameterOptimizationResult { get; set; }

Property Value

HyperparameterOptimizationResult<T>

Remarks

When hyperparameter optimization was used, this contains the complete results including all tried configurations and their scores.

For Beginners: If an optimizer searched for the best settings, this contains all the configurations it tried and how well each performed. You can use it to: - See which hyperparameters were most important - Find patterns in what made training successful - Continue optimization from where it left off

HyperparameterTrialId

Gets or sets the hyperparameter optimization trial ID.

public int? HyperparameterTrialId { get; set; }

Property Value

int?

Remarks

When hyperparameter optimization is used, this identifies which trial produced this model, linking back to the optimization history.

For Beginners: If an optimizer searched for the best settings, this tells you which attempt (trial) produced this model.

Hyperparameters

Gets or sets the hyperparameters used for training.

public Dictionary<string, object>? Hyperparameters { get; set; }

Property Value

Dictionary<string, object>

Remarks

A dictionary of hyperparameter names to values that were used during training, enabling reproducibility and comparison between runs.

For Beginners: These are the settings (like learning rate, batch size) that were used to train your model. Saving them lets you reproduce the training.

InferenceOptimizationConfig

Gets or sets the inference optimization configuration.

public InferenceOptimizationConfig? InferenceOptimizationConfig { get; set; }

Property Value

InferenceOptimizationConfig

Remarks

Contains settings for runtime inference optimizations including batch processing, memory management, and computational optimizations.

For Beginners: This controls how predictions are made at runtime. You can tune settings like batch size and memory usage for your specific hardware.

JitCompiledFunction

Gets or sets the JIT-compiled prediction function for accelerated inference.

public Func<Tensor<T>[], Tensor<T>[]>? JitCompiledFunction { get; set; }

Property Value

Func<Tensor<T>[], Tensor<T>[]>

Remarks

When JIT compilation is enabled and the model supports it, this contains a pre-compiled, optimized version of the prediction function for faster inference.

For Beginners: This is a speed-optimized version of your model's prediction code. When available, it can make predictions 5-10x faster than the normal code path.

KnowledgeGraph

Gets or sets the knowledge graph for entity-relationship-based retrieval.

public KnowledgeGraph<T>? KnowledgeGraph { get; set; }

Property Value

KnowledgeGraph<T>

Remarks

The knowledge graph stores entities (people, places, concepts) and their relationships, enabling retrieval that follows semantic connections beyond simple text similarity.

For Beginners: This is like a web of connected facts. When you ask a question, it can follow connections like "Einstein worked at Princeton" to find related information.

LoRAConfiguration

Gets or sets the LoRA configuration for parameter-efficient fine-tuning.

public ILoRAConfiguration<T>? LoRAConfiguration { get; set; }

Property Value

ILoRAConfiguration<T>

Remarks

LoRA (Low-Rank Adaptation) enables efficient fine-tuning by adding small adapter layers instead of modifying all model parameters. This makes adaptation faster and requires less memory.

For Beginners: This allows you to customize the model for your specific use without retraining the whole thing. It's much faster and cheaper than full fine-tuning.

MemoryConfig

Gets or sets the memory management configuration for training.

public TrainingMemoryConfig? MemoryConfig { get; set; }

Property Value

TrainingMemoryConfig

Remarks

Memory management includes gradient checkpointing, activation pooling, and model sharding to enable training of larger models.

For Beginners: This configuration helps you train larger models by optimizing how memory is used during training. It can reduce memory usage by 40-50% at the cost of ~30% extra compute time.

MetaLearner

Gets or sets the meta-learner for few-shot adaptation capabilities.

public IMetaLearner<T, TInput, TOutput>? MetaLearner { get; set; }

Property Value

IMetaLearner<T, TInput, TOutput>

Remarks

If the model was trained using meta-learning (MAML, Reptile, SEAL), this contains the meta-learner that can quickly adapt the model to new tasks with just a few examples.

For Beginners: This is for models trained to "learn how to learn." With just 5-10 examples, it can adapt the model to a completely new task.

MetaTrainingResult

Gets or sets the results from meta-learning training.

public MetaTrainingResult<T>? MetaTrainingResult { get; set; }

Property Value

MetaTrainingResult<T>

Remarks

Contains performance history and statistics from the meta-training process, including loss curves, accuracy across different tasks, and convergence information.

For Beginners: This shows how well the meta-learning training went. It includes charts of how the model improved during training.

Model

Gets or sets the trained model used for making predictions.

public IFullModel<T, TInput, TOutput>? Model { get; set; }

Property Value

IFullModel<T, TInput, TOutput>

Remarks

This is the actual model that will perform predictions. If not set explicitly, it will be derived from OptimizationResult.BestSolution during construction.

For Beginners: This is the "brain" of your prediction system. Usually you don't need to set this directly - it comes from the optimization result.

ModelRegistry

Gets or sets the model registry for version and lifecycle management.

public IModelRegistry<T, TInput, TOutput>? ModelRegistry { get; set; }

Property Value

IModelRegistry<T, TInput, TOutput>

Remarks

Provides access to the model registry for transitioning model stages, registering new versions, and managing model lifecycle.

For Beginners: This is like a version control system for your models. You can use it to: - Promote this model from "Staging" to "Production" - Register fine-tuned versions as new model versions - Archive old models that are no longer needed - Compare performance across model versions

ModelVersion

Gets or sets the model version from the model registry.

public int? ModelVersion { get; set; }

Property Value

int?

Remarks

When model registry is configured, this contains the version number assigned to this model, enabling version tracking and rollback.

For Beginners: This is the version number of your model. Like software versions (v1.0, v2.0), this helps track model improvements over time.

NormalizationInfo

Gets or sets the normalization information for preprocessing and postprocessing data.

public NormalizationInfo<T, TInput, TOutput>? NormalizationInfo { get; set; }

Property Value

NormalizationInfo<T, TInput, TOutput>

Remarks

Stores the normalization parameters used during training so that new input data can be normalized the same way, and predictions can be denormalized to original scale.

For Beginners: This remembers how your training data was scaled. When you make predictions on new data, it applies the same scaling so the model understands the input correctly.

Note: This is the legacy normalization system. For new code, prefer using PreprocessingInfo which provides a more flexible pipeline-based approach.

OptimizationResult

Gets or sets the results of the optimization process that created the model.

public OptimizationResult<T, TInput, TOutput>? OptimizationResult { get; set; }

Property Value

OptimizationResult<T, TInput, TOutput>

Remarks

Contains detailed information about how the model was trained, including performance metrics on training, validation, and test datasets, as well as the training history.

For Beginners: This stores information about how well your model was trained. It includes scores like R-squared, RMSE, and tells you if the model might be overfitting.

PreprocessingInfo

Gets or sets the preprocessing pipeline information for data transformation.

public PreprocessingInfo<T, TInput, TOutput>? PreprocessingInfo { get; set; }

Property Value

PreprocessingInfo<T, TInput, TOutput>

Remarks

Stores the fitted preprocessing pipeline used during training so that new input data can be transformed the same way. This replaces the legacy NormalizationInfo with a more flexible, composable pipeline approach supporting scalers, encoders, imputers, and feature generators.

For Beginners: This remembers all the data transformations applied during training: - Scaling (StandardScaler, MinMaxScaler, etc.) - Encoding (OneHotEncoder, LabelEncoder, etc.) - Missing value handling (SimpleImputer, KNNImputer, etc.) - Feature generation (PolynomialFeatures, SplineTransformer, etc.)

When you make predictions on new data, it applies the same transformations so the model understands the input correctly.

ProfilingReport

Gets or sets the profiling report from training and inference operations.

public ProfileReport? ProfilingReport { get; set; }

Property Value

ProfileReport

Remarks

Contains comprehensive profiling data collected during model training including operation timing, memory allocations, and performance statistics with percentiles.

For Beginners: This shows you how long different parts of training took. It includes: - How long each operation took (e.g., forward pass, backward pass) - Memory usage during training - Performance percentiles (P50, P95, P99) for statistical analysis - Identification of performance bottlenecks

ProgramSynthesisModel

Gets or sets the Program Synthesis model used for code tasks (optional).

public IFullModel<T, Tensor<T>, Tensor<T>>? ProgramSynthesisModel { get; set; }

Property Value

IFullModel<T, Tensor<T>, Tensor<T>>

Remarks

Program Synthesis is independent of the main prediction model. This allows a single AiModelResult to expose code-task capabilities even when the primary model uses non-tensor data types (for example, Vector<T> or Matrix<T>).

For Beginners: This is the specialized model used for code-related tasks such as code generation or repair. You typically configure this via AiModelBuilder.ConfigureProgramSynthesis(...).

ProgramSynthesisServingClient

Gets or sets the Program Synthesis Serving client (optional).

public IProgramSynthesisServingClient? ProgramSynthesisServingClient { get; set; }

Property Value

IProgramSynthesisServingClient

Remarks

When provided, Program Synthesis inference (code tasks, sandboxed execution, evaluation) can be routed through AiDotNet.Serving by default to isolate untrusted code and keep proprietary logic on the server side.

For Beginners: This lets your app call a secure server to run code tasks safely.

Instead of running code on your machine (which can be unsafe), you can point AiDotNet to a Serving instance that runs everything in a sandbox.

ProgramSynthesisServingClientOptions

Gets or sets the options used to create a default ProgramSynthesisServingClient when no explicit client is provided.

public ProgramSynthesisServingClientOptions? ProgramSynthesisServingClientOptions { get; set; }

Property Value

ProgramSynthesisServingClientOptions

PromptAnalyzer

Gets or sets the prompt analyzer for computing prompt metrics and validation.

public IPromptAnalyzer? PromptAnalyzer { get; set; }

Property Value

IPromptAnalyzer

Remarks

The prompt analyzer computes metrics like token count, estimated cost, complexity score, and validates prompts for potential issues before sending them to an LLM.

For Beginners: This checks your prompts before you use them. It tells you how many tokens they use (affecting cost), how complex they are, and warns you about potential problems.

PromptChain

Gets or sets the prompt chain for composing multiple operations.

public IChain<string, string>? PromptChain { get; set; }

Property Value

IChain<string, string>

Remarks

A chain orchestrates multiple language model calls, tools, and transformations into a cohesive workflow. Chains can be sequential, conditional, or parallel.

For Beginners: This connects multiple AI steps together like a recipe.

Example workflow:

  1. Classify the customer email (is it a complaint, question, or praise?)
  2. Route to the appropriate response template
  3. Generate a personalized response

The chain handles all these steps automatically.

PromptCompressor

Gets or sets the prompt compressor for reducing token counts.

public IPromptCompressor? PromptCompressor { get; set; }

Property Value

IPromptCompressor

Remarks

The prompt compressor reduces the token count of prompts while preserving their semantic meaning. This can significantly reduce API costs for long prompts.

For Beginners: This makes your prompts shorter without losing meaning. Shorter prompts cost less money when using paid AI services like GPT-4 or Claude.

PromptOptimizer

Gets or sets the prompt optimizer for automatically improving prompts.

public IPromptOptimizer<T>? PromptOptimizer { get; set; }

Property Value

IPromptOptimizer<T>

Remarks

A prompt optimizer automatically refines prompts to achieve better performance on a specific task. Strategies include discrete search, gradient-based methods, evolutionary algorithms, and Bayesian optimization.

For Beginners: This automatically improves your prompts by trying variations and keeping the ones that work best. It's like A/B testing for prompts.

PromptTemplate

Gets or sets the prompt template for formatting model inputs.

public IPromptTemplate? PromptTemplate { get; set; }

Property Value

IPromptTemplate

Remarks

A prompt template provides a reusable structure for creating prompts with variable placeholders that can be filled in at runtime.

For Beginners: This is like a fill-in-the-blank form for creating prompts.

Example:

var template = new SimplePromptTemplate("Translate {text} from {source} to {target}");
var prompt = template.Format(new Dictionary<string, string>
{
    ["text"] = "Hello",
    ["source"] = "English",
    ["target"] = "Spanish"
});
// Result: "Translate Hello from English to Spanish"

QueryProcessors

Gets or sets the query processors for preprocessing search queries.

public IEnumerable<IQueryProcessor>? QueryProcessors { get; set; }

Property Value

IEnumerable<IQueryProcessor>

Remarks

Query processors can expand, rewrite, or enhance queries before they are sent to the retriever, improving search quality.

For Beginners: These improve your search queries before searching. For example, they might add synonyms or fix spelling mistakes.

RagGenerator

Gets or sets the generator for creating answers from retrieved context.

public IGenerator<T>? RagGenerator { get; set; }

Property Value

IGenerator<T>

Remarks

The generator takes the retrieved documents and the original query to produce a natural language response that incorporates the retrieved information.

For Beginners: This takes the documents found by the retriever and uses them to write a helpful answer to your question.

RagReranker

Gets or sets the reranker for improving document relevance ordering.

public IReranker<T>? RagReranker { get; set; }

Property Value

IReranker<T>

Remarks

After initial retrieval, the reranker reorders documents by more carefully evaluating their relevance to the query, typically improving result quality.

For Beginners: After finding documents, this component sorts them again to put the most relevant ones first. It's like a second opinion on what's most useful.

RagRetriever

Gets or sets the retriever for finding relevant documents during inference.

public IRetriever<T>? RagRetriever { get; set; }

Property Value

IRetriever<T>

Remarks

The retriever searches for documents or passages that are relevant to the input query. It typically uses vector similarity search to find the most similar content.

For Beginners: This is like a smart search engine that finds relevant information from your document collection to help the model answer questions better.

ReasoningConfig

Gets or sets the reasoning configuration for advanced reasoning capabilities.

public ReasoningConfig? ReasoningConfig { get; set; }

Property Value

ReasoningConfig

Remarks

Configures advanced reasoning strategies like Chain-of-Thought, Tree-of-Thoughts, and Self-Consistency for complex problem-solving.

For Beginners: This enables the model to "think step by step" when solving complex problems, similar to how humans work through difficult questions.

RegisteredModelName

Gets or sets the registered model name in the model registry.

public string? RegisteredModelName { get; set; }

Property Value

string

Remarks

The name under which this model is registered in the model registry, used for retrieval and deployment.

For Beginners: This is the name of your model in the registry. You can use this name to load the model later or deploy it to production.

SafetyFilterConfiguration

Gets or sets the safety filter configuration used to validate inputs and filter outputs during inference.

public SafetyFilterConfiguration<T>? SafetyFilterConfiguration { get; set; }

Property Value

SafetyFilterConfiguration<T>

Remarks

When null, safety filtering defaults to enabled with standard options. Set Enabled to false to opt out.

TokenizationConfig

Gets or sets the tokenization configuration.

public TokenizationConfig? TokenizationConfig { get; set; }

Property Value

TokenizationConfig

Remarks

Contains settings for the tokenizer including vocabulary size, special tokens, padding behavior, and truncation settings.

For Beginners: This controls how text is converted to tokens: - Maximum length (how much text to process) - Padding (how to handle short texts) - Special tokens (like [START] and [END] markers)

Tokenizer

Gets or sets the tokenizer for text encoding and decoding.

public ITokenizer? Tokenizer { get; set; }

Property Value

ITokenizer

Remarks

The tokenizer converts text into tokens (numerical IDs) that the model can process, and converts model outputs back into readable text.

For Beginners: This converts text into numbers that the model understands, and converts the model's number outputs back into text you can read.

TrainingMetricsHistory

Gets or sets the training metrics history.

public Dictionary<string, List<double>>? TrainingMetricsHistory { get; set; }

Property Value

Dictionary<string, List<double>>

Remarks

Contains the history of metrics (loss, accuracy, etc.) recorded during training, enabling visualization and analysis of training progress.

For Beginners: This is a log of how your model improved during training. You can use it to create charts showing loss going down over time.

TrainingMonitor

Gets or sets the training monitor for accessing training diagnostics.

public ITrainingMonitor<T>? TrainingMonitor { get; set; }

Property Value

ITrainingMonitor<T>

Remarks

Provides access to training diagnostics including learning curves, gradient statistics, and training progress information.

For Beginners: This gives you insights into how training went. You can use it to: - View learning curves (loss over time) - Check for signs of overfitting - Analyze gradient flow during training - Export training charts and reports