|
|
|
@@ -776,11 +776,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`;
|
|
|
|
factors.push('Einsteiger-Tool für komplexe Analyse - könnte funktionale Limitierungen haben');
|
|
|
|
factors.push('Einsteiger-Tool für komplexe Analyse - könnte funktionale Limitierungen haben');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Platform availability concerns
|
|
|
|
|
|
|
|
if (tool.platforms && tool.platforms.length === 1 && tool.platforms[0] === 'Windows' && /linux|unix|server/i.test(context.userQuery)) {
|
|
|
|
|
|
|
|
factors.push('Nur Windows-Tool bei möglicher Linux/Server-Umgebung - Plattform-Inkompatibilität');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Access and deployment concerns
|
|
|
|
// Access and deployment concerns
|
|
|
|
if (tool.type === 'software' && !isToolHosted(tool) && tool.accessType === 'download') {
|
|
|
|
if (tool.type === 'software' && !isToolHosted(tool) && tool.accessType === 'download') {
|
|
|
|
factors.push('Installation und Setup erforderlich');
|
|
|
|
factors.push('Installation und Setup erforderlich');
|
|
|
|
@@ -939,7 +934,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async evaluateSpecificTool(context: AnalysisContext, tool: any, rank: number): Promise<MicroTaskResult> {
|
|
|
|
private async evaluateSpecificTool(context: AnalysisContext, tool: any, rank: number): Promise<MicroTaskResult> {
|
|
|
|
// Get existing task relevance from previous phase selection
|
|
|
|
|
|
|
|
const existingSelection = context.selectedTools?.find(st => st.tool.name === tool.name);
|
|
|
|
const existingSelection = context.selectedTools?.find(st => st.tool.name === tool.name);
|
|
|
|
const taskRelevance = existingSelection?.taskRelevance || 70;
|
|
|
|
const taskRelevance = existingSelection?.taskRelevance || 70;
|
|
|
|
const priority = this.derivePriorityFromScore(taskRelevance);
|
|
|
|
const priority = this.derivePriorityFromScore(taskRelevance);
|
|
|
|
@@ -953,11 +947,10 @@ ${JSON.stringify(conceptsToSend, null, 2)}`;
|
|
|
|
detailed_explanation: 'Evaluation failed',
|
|
|
|
detailed_explanation: 'Evaluation failed',
|
|
|
|
implementation_approach: '',
|
|
|
|
implementation_approach: '',
|
|
|
|
pros: [],
|
|
|
|
pros: [],
|
|
|
|
cons: [],
|
|
|
|
limitations: [],
|
|
|
|
alternatives: ''
|
|
|
|
alternatives: ''
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Store evaluation without re-scoring
|
|
|
|
|
|
|
|
this.addToolToSelection(context, {
|
|
|
|
this.addToolToSelection(context, {
|
|
|
|
...tool,
|
|
|
|
...tool,
|
|
|
|
evaluation: {
|
|
|
|
evaluation: {
|
|
|
|
@@ -966,7 +959,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`;
|
|
|
|
task_relevance: taskRelevance
|
|
|
|
task_relevance: taskRelevance
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, 'evaluation', priority, evaluation.detailed_explanation,
|
|
|
|
}, 'evaluation', priority, evaluation.detailed_explanation,
|
|
|
|
taskRelevance, existingSelection?.limitations);
|
|
|
|
taskRelevance, evaluation.limitations);
|
|
|
|
|
|
|
|
|
|
|
|
this.addAuditEntry(context, 'micro-task', 'tool-evaluation',
|
|
|
|
this.addAuditEntry(context, 'micro-task', 'tool-evaluation',
|
|
|
|
{ toolName: tool.name, rank, existingTaskRelevance: taskRelevance, derivedPriority: priority },
|
|
|
|
{ toolName: tool.name, rank, existingTaskRelevance: taskRelevance, derivedPriority: priority },
|
|
|
|
@@ -974,11 +967,12 @@ ${JSON.stringify(conceptsToSend, null, 2)}`;
|
|
|
|
hasExplanation: !!evaluation.detailed_explanation,
|
|
|
|
hasExplanation: !!evaluation.detailed_explanation,
|
|
|
|
hasImplementationApproach: !!evaluation.implementation_approach,
|
|
|
|
hasImplementationApproach: !!evaluation.implementation_approach,
|
|
|
|
prosCount: evaluation.pros?.length || 0,
|
|
|
|
prosCount: evaluation.pros?.length || 0,
|
|
|
|
consCount: evaluation.cons?.length || 0
|
|
|
|
limitationsCount: evaluation.limitations?.length || 0, // ← Updated field name
|
|
|
|
|
|
|
|
hasLimitations: Array.isArray(evaluation.limitations) && evaluation.limitations.length > 0
|
|
|
|
},
|
|
|
|
},
|
|
|
|
70,
|
|
|
|
70,
|
|
|
|
Date.now() - result.processingTimeMs,
|
|
|
|
Date.now() - result.processingTimeMs,
|
|
|
|
{ toolType: tool.type, explanationOnly: true, priorityDerived: true }
|
|
|
|
{ toolType: tool.type, explanationOnly: true, priorityDerived: true, limitationsExtracted: true }
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1226,7 +1220,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`;
|
|
|
|
|
|
|
|
|
|
|
|
if (isWorkflow) {
|
|
|
|
if (isWorkflow) {
|
|
|
|
const recommendedToolsWithConfidence = context.selectedTools?.map(st => {
|
|
|
|
const recommendedToolsWithConfidence = context.selectedTools?.map(st => {
|
|
|
|
// Calculate enhanced confidence for each tool
|
|
|
|
|
|
|
|
const confidence = this.calculateRecommendationConfidence(
|
|
|
|
const confidence = this.calculateRecommendationConfidence(
|
|
|
|
st.tool,
|
|
|
|
st.tool,
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
@@ -1234,7 +1227,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`;
|
|
|
|
st.limitations || []
|
|
|
|
st.limitations || []
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
// Add audit entry for confidence calculation
|
|
|
|
|
|
|
|
this.addAuditEntry(context, 'validation', 'confidence-scoring',
|
|
|
|
this.addAuditEntry(context, 'validation', 'confidence-scoring',
|
|
|
|
{ toolName: st.tool.name, phase: st.phase },
|
|
|
|
{ toolName: st.tool.name, phase: st.phase },
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -1272,14 +1264,15 @@ ${JSON.stringify(conceptsToSend, null, 2)}`;
|
|
|
|
st.tool,
|
|
|
|
st.tool,
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
st.taskRelevance || 70,
|
|
|
|
st.taskRelevance || 70,
|
|
|
|
st.limitations || []
|
|
|
|
st.limitations || []
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
this.addAuditEntry(context, 'validation', 'confidence-scoring',
|
|
|
|
this.addAuditEntry(context, 'validation', 'confidence-scoring',
|
|
|
|
{ toolName: st.tool.name, rank: st.tool.evaluation?.rank || 1 },
|
|
|
|
{ toolName: st.tool.name, rank: st.tool.evaluation?.rank || 1 },
|
|
|
|
{
|
|
|
|
{
|
|
|
|
overall: confidence.overall,
|
|
|
|
overall: confidence.overall,
|
|
|
|
suitabilityAlignment: st.priority === 'high' && confidence.overall >= this.confidenceConfig.highThreshold
|
|
|
|
suitabilityAlignment: st.priority === 'high' && confidence.overall >= this.confidenceConfig.highThreshold,
|
|
|
|
|
|
|
|
limitationsUsed: st.limitations?.length || 0
|
|
|
|
},
|
|
|
|
},
|
|
|
|
confidence.overall,
|
|
|
|
confidence.overall,
|
|
|
|
Date.now(),
|
|
|
|
Date.now(),
|
|
|
|
@@ -1293,7 +1286,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`;
|
|
|
|
detailed_explanation: st.tool.evaluation?.detailed_explanation || '',
|
|
|
|
detailed_explanation: st.tool.evaluation?.detailed_explanation || '',
|
|
|
|
implementation_approach: st.tool.evaluation?.implementation_approach || '',
|
|
|
|
implementation_approach: st.tool.evaluation?.implementation_approach || '',
|
|
|
|
pros: st.tool.evaluation?.pros || [],
|
|
|
|
pros: st.tool.evaluation?.pros || [],
|
|
|
|
cons: st.tool.evaluation?.cons || [],
|
|
|
|
cons: st.tool.evaluation?.limitations || [], // ← FIXED: Use limitations as cons for display
|
|
|
|
alternatives: st.tool.evaluation?.alternatives || '',
|
|
|
|
alternatives: st.tool.evaluation?.alternatives || '',
|
|
|
|
confidence: confidence,
|
|
|
|
confidence: confidence,
|
|
|
|
recommendationStrength: confidence.overall >= this.confidenceConfig.highThreshold ? 'strong' :
|
|
|
|
recommendationStrength: confidence.overall >= this.confidenceConfig.highThreshold ? 'strong' :
|
|
|
|
|