remove some env vars
This commit is contained in:
@@ -26,7 +26,7 @@ export interface AuditEntry {
|
||||
completionTokens?: number;
|
||||
toolsDataHash?: string;
|
||||
embeddingsUsed?: boolean;
|
||||
selectionMethod?: string;
|
||||
//selectionMethod?: string;
|
||||
microTaskType?: string;
|
||||
confidenceFactors?: string[];
|
||||
reasoning?: string;
|
||||
@@ -146,7 +146,7 @@ class AuditService {
|
||||
addToolSelection(
|
||||
selectedTools: string[],
|
||||
availableTools: string[],
|
||||
selectionMethod: string,
|
||||
//selectionMethod: string,
|
||||
confidence: number,
|
||||
startTime: number,
|
||||
metadata: Record<string, any> = {}
|
||||
@@ -154,17 +154,22 @@ class AuditService {
|
||||
const calculatedConfidence = this.calculateSelectionConfidence(
|
||||
selectedTools,
|
||||
availableTools,
|
||||
selectionMethod,
|
||||
//selectionMethod,
|
||||
metadata
|
||||
);
|
||||
|
||||
const decisionBasis =
|
||||
metadata.embeddingsUsed || metadata.similarityScores
|
||||
? 'semantic-search'
|
||||
: (metadata.aiPrompt || metadata.microTaskType ? 'ai-analysis' : 'rule-based');
|
||||
|
||||
this.addEntry(
|
||||
'tool-selection',
|
||||
'selection-decision',
|
||||
{
|
||||
availableTools: availableTools.slice(0, 10),
|
||||
totalAvailable: availableTools.length,
|
||||
selectionMethod: selectionMethod
|
||||
//selectionMethod: selectionMethod
|
||||
},
|
||||
{
|
||||
selectedTools: selectedTools,
|
||||
@@ -174,10 +179,11 @@ class AuditService {
|
||||
startTime,
|
||||
{
|
||||
...metadata,
|
||||
selectionMethod,
|
||||
//selectionMethod,
|
||||
availableToolsCount: availableTools.length,
|
||||
selectedToolsCount: selectedTools.length,
|
||||
decisionBasis: selectionMethod.includes('embeddings') ? 'semantic-search' : 'ai-analysis'
|
||||
//decisionBasis: selectionMethod.includes('embeddings') ? 'semantic-search' : 'ai-analysis'
|
||||
decisionBasis
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -282,7 +288,7 @@ class AuditService {
|
||||
private calculateSelectionConfidence(
|
||||
selectedTools: string[],
|
||||
availableTools: string[],
|
||||
selectionMethod: string,
|
||||
//selectionMethod: string,
|
||||
metadata: Record<string, any>
|
||||
): number {
|
||||
let confidence = 50;
|
||||
@@ -297,9 +303,9 @@ class AuditService {
|
||||
confidence -= 20;
|
||||
}
|
||||
|
||||
if (selectionMethod.includes('embeddings')) {
|
||||
/*if (selectionMethod.includes('embeddings')) {
|
||||
confidence += 15;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (selectedTools.length >= 5 && selectedTools.length <= 25) {
|
||||
confidence += 10;
|
||||
@@ -589,7 +595,8 @@ class AuditService {
|
||||
}
|
||||
|
||||
private inferDecisionBasis(metadata: Record<string, any>): string {
|
||||
if (metadata.embeddingsUsed || metadata.selectionMethod?.includes('embeddings')) return 'semantic-search';
|
||||
if (metadata.embeddingsUsed) return 'semantic-search';
|
||||
//if (metadata.embeddingsUsed || metadata.selectionMethod?.includes('embeddings')) return 'semantic-search';
|
||||
if (metadata.aiPrompt || metadata.microTaskType) return 'ai-analysis';
|
||||
if (metadata.semanticQuery && metadata.aiReasoningUsed) return 'hybrid';
|
||||
return 'rule-based';
|
||||
|
||||
Reference in New Issue
Block a user