experiment(confidence-engine): isolate reconstruction observation
This commit is contained in:
@@ -412,6 +412,26 @@ export async function startCase(body, dependencies = {}) {
|
||||
const graphReferenceValidation = validateGraphReferences(
|
||||
initialSituationGraph,
|
||||
);
|
||||
|
||||
if (dependencies.reconstructionOnly) {
|
||||
return {
|
||||
success: graphReferenceValidation.valid,
|
||||
summary: analysis.reconstruction?.summary ?? null,
|
||||
reconstruction: analysis.reconstruction,
|
||||
situationGraph: initialSituationGraph,
|
||||
selectedQuestion: null,
|
||||
diagnostics: buildDiagnostics({
|
||||
analysis,
|
||||
graph: initialSituationGraph,
|
||||
graphReferenceValidation,
|
||||
}),
|
||||
validationErrors: graphReferenceValidation.valid
|
||||
? undefined
|
||||
: graphReferenceValidation.errors,
|
||||
statusCode: graphReferenceValidation.valid ? 200 : 500,
|
||||
};
|
||||
}
|
||||
|
||||
const provider = dependencies.provider ?? getProvider();
|
||||
const modelName = dependencies.modelName ?? analysis?.modelName ?? null;
|
||||
const initialQuestionResult = await determineGraphBackedQuestion({
|
||||
|
||||
Reference in New Issue
Block a user