@@ -212,6 +212,125 @@ public class AgentAssistanceOptions
212212 /// </remarks>
213213 public bool EnableMetaLearningAdvice { get ; set ; } = false ;
214214
215+ /// <summary>
216+ /// Gets or sets a value indicating whether the agent should use Chain-of-Thought reasoning.
217+ /// </summary>
218+ /// <value>True to enable reasoning; false to disable. Default is false.</value>
219+ /// <remarks>
220+ /// <para>
221+ /// When enabled, the agent will generate step-by-step reasoning explanations when making decisions
222+ /// or recommendations during model building. This provides transparency into the agent's decision-making
223+ /// process and can help users understand why certain recommendations are made.
224+ /// </para>
225+ /// <para><b>For Beginners:</b> Chain-of-Thought reasoning makes the AI explain its thinking step-by-step.
226+ ///
227+ /// What this does:
228+ /// - Agent shows its reasoning process (not just final answers)
229+ /// - Each decision is broken down into logical steps
230+ /// - You can see why the agent recommends certain choices
231+ /// - Helps you learn and verify the agent's logic
232+ ///
233+ /// Example without reasoning:
234+ /// - "I recommend using a Random Forest model."
235+ ///
236+ /// Example with reasoning:
237+ /// - "Step 1: Your dataset has 10,000 samples, which is medium-sized."
238+ /// - "Step 2: You have 50 features with complex non-linear relationships."
239+ /// - "Step 3: Random Forest handles non-linearity well and doesn't require feature scaling."
240+ /// - "Conclusion: I recommend using a Random Forest model."
241+ ///
242+ /// Why enable this:
243+ /// - Learn how AI agents make decisions
244+ /// - Verify the agent's reasoning is sound
245+ /// - Build trust in AI recommendations
246+ /// - Educational value for understanding ML concepts
247+ ///
248+ /// Why it's disabled by default:
249+ /// - Generates more output (can be verbose)
250+ /// - Takes slightly more time
251+ /// - Not necessary if you just want quick recommendations
252+ ///
253+ /// Enable this when: You want to understand the agent's reasoning or are learning about ML.
254+ /// </para>
255+ /// </remarks>
256+ public bool EnableReasoning { get ; set ; } = false ;
257+
258+ /// <summary>
259+ /// Gets or sets the maximum number of reasoning steps the agent should generate.
260+ /// </summary>
261+ /// <value>The maximum number of reasoning steps. Default is 5.</value>
262+ /// <remarks>
263+ /// <para>
264+ /// When Chain-of-Thought reasoning is enabled, this controls how many reasoning steps the agent
265+ /// will generate. More steps provide more detailed explanations but take longer to generate.
266+ /// This is only used when EnableReasoning is true.
267+ /// </para>
268+ /// <para><b>For Beginners:</b> This limits how many steps the AI shows in its reasoning.
269+ ///
270+ /// Why this matters:
271+ /// - More steps = more detailed explanation but takes longer
272+ /// - Fewer steps = quicker but less detailed
273+ /// - 5 steps is usually enough for most decisions
274+ ///
275+ /// Example with 3 steps (brief):
276+ /// - "Step 1: Dataset is small (100 samples)"
277+ /// - "Step 2: Linear patterns detected"
278+ /// - "Step 3: Recommend Linear Regression"
279+ ///
280+ /// Example with 7 steps (detailed):
281+ /// - "Step 1: Dataset has 100 samples"
282+ /// - "Step 2: That's considered small for ML"
283+ /// - "Step 3: Checking feature relationships..."
284+ /// - "Step 4: Found linear correlations"
285+ /// - "Step 5: Linear models work well here"
286+ /// - "Step 6: Comparing Linear Regression vs Ridge Regression"
287+ /// - "Step 7: Recommend Linear Regression due to no multicollinearity"
288+ ///
289+ /// Recommended values:
290+ /// - 3-5: Quick, concise reasoning
291+ /// - 5-7: Balanced detail
292+ /// - 7-10: Very detailed explanations
293+ /// </para>
294+ /// </remarks>
295+ public int MaxReasoningSteps { get ; set ; } = 5 ;
296+
297+ /// <summary>
298+ /// Gets or sets the minimum confidence threshold for agent reasoning verification.
299+ /// </summary>
300+ /// <value>The confidence threshold (0.0 to 1.0). Default is 0.7.</value>
301+ /// <remarks>
302+ /// <para>
303+ /// When Chain-of-Thought reasoning is enabled, this threshold determines the minimum confidence
304+ /// score required for reasoning steps to be considered valid. Steps below this threshold may trigger
305+ /// refinement or additional verification. Higher values require more confident reasoning.
306+ /// This is only used when EnableReasoning is true.
307+ /// </para>
308+ /// <para><b>For Beginners:</b> This is the quality bar for the AI's reasoning.
309+ ///
310+ /// How it works:
311+ /// - Each reasoning step gets a confidence score (0.0 to 1.0)
312+ /// - 1.0 = completely confident, 0.0 = no confidence
313+ /// - Steps below the threshold are flagged as uncertain
314+ /// - The agent may revise or refine low-confidence steps
315+ ///
316+ /// Example with threshold 0.7:
317+ /// - Step with 0.9 confidence: Accepted (high quality)
318+ /// - Step with 0.6 confidence: Flagged for refinement (below threshold)
319+ ///
320+ /// Choosing the right threshold:
321+ /// - 0.5-0.6: Lenient, accepts most reasoning (faster but less rigorous)
322+ /// - 0.7-0.8: Balanced, good quality control (recommended)
323+ /// - 0.8-0.9: Strict, only high-confidence reasoning (slower but more reliable)
324+ ///
325+ /// Trade-offs:
326+ /// - Higher threshold = more reliable but slower (more refinement iterations)
327+ /// - Lower threshold = faster but may accept weaker reasoning
328+ ///
329+ /// Default of 0.7 is a good balance for most use cases.
330+ /// </para>
331+ /// </remarks>
332+ public double ReasoningConfidenceThreshold { get ; set ; } = 0.7 ;
333+
215334 /// <summary>
216335 /// Gets a predefined configuration with data analysis and model selection enabled.
217336 /// </summary>
@@ -225,6 +344,7 @@ public class AgentAssistanceOptions
225344 /// - ✗ Hyperparameter tuning (uses default settings)
226345 /// - ✗ Feature analysis (keeps all features)
227346 /// - ✗ Meta-learning advice (not needed for standard problems)
347+ /// - ✗ Reasoning (disabled for simplicity)
228348 ///
229349 /// Use this when: You're getting started and want helpful guidance without overwhelming detail.
230350 /// It's a good balance between AI assistance and keeping things simple.
@@ -236,7 +356,10 @@ public class AgentAssistanceOptions
236356 EnableModelSelection = true ,
237357 EnableHyperparameterTuning = false ,
238358 EnableFeatureAnalysis = false ,
239- EnableMetaLearningAdvice = false
359+ EnableMetaLearningAdvice = false ,
360+ EnableReasoning = false ,
361+ MaxReasoningSteps = 5 ,
362+ ReasoningConfidenceThreshold = 0.7
240363 } ;
241364
242365 /// <summary>
@@ -252,6 +375,7 @@ public class AgentAssistanceOptions
252375 /// - ✗ Hyperparameter tuning (you'll tune manually)
253376 /// - ✗ Feature analysis (you'll handle features yourself)
254377 /// - ✗ Meta-learning advice (not needed)
378+ /// - ✗ Reasoning (disabled for speed)
255379 ///
256380 /// Use this when: You're experienced with ML and only want validation on which model type to use.
257381 /// Everything else you'll handle yourself. This gives you maximum control with one helpful suggestion.
@@ -263,7 +387,10 @@ public class AgentAssistanceOptions
263387 EnableModelSelection = true ,
264388 EnableHyperparameterTuning = false ,
265389 EnableFeatureAnalysis = false ,
266- EnableMetaLearningAdvice = false
390+ EnableMetaLearningAdvice = false ,
391+ EnableReasoning = false ,
392+ MaxReasoningSteps = 5 ,
393+ ReasoningConfidenceThreshold = 0.7
267394 } ;
268395
269396 /// <summary>
@@ -279,12 +406,14 @@ public class AgentAssistanceOptions
279406 /// - ✓ Hyperparameter tuning (optimizes settings)
280407 /// - ✓ Feature analysis (identifies important variables)
281408 /// - ✓ Meta-learning advice (if using meta-learning)
409+ /// - ✓ Reasoning (explains all decisions step-by-step)
282410 ///
283411 /// Use this when:
284412 /// - You want the AI to help with every decision
285413 /// - You're working on an important project and want maximum performance
286414 /// - You want to learn what the AI recommends for each aspect
287415 /// - You're new to ML and want comprehensive guidance
416+ /// - You want to understand the agent's reasoning process
288417 ///
289418 /// Note: This will make model building take longer because the agent does more analysis, but you'll
290419 /// get more insights and potentially better results.
@@ -296,7 +425,10 @@ public class AgentAssistanceOptions
296425 EnableModelSelection = true ,
297426 EnableHyperparameterTuning = true ,
298427 EnableFeatureAnalysis = true ,
299- EnableMetaLearningAdvice = true
428+ EnableMetaLearningAdvice = true ,
429+ EnableReasoning = true ,
430+ MaxReasoningSteps = 7 ,
431+ ReasoningConfidenceThreshold = 0.7
300432 } ;
301433
302434 /// <summary>
@@ -331,6 +463,9 @@ public class AgentAssistanceOptions
331463 EnableModelSelection = this . EnableModelSelection ,
332464 EnableHyperparameterTuning = this . EnableHyperparameterTuning ,
333465 EnableFeatureAnalysis = this . EnableFeatureAnalysis ,
334- EnableMetaLearningAdvice = this . EnableMetaLearningAdvice
466+ EnableMetaLearningAdvice = this . EnableMetaLearningAdvice ,
467+ EnableReasoning = this . EnableReasoning ,
468+ MaxReasoningSteps = this . MaxReasoningSteps ,
469+ ReasoningConfidenceThreshold = this . ReasoningConfidenceThreshold
335470 } ;
336471}
0 commit comments