AiModelResultOptions<T, TInput, TOutput>

Options & Configuration · AiDotNet.Models.Options

Represents the configuration options for creating a AiModelResult.

Inheritance: ModelOptions → AiModelResultOptions<T, TInput, TOutput>

For Beginners

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

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

You can write this (easy to read):

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

How It Works

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

Constructors

Constructor Summary
AiModelResultOptions()

Properties

Property Summary
AugmentationConfig AugmentationConfig { get; set; } Gets or sets the unified augmentation configuration.
AutoMLRunSummary AutoMLSummary { get; set; } Gets or sets an optional AutoML run summary for this trained model.
BenchmarkReport BenchmarkReport { get; set; } Gets or sets the most recent benchmark report produced during model build/evaluation.
BenchmarkingOptions BenchmarkingOptions { get; set; } Gets or sets the benchmarking configuration supplied to AiModelBuilder.ConfigureBenchmarking(...) so BuildForInference() results can execute EvaluateBenchmarksAsync() without repeating options.
CrossValidationResult<T, TInput, TOutput> CrossValidationResult { get; set; } Gets or sets the results from cross-validation.
DeploymentConfiguration DeploymentConfiguration { get; set; } Gets or sets the deployment configuration for model export and production use.
Dictionary<string, List<double>> TrainingMetricsHistory { get; set; } Gets or sets the training metrics history.
Dictionary<string, object> Hyperparameters { get; set; } Gets or sets the hyperparameters used for training.
EvolutionRunSummary EvolutionSummary { get; set; } Gets or sets an optional redacted summary of an evolution run.
Func<Tensor<T>[], Tensor<T>[]> JitCompiledFunction { get; set; } Gets or sets the JIT-compiled prediction function for accelerated inference.
HybridGraphRetriever<T> HybridGraphRetriever { get; set; } Gets or sets the hybrid retriever combining vector search with graph traversal.
HyperparameterOptimizationResult<T> HyperparameterOptimizationResult { get; set; } Gets or sets the hyperparameter optimization result.
IBiasDetector<T> BiasDetector { get; set; } Gets or sets the bias detector for identifying potential biases in model predictions.
ICheckpointManager<T, TInput, TOutput> CheckpointManager { get; set; } Gets or sets the checkpoint manager for model persistence operations.
IChunkingStrategy ChunkingStrategy { get; set; } Gets or sets the chunking strategy used to split source documents into passages before embedding/indexing.
IContextCompressor<T> ContextCompressor { get; set; } Gets or sets the context compressor used to shrink retrieved passages before generation.
IDocumentStore<T> DocumentStore { get; set; } Gets or sets the document store backing vector retrieval.
IDraftModel<T> ServingDraftModel { get; set; } Optional user-supplied draft model for speculative decoding during serving, set via the builder’s ConfigureSpeculativeDecoding overloads.
IEmbeddingModel<T> EmbeddingModel { get; set; } The embedding model configured via ConfigureEmbeddingModel(...), or null when none was.
IEnumerable<IQueryProcessor> QueryProcessors { get; set; } Gets or sets the query processors for preprocessing search queries.
IExperimentRun<T> ExperimentRun { get; set; } Gets or sets the experiment run associated with this model.
IExperimentTracker<T> ExperimentTracker { get; set; } Gets or sets the experiment tracker used during training.
IFairnessEvaluator<T> FairnessEvaluator { get; set; } Gets or sets the fairness evaluator for computing fairness metrics.
IFewShotExampleSelector<T> FewShotExampleSelector { get; set; } Gets or sets the few-shot example selector for choosing examples to include in prompts.
IFullModel<T, Tensor<T>, Tensor<T>> ProgramSynthesisModel { get; set; } Gets or sets the Program Synthesis model used for code tasks (optional).
IGenerator<T> RagGenerator { get; set; } Gets or sets the generator for creating answers from retrieved context.
IGraphStore<T> GraphStore { get; set; } Gets or sets the graph store backend for persistent graph storage.
ILoRAConfiguration<T> LoRAConfiguration { get; set; } Gets or sets the LoRA configuration for parameter-efficient fine-tuning.
IMetaLearner<T, TInput, TOutput> MetaLearner { get; set; } Gets or sets the meta-learner for few-shot adaptation capabilities.
IModelRegistry<T, TInput, TOutput> ModelRegistry { get; set; } Gets or sets the model registry for version and lifecycle management.
IProgramSynthesisServingClient ProgramSynthesisServingClient { get; set; } Gets or sets the Program Synthesis Serving client (optional).
IPromptAnalyzer PromptAnalyzer { get; set; } Gets or sets the prompt analyzer for computing prompt metrics and validation.
IPromptCompressor PromptCompressor { get; set; } Gets or sets the prompt compressor for reducing token counts.
IPromptOptimizer<T> PromptOptimizer { get; set; } Gets or sets the prompt optimizer for automatically improving prompts.
IPromptTemplate PromptTemplate { get; set; } Gets or sets the prompt template for formatting model inputs.
IReranker<T> RagReranker { get; set; } Gets or sets the reranker for improving document relevance ordering.
IRetriever<T> RagRetriever { get; set; } Gets or sets the retriever for finding relevant documents during inference.
ITextVectorizer<T> TextVectorizer { get; set; } Gets or sets the fitted text vectorizer used to turn raw text into model features.
ITokenizer Tokenizer { get; set; } Gets or sets the tokenizer for text encoding and decoding.
ITrainingMonitor<T> TrainingMonitor { get; set; } Gets or sets the training monitor for accessing training diagnostics.
InferenceOptimizationConfig InferenceOptimizationConfig { get; set; } Gets or sets the inference optimization configuration.
InterpretabilityOptions InterpretabilityOptions { get; set; } Gets or sets the interpretability options for model explanation methods.
JitCompilationConfig JitCompilationConfig { get; set; } JIT compilation configuration applied on every Predict call.
KnowledgeDistillationOptions<T, TInput, TOutput> KnowledgeDistillationOptions { get; set; } Gets or sets the knowledge-distillation options configured via ConfigureKnowledgeDistillation.
KnowledgeGraph<T> KnowledgeGraph { get; set; } Gets or sets the knowledge graph for entity-relationship-based retrieval.
MetaTrainingResult<T> MetaTrainingResult { get; set; } Gets or sets the results from meta-learning training.
OptimizationResult<T, TInput, TOutput> OptimizationResult { get; set; } Gets or sets the results of the optimization process that created the model.
PostprocessingPipeline<T, TOutput, TOutput> PostprocessingPipeline { get; set; } Gets or sets the postprocessing pipeline configured via ConfigurePostprocessing.
PreprocessingInfo<T, TInput, TOutput> PreprocessingInfo { get; set; } Gets or sets the preprocessing pipeline information for data transformation.
ProfileReport ProfilingReport { get; set; } Gets or sets the profiling report from training and inference operations.
ProgramEvolutionResult ProgramEvolution { get; set; } Gets or sets an optional program-evolution result carrying the winning source.
ProgramSynthesisServingClientOptions ProgramSynthesisServingClientOptions { get; set; } Gets or sets the options used to create a default ProgramSynthesisServingClient when no explicit client is provided.
QuantizationInfo QuantizationInfo { get; set; } Gets or sets information about model quantization.
ReasoningConfig ReasoningConfig { get; set; } Gets or sets the reasoning configuration for advanced reasoning capabilities.
SafetyFilterConfiguration<T> SafetyFilterConfiguration { get; set; } Gets or sets the safety filter configuration used to validate inputs and filter outputs during inference.
SegmentationVisualizationConfig SegmentationVisualization { get; set; } Segmentation overlay settings supplied via ConfigureSegmentationVisualization.
TOutput PostprocessingFitSample { get; set; } Optional sample of model-output predictions (NOT training targets) handed in alongside an unfitted PostprocessingPipeline so the AiModelResult ctor can lazy-fit the pipeline at construction time instead of throwing.
TokenizationConfig TokenizationConfig { get; set; } Gets or sets the tokenization configuration.
TrainingMemoryConfig MemoryConfig { get; set; } Gets or sets the memory management configuration for training.
WeightStreamingReport WeightStreamingReport { get; set; } Weight-streaming activity report from the underlying WeightRegistry if streaming engaged during the build (issue #1222 task #186).
bool AllowNondeterminism { get; set; } Determinism policy.
bool EarlyStopTriggered { get; set; } Gets or sets whether training stopped before running all configured epochs.
bool MixedPrecisionEngaged { get; set; } Gets or sets whether mixed-precision (FP16) training actually engaged during this run.
int? HyperparameterTrialId { get; set; } Gets or sets the hyperparameter optimization trial ID.
int? ModelVersion { get; set; } Gets or sets the model version from the model registry.
object EvolutionRunResult { get; set; } Gets or sets the engine’s own typed evolution run result, boxed because the genome type is not a type parameter of the result.
string CheckpointPath { get; set; } Gets or sets the checkpoint path where the model was saved during training.
string DataVersionHash { get; set; } Gets or sets the data version hash for the training data.
string ExperimentId { get; set; } Gets or sets the experiment ID that this run belongs to.
string ExperimentRunId { get; set; } Gets or sets the experiment run ID from experiment tracking.
string MixedPrecisionStatus { get; set; } Gets or sets a human-readable description of the mixed-precision outcome (e.g.
string RegisteredModelName { get; set; } Gets or sets the registered model name in the model registry.
string StopReason { get; set; } Gets or sets a human-readable explanation of why training stopped early, or null when training ran to completion.