mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-12 19:33:48 +00:00
Tell the user when an answer was created without their data sources
This commit is contained in:
5 files changed
+55
No files matched your search
@@ -240,6 +240,12 @@ public sealed class AIJobService(SettingsManager settingsManager, MessageBus mes
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.LogError(e, "Skipping the RAG process due to an error.");
|
||||
|
||||
//
|
||||
// The answer is about to be created without the data the user expected it to use.
|
||||
// Without this message, that answer is indistinguishable from one that did use it:
|
||||
//
|
||||
await MessageBus.INSTANCE.SendWarning(new(Icons.Material.Filled.Source, TB("Your data sources could not be used. This answer was created without them.")));
|
||||
}
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
@@ -70,10 +70,19 @@ public sealed class AugmentationOne : IAugmentationProcess
|
||||
catch (Exception exception)
|
||||
{
|
||||
LOGGER.LogError(exception, "Retrieval context validation failed. Continuing augmentation with all retrieved contexts.");
|
||||
|
||||
//
|
||||
// The user switched this check on. Continuing without it silently would hide
|
||||
// that the answer rests on unfiltered passages:
|
||||
//
|
||||
await MessageBus.INSTANCE.SendWarning(new(Icons.Material.Filled.FactCheck, TB("The check of which passages fit your question failed. This answer uses all passages that were found.")));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.LogWarning("Skipping retrieval context validation because no sufficiently trusted validation agent provider is available. Continuing augmentation with all retrieved contexts.");
|
||||
await MessageBus.INSTANCE.SendWarning(new(Icons.Material.Filled.FactCheck, TB("No provider is trusted enough to check which passages fit your question. This answer uses all passages that were found.")));
|
||||
}
|
||||
}
|
||||
|
||||
LOGGER.LogInformation($"Starting the augmentation process over {retrievalContexts.Count:###,###,###,###} of {numTotalRetrievalContexts:###,###,###,###} retrieved contexts.");
|
||||
|
||||
@@ -106,6 +106,15 @@ public sealed class AISrcSelWithRetCtxVal : IRagProcess
|
||||
{
|
||||
LOGGER.LogWarning("No data sources are selected. The RAG process is skipped.");
|
||||
proceedWithRAG = false;
|
||||
|
||||
//
|
||||
// When the user picked the sources, none of them survived the security and
|
||||
// confidence checks. That is worth saying out loud: the user chose them and
|
||||
// expects this answer to use them. When the AI picked instead, finding nothing
|
||||
// suitable for this prompt is a normal outcome and stays in the log.
|
||||
//
|
||||
if(!chatThread.DataSourceOptions.AutomaticDataSourceSelection)
|
||||
await MessageBus.INSTANCE.SendWarning(new(Icons.Material.Filled.Source, TB("None of your selected data sources is available for the chosen provider. This answer was created without them.")));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user