fix(deepseek): adaptive conseil_nclc based on score vs NCLC target
- 4 tiers: exceeded / reached / close / far from target - Applied to both EE and EO correction prompts Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c35727410c
commit
13aacf4d38
1 changed files with 38 additions and 0 deletions
|
|
@ -169,6 +169,40 @@ const TASK_DESCRIPTIONS: Record<TacheCorrection, string> = {
|
||||||
"T3 — Expression d'un point de vue spontané (4 minutes 30) : exprimer et défendre un point de vue sur une question, illustrer par des exemples concrets, organiser l'argumentation, conclure. Registre courant à standard.",
|
"T3 — Expression d'un point de vue spontané (4 minutes 30) : exprimer et défendre un point de vue sur une question, illustrer par des exemples concrets, organiser l'argumentation, conclure. Registre courant à standard.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bloc de règles pour `conseil_nclc` — Sprint 4b.3.
|
||||||
|
*
|
||||||
|
* Sans ce bloc, DeepSeek génère un conseil_nclc identique quel que soit le
|
||||||
|
* score (ex. un 18/20 reçoit « vous pouvez atteindre NCLC 9 » alors qu'il
|
||||||
|
* l'a déjà dépassé). On force 4 paliers basés sur l'écart score / minScore
|
||||||
|
* de la cible pour différencier les cas.
|
||||||
|
*
|
||||||
|
* `quoteStyle` : 'double' pour les prompts EE (qui utilisent ") ;
|
||||||
|
* 'single' pour les prompts EO (qui utilisent ' pour le JSON strict —
|
||||||
|
* cf. consigne Sprint 4a).
|
||||||
|
*/
|
||||||
|
function buildConseilNclcRulesBlock(
|
||||||
|
nclcCible: NclcCible,
|
||||||
|
minScore: number,
|
||||||
|
quoteStyle: "single" | "double",
|
||||||
|
): string {
|
||||||
|
const q = quoteStyle === "single" ? "'" : '"';
|
||||||
|
const upper = Math.min(nclcCible + 1, 10);
|
||||||
|
return `RÈGLES DE GÉNÉRATION DE ${q}conseil_nclc${q} (à respecter strictement) :
|
||||||
|
- Si ${q}score${q} >= ${minScore + 2}/20 (objectif NCLC ${nclcCible} largement dépassé) :
|
||||||
|
${q}ecart${q} = ${q}objectif dépassé : tu vises plutôt NCLC ${upper}${q}
|
||||||
|
${q}action_prioritaire${q} = félicitations + ce qu'il faut maintenir pour viser un cran au-dessus.
|
||||||
|
- Si ${q}score${q} >= ${minScore}/20 (NCLC ${nclcCible} atteint) :
|
||||||
|
${q}ecart${q} = ${q}objectif NCLC ${nclcCible} atteint${q}
|
||||||
|
${q}action_prioritaire${q} = félicitations + 1 point ciblé à consolider pour stabiliser.
|
||||||
|
- Si ${q}score${q} >= ${minScore - 2}/20 (proche de la cible) :
|
||||||
|
${q}ecart${q} = ${q}manque X points pour atteindre NCLC ${nclcCible}${q} (X = ${minScore} − score réel)
|
||||||
|
${q}action_prioritaire${q} = encouragement + 1-2 leviers prioritaires concrets.
|
||||||
|
- Si ${q}score${q} < ${minScore - 2}/20 (loin de la cible) :
|
||||||
|
${q}ecart${q} = ${q}manque significatif (cible NCLC ${nclcCible} = ${minScore}/20)${q}
|
||||||
|
${q}action_prioritaire${q} = plan d'action prioritaire en 2-3 étapes, ton bienveillant.`;
|
||||||
|
}
|
||||||
|
|
||||||
// ── Prompts builders ─────────────────────────────────────────────────────
|
// ── Prompts builders ─────────────────────────────────────────────────────
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -201,6 +235,8 @@ CRITÈRES OFFICIELS TCF (chacun noté de 0 à 5) :
|
||||||
|
|
||||||
${taxonomySection}
|
${taxonomySection}
|
||||||
|
|
||||||
|
${buildConseilNclcRulesBlock(nclcCible, minScore, "double")}
|
||||||
|
|
||||||
FORMAT DE RÉPONSE (JSON strict, aucun autre texte) :
|
FORMAT DE RÉPONSE (JSON strict, aucun autre texte) :
|
||||||
{
|
{
|
||||||
"score": <entier 0-20, somme des 4 critères>,
|
"score": <entier 0-20, somme des 4 critères>,
|
||||||
|
|
@ -928,6 +964,8 @@ CRITÈRES OFFICIELS TCF Canada — Expression Orale (chacun noté 0 à 5) :
|
||||||
|
|
||||||
${taxonomySection}
|
${taxonomySection}
|
||||||
|
|
||||||
|
${buildConseilNclcRulesBlock(nclcCible, minScore, "single")}
|
||||||
|
|
||||||
FORMAT DE RÉPONSE (JSON strict, aucun autre texte) :
|
FORMAT DE RÉPONSE (JSON strict, aucun autre texte) :
|
||||||
{
|
{
|
||||||
'score': <entier 0-20, somme des 4 critères>,
|
'score': <entier 0-20, somme des 4 critères>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue