Cambios realizados v1.2.9:
Mejoré la estructura del system prompt para evitar que la IA repita literalmente las instrucciones del
This commit is contained in:
@@ -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)
|
app = FastAPI(title="Checklist Inteligente API", version=BACKEND_VERSION)
|
||||||
|
|
||||||
# S3/MinIO configuration
|
# 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."
|
base_prompt = "Eres un experto mecánico automotriz que ayuda a diagnosticar problemas."
|
||||||
|
|
||||||
# Agregar instrucciones anti-alucinación y contexto al prompt del usuario
|
# 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:
|
CONTEXTO DEL VEHÍCULO Y PREGUNTA:
|
||||||
{vehicle_context}
|
{vehicle_context}
|
||||||
@@ -3603,11 +3607,13 @@ CONTEXTO DEL VEHÍCULO Y PREGUNTA:
|
|||||||
|
|
||||||
{attached_context}
|
{attached_context}
|
||||||
|
|
||||||
INSTRUCCIONES TÉCNICAS DEL SISTEMA:
|
REGLAS DE RESPUESTA:
|
||||||
- Basa tus respuestas SOLO en la información visible en documentos/imágenes enviadas
|
- Analiza ACTIVAMENTE el contenido de los documentos/imágenes enviados
|
||||||
- Si necesitas datos técnicos (valores nominales, rangos de fabricante), pídelos explícitamente
|
- 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
|
- 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
|
- 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 ""}
|
{assistant_instructions if assistant_instructions else ""}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user