mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-08 13:49:40 +00:00
refactored confidence levels and ensured checks work
This commit is contained in:
1 parent
786b106096
commit
88999d985c
44 files changed
+324
-335
No files matched your search
@@ -38,8 +38,8 @@ public sealed class DataSourceLocalRetrievalService(
|
||||
string Text,
|
||||
double Score,
|
||||
int Rank,
|
||||
string ComplianceLevel,
|
||||
int ComplianceLevelRank);
|
||||
string ConfidenceLevel,
|
||||
int ConfidenceLevelRank);
|
||||
|
||||
public Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(DataSourceLocalFile dataSource, IContent lastUserPrompt, ChatThread thread, CancellationToken token = default) =>
|
||||
this.RetrieveDataAsync((IInternalDataSource)dataSource, lastUserPrompt, token);
|
||||
@@ -296,8 +296,8 @@ public sealed class DataSourceLocalRetrievalService(
|
||||
result.Text,
|
||||
result.Score,
|
||||
rank,
|
||||
result.ComplianceLevel,
|
||||
result.ComplianceLevelRank);
|
||||
result.ConfidenceLevel,
|
||||
result.ConfidenceLevelRank);
|
||||
|
||||
private static LocalRetrievalHit FromBm25Result(EmbeddingStateSearchResult result, int rank) =>
|
||||
new(
|
||||
@@ -316,8 +316,8 @@ public sealed class DataSourceLocalRetrievalService(
|
||||
result.ChunkText,
|
||||
result.Score,
|
||||
rank,
|
||||
result.ComplianceLevel,
|
||||
result.ComplianceLevelRank);
|
||||
result.ConfidenceLevel,
|
||||
result.ConfidenceLevelRank);
|
||||
|
||||
private static RetrievalTextContext ToRetrievalContext(LocalRetrievalHit hit)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user