fix: explicit percentage difference formula in aiService to correct mechanical calculations
This commit is contained in:
@@ -84,7 +84,7 @@ const reportSchema = {
|
||||
norm: { type: Type.STRING, description: "Valor exigido pela norma (ex: Mín: 350 MPa)." },
|
||||
certificate: { type: Type.STRING, description: "Valor encontrado no certificado." },
|
||||
status: { type: Type.STRING, enum: ["OK", "FALHA"], description: "Status da propriedade." },
|
||||
differencePercentage: { type: Type.STRING, description: "Calculated percentage difference compared to theoretical normative material (e.g., '+15%' or '-5%'). Only for mechanical properties." }
|
||||
differencePercentage: { type: Type.STRING, description: "Calculated percentage difference. MUST use strict formula: ((Certificate_Value - Norm_Value) / Norm_Value) * 100. E.g., if Norm=345 and Cert=404 -> '+17.1%'" }
|
||||
},
|
||||
required: ["property", "norm", "certificate", "status", "differencePercentage"]
|
||||
}
|
||||
@@ -162,7 +162,7 @@ Execute:
|
||||
1. Extração de Dados: Leia a imagem atentamente, respeitando as colunas.
|
||||
2. Identificação de Normas.
|
||||
3. Análise de Conformidade: Compare resultados x requisitos.
|
||||
4. Propriedades Mecânicas (mechanical): Calcule o "differencePercentage" (+X% ou -X%) em relação ao teórico.
|
||||
4. Propriedades Mecânicas (mechanical): Calcule o "differencePercentage" (+X.X% ou -X.X%). USE ESTRITAMENTE A FÓRMULA: ((Valor_Certificado - Valor_Norma) / Valor_Norma) * 100. Exemplo: Se a Norma exige Mínimo 345, e o Certificado acusa 404, o resultado é ((404-345)/345)*100 = +17.1%.
|
||||
5. Análise de Equivalência e Grau de Confiança.
|
||||
|
||||
Retorne APENAS o JSON, sem markdown. DEVE SER UM ARRAY DE OBJETOS:
|
||||
|
||||
Reference in New Issue
Block a user