Commit 7286b57
fix(core): strengthen language control in aiDescribe prompt (#2067)
The previous prompt had "Use ${language}." appended to the first sentence,
which was ambiguous and easily overridden by the all-English few-shot
examples. This change:
- Separates the language instruction into a standalone "IMPORTANT" directive
- Adds a redundant reminder in the GUIDELINES section
- Provides Chinese examples when preferredLanguage is Chinese, so the
few-shot signal aligns with the language instruction
https://claude.ai/code/session_01A2hhpJ74in5M6cL2Qj2HrR
Co-authored-by: Claude <noreply@anthropic.com>1 parent 02f12fe commit 7286b57
File tree
2 files changed
+33
-7
lines changed- packages/core
- src/ai-model/prompt
- tests/unit-test/prompt/__snapshots__
2 files changed
+33
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
3 | 25 | | |
| 26 | + | |
| 27 | + | |
4 | 28 | | |
5 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
6 | 32 | | |
7 | 33 | | |
8 | 34 | | |
| |||
28 | 54 | | |
29 | 55 | | |
30 | 56 | | |
| 57 | + | |
31 | 58 | | |
32 | 59 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 60 | + | |
38 | 61 | | |
39 | 62 | | |
40 | 63 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
0 commit comments