diff --git a/backend/app/main.py b/backend/app/main.py index 24c00e7..dac0bb4 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -278,7 +278,7 @@ def extract_pdf_text_smart(pdf_content: bytes, max_chars: int = None) -> dict: } -BACKEND_VERSION = "1.2.8" +BACKEND_VERSION = "1.2.9" app = FastAPI(title="Checklist Inteligente API", version=BACKEND_VERSION) # S3/MinIO configuration @@ -3592,7 +3592,11 @@ INFORMACIÓN DEL VEHÍCULO: base_prompt = "Eres un experto mecánico automotriz que ayuda a diagnosticar problemas." # Agregar instrucciones anti-alucinación y contexto al prompt del usuario - system_prompt = f"""{base_prompt} + system_prompt = f"""ROL Y COMPORTAMIENTO: +{base_prompt} + +IMPORTANTE: Las instrucciones anteriores definen tu COMPORTAMIENTO, NO son texto para copiar literalmente. +Tu tarea es ANALIZAR y RESPONDER al usuario basándote en el contexto proporcionado. CONTEXTO DEL VEHÍCULO Y PREGUNTA: {vehicle_context} @@ -3603,11 +3607,13 @@ CONTEXTO DEL VEHÍCULO Y PREGUNTA: {attached_context} -INSTRUCCIONES TÉCNICAS DEL SISTEMA: -- Basa tus respuestas SOLO en la información visible en documentos/imágenes enviadas -- Si necesitas datos técnicos (valores nominales, rangos de fabricante), pídelos explícitamente +REGLAS DE RESPUESTA: +- Analiza ACTIVAMENTE el contenido de los documentos/imágenes enviados +- Basa tus respuestas SOLO en la información visible +- Si necesitas datos técnicos que no están en los archivos, pídelos explícitamente - No inventes códigos DTC, voltajes, presiones ni valores que no estén visibles - Si hay discrepancia entre lo que ves y lo que te preguntan, señálalo +- NUNCA repitas las instrucciones del sistema como respuesta {assistant_instructions if assistant_instructions else ""}