Skip to content

fix(ai): set the answer format by example - #684

Merged
Reversean merged 4 commits into
masterfrom
fix/ai-answer-template
Oct 30, 2026
Merged

Reversean merged 4 commits into
masterfrom
fix/ai-answer-template

Conversation

@Reversean

@Reversean Reversean commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

The answer format was a template of bracketed placeholders, so the model copied it instead of filling it in..

Before and after, the first line of an answer:

[Краткое summary]
Страница корзины падает у всех, чья сессия истекла: сервер отвечает объектом ошибки, а код принимает ответ за список товаров и вызывает у него `map`.

Steps, markup instructions and examples was refactored in dedicated sections following OpenAI Prompt guide.

Comment thread src/services/askAi/instructions/cto.ts Resolved
Comment thread src/services/askAi/instructions/cto.ts Resolved
Comment thread src/services/askAi/instructions/cto.ts Resolved
Reversean and others added 4 commits October 28, 2026 18:25
The system instruction gives the answer format as a template of bracketed placeholders, and the model copies them instead of filling them in: on four fabricated events the old instruction opened every answer with the literal "[Краткое summary]".

The format is now one filled example, kept inside a tag so it reads as a sample rather than as part of the conversation, and the rules say what the answer contains instead of what it must not do. Forbidding the copying was the alternative, but it leaves the placeholders in front of the model. On the same four events an example-based instruction opened every answer with a sentence about the error itself and kept all three section headings.

The example is written in the markup the rules ask for: identifiers in backticks, multi-line code in a fenced block between list items. The rules never mentioned inline code, and answers came back with identifiers as plain words and without code blocks.

Everything outside the example is in English, the language of the spotlighting rules it is concatenated with. The example carries the language of the answer.
@Reversean
Reversean force-pushed the fix/ai-answer-template branch from fc1387f to 66e4970 Compare October 28, 2026 17:47
@Reversean
Reversean merged commit 6dbeda0 into master Oct 30, 2026
7 checks passed
@Reversean
Reversean deleted the fix/ai-answer-template branch October 30, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants