mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 16:19:48 +00:00
Added an option to enable or disable the context validation
This commit is contained in:
parent
ea96f08c57
commit
129e0d0779
@ -1,13 +1,17 @@
|
|||||||
@inherits SettingsPanelBase
|
@inherits SettingsPanelBase
|
||||||
|
|
||||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Assessment" HeaderText="Agent: Retrieval Context Validation Options">
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Assessment" HeaderText="Agent: Retrieval Context Validation Options">
|
||||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
<MudText Typo="Typo.body1" Class="mb-3">
|
||||||
<MudText Typo="Typo.body1" Class="mb-3">
|
Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these
|
||||||
Use Case: this agent is used to validate any retrieval context of the retrieval process. Perhaps there are many of these
|
retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this
|
||||||
retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this
|
job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model.
|
||||||
job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model.
|
</MudText>
|
||||||
</MudText>
|
<ConfigurationOption OptionDescription="Enable the retrieval context validation agent?" LabelOn="The validation agent is enabled" LabelOff="No validation is performed" State="@(() => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.EnableRetrievalContextValidation)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.EnableRetrievalContextValidation = updatedState)" OptionHelp="When enabled, the retrieval context validation agent will check each retrieval context of any retrieval process, whether a context makes sense for the given prompt."/>
|
||||||
<ConfigurationOption OptionDescription="Preselect retrieval context validation options?" LabelOn="Options are preselected" LabelOff="No options are preselected" State="@(() => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions = updatedState)" OptionHelp="When enabled, you can preselect some agent options. This is might be useful when you prefer a LLM."/>
|
@if (this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.EnableRetrievalContextValidation)
|
||||||
<ConfigurationProviderSelection Data="@this.AvailableLLMProvidersFunc()" Disabled="@(() => !this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectedAgentProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectedAgentProvider = selectedValue)"/>
|
{
|
||||||
</MudPaper>
|
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||||
|
<ConfigurationOption OptionDescription="Preselect retrieval context validation options?" LabelOn="Options are preselected" LabelOff="No options are preselected" State="@(() => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions = updatedState)" OptionHelp="When enabled, you can preselect some agent options. This is might be useful when you prefer a LLM."/>
|
||||||
|
<ConfigurationProviderSelection Data="@this.AvailableLLMProvidersFunc()" Disabled="@(() => !this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectedAgentProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectedAgentProvider = selectedValue)"/>
|
||||||
|
</MudPaper>
|
||||||
|
}
|
||||||
</ExpansionPanel>
|
</ExpansionPanel>
|
@ -2,6 +2,11 @@ namespace AIStudio.Settings.DataModel;
|
|||||||
|
|
||||||
public sealed class DataAgentRetrievalContextValidation
|
public sealed class DataAgentRetrievalContextValidation
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enable the retrieval context validation agent?
|
||||||
|
/// </summary>
|
||||||
|
public bool EnableRetrievalContextValidation { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Preselect any retrieval context validation options?
|
/// Preselect any retrieval context validation options?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user