Added the BeyondFacts Lab as a prototype (#1175)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-08 19:49:46 +01:00
1 parent db8dae1cf6
commit b6c3fbb5db
90 files changed
+5936 -209

No files matched your search

@@ -29,6 +29,7 @@ public enum ConfigurableAssistant
LOG_VIEWER_ASSISTANT,
VISUAL_BRIEFING_ASSISTANT,
BATCH_PROCESSING_ASSISTANT,
BEYOND_FACTS_LAB_ASSISTANT,
// ReSharper disable InconsistentNaming
I18N_ASSISTANT,
@@ -1,4 +1,5 @@
using AIStudio.Assistants.Agenda;
using AIStudio.Assistants.BeyondFactsLab;
using AIStudio.Assistants.Coding;
using AIStudio.Assistants.IconFinder;
using AIStudio.Assistants.RewriteImprove;
@@ -315,6 +316,27 @@ public static class ConfigurationSelectDataFactory
}
}
/// <summary>
/// Gets the minimum confidence levels the BeyondFacts Lab offers: none below its floor.
/// </summary>
/// <param name="settingsManager">The settings, whose enforced global minimum may lift the floor.</param>
public static IEnumerable<ConfigurationSelectData<ConfidenceLevel>> GetBeyondFactsLabConfidenceLevelsData(SettingsManager settingsManager)
{
var minimumLevel = DataBeyondFactsLab.MINIMUM_CONFIDENCE_FLOOR;
if (settingsManager.ConfigurationData.Confidence is { EnforceGlobalMinimumConfidence: true } && settingsManager.ConfigurationData.Confidence.GlobalMinimumConfidence > minimumLevel)
minimumLevel = settingsManager.ConfigurationData.Confidence.GlobalMinimumConfidence;
foreach (var level in Enum.GetValues<ConfidenceLevel>())
if (level >= minimumLevel)
yield return new(level.Name, level);
}
public static IEnumerable<ConfigurationSelectData<BflAddressForm>> GetBeyondFactsLabAddressFormData()
{
foreach (var addressForm in Enum.GetValues<BflAddressForm>())
yield return new(addressForm.Name, addressForm);
}
public static IEnumerable<ConfigurationSelectData<ConfidenceLevel>> GetDataSourceConfidenceLevelsData()
{
foreach (var level in Enum.GetValues<ConfidenceLevel>())
@@ -217,6 +217,11 @@ public sealed class Data
/// Gets the managed Visual Briefing Assistant defaults.
/// </summary>
public DataVisualBriefing VisualBriefing { get; set; } = new(x => x.VisualBriefing);
/// <summary>
/// Gets the managed settings of the BeyondFacts Lab.
/// </summary>
public DataBeyondFactsLab BeyondFactsLab { get; set; } = new(x => x.BeyondFactsLab);
public DataLegalCheck LegalCheck { get; set; } = new();
@@ -0,0 +1,56 @@
using System.Linq.Expressions;
using AIStudio.Assistants.BeyondFactsLab;
using AIStudio.Provider;
namespace AIStudio.Settings.DataModel;
/// <summary>
/// Stores the settings of the BeyondFacts Lab, which an organization may manage.
/// </summary>
/// <param name="configSelection">The managed-configuration selector.</param>
public sealed class DataBeyondFactsLab(Expression<Func<Data, DataBeyondFactsLab>>? configSelection = null)
{
/// <summary>
/// The lowest minimum confidence the BeyondFacts Lab accepts, whatever the person or their organization configures.
/// </summary>
/// <remarks>
/// Unpublished research is the usual material of the lab. The built-in confidence schemes give this level
/// to the cloud providers of the region one trusts and to self-hosted models; HIGH alone would leave only
/// self-hosted models. A higher minimum of the person or the organization wins.
/// </remarks>
public const ConfidenceLevel MINIMUM_CONFIDENCE_FLOOR = ConfidenceLevel.MEDIUM;
/// <summary>
/// Initializes unmanaged settings of the BeyondFacts Lab.
/// </summary>
public DataBeyondFactsLab() : this(null)
{
}
/// <summary>
/// Gets or sets the provider which new preparations start with.
/// </summary>
public string PreselectedProvider { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedProvider, string.Empty);
/// <summary>
/// Gets or sets the minimum confidence a provider needs for the lab.
/// </summary>
/// <remarks>
/// A value below MINIMUM_CONFIDENCE_FLOOR has no effect, see ComponentsExtensions.MinimumConfidence.
/// </remarks>
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, value => value.MinimumProviderConfidence, MINIMUM_CONFIDENCE_FLOOR);
/// <summary>
/// Gets or sets how the lab addresses the person in languages with a formal and an informal address.
/// </summary>
public BflAddressForm AddressForm { get; set; } = ManagedConfiguration.Register(configSelection, value => value.AddressForm, BflAddressForm.FORMAL);
/// <summary>
/// Gets or sets the hash of the notes the person confirmed, see BflNotice; empty while they confirmed none.
/// </summary>
/// <remarks>
/// Only the person can confirm the notes, so an organization cannot manage this setting.
/// </remarks>
public string AcceptedNoticeHash { get; set; } = string.Empty;
}
@@ -19,4 +19,5 @@ public enum PreviewFeatures
PRE_VISUAL_BRIEFING_ASSISTANT_2026,
PRE_MAILBOXES_2026,
PRE_MATHEMATICS_2026,
PRE_BEYOND_FACTS_LAB_2026,
}
@@ -22,6 +22,7 @@ public static class PreviewFeaturesExtensions
PreviewFeatures.PRE_VISUAL_BRIEFING_ASSISTANT_2026 => TB("Visual Briefing Assistant: Turn source material into an interactive briefing"),
PreviewFeatures.PRE_MAILBOXES_2026 => TB("Mailboxes: Let the AI search and read your e-mails, kept in a local index on your computer"),
PreviewFeatures.PRE_MATHEMATICS_2026 => TB("Mathematics: Let the AI calculate exactly and work with formulas, right on your computer"),
PreviewFeatures.PRE_BEYOND_FACTS_LAB_2026 => TB("BeyondFacts Lab: Prepare for challenging conversations about your research, step by step"),
_ => TB("Unknown preview feature")
};
@@ -27,6 +27,7 @@ public static class PreviewVisibilityExtensions
{
features.Add(PreviewFeatures.PRE_MAILBOXES_2026);
features.Add(PreviewFeatures.PRE_MATHEMATICS_2026);
features.Add(PreviewFeatures.PRE_BEYOND_FACTS_LAB_2026);
}
if (visibility >= PreviewVisibility.EXPERIMENTAL)