perf: fast-path de bienvenida + instrumentación de latencia (fase 0 + 1.1) - #11
Merged
Merged
Conversation
… 1.1) Fase 0 (instrumentar): el log de turno ahora incluye 'tools' (nº de tool-calls del agente) y 'fastPath', para ver qué turnos son model-bound vs tool-bound. Fase 1.1 (fast-path de saludos): si un usuario NUEVO (sesión vacía) solo saluda (hola/buenas/hi/hello/buenos días/start), ConversationService responde con una bienvenida precomputada + botones SIN invocar al modelo. Elimina el peor caso de latencia (un 'Hola' llegó a tardar 16 s -> ahora <1 s). Detección estricta (saludo puro) y solo en conversación nueva, para no perder contexto en curso. Tests 90->93 (detectGreeting, fast-path activo, fast-path NO en sesión con historial).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Primer paso del plan de latencia (incluido en el PR).
Fase 0 — Instrumentación
El log de cada turno ahora incluye
tools(nº de tool-calls del agente) yfastPath. Permite ver qué turnos son model-bound (0 tools y aun así lentos) vs tool-bound, para priorizar con datos.Fase 1.1 — Fast-path de bienvenida 🔥
Si un usuario nuevo (sesión vacía) solo saluda (
hola/buenas/hi/hello/buenos días/start),ConversationServiceresponde con una bienvenida precomputada + botones sin invocar al modelo. Elimina el peor caso de latencia (un "Hola" tardó 16 s → ahora <1 s), que era la causa nº1 de abandono (5/9 sesiones de un solo mensaje).buscar_ayuda…) iguales a los que ya maneja el agente.Verificación
tsclimpio · Tests 90→93 (detección de saludo, fast-path activo, y que NO se activa con historial).docs/.Pendiente de la Fase 1
OPENAI_MODEL) — se decide y aplica aparte para poder medir su efecto con la instrumentación de esta PR.