Commit 57bf4d2
committed
refactor(@angular/cli): harden zoneless migration ranking prompt
The LLM prompt used in the zoneless migration tool to rank component files has been hardened to improve security and reliability.
The new prompt provides more explicit instructions to the LLM by:
- Clearly defining its specialized role as a code analysis assistant.
- Using XML tags to separate instructions from the file path data.
- Explicitly instructing the LLM to treat file paths as literal data and not to interpret them as commands.
- Adding a heuristic to improve the quality of the ranking.
This change reduces the risk of prompt injection and improves the overall robustness of the tool.1 parent 8f8f930 commit 57bf4d2
1 file changed
Lines changed: 9 additions & 6 deletions
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
180 | | - | |
| 182 | + | |
| 183 | + | |
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
| |||
0 commit comments