fix(chat): clean квартирография rendering in chat prompt v2 (#957) #1179

Merged
bot-backend merged 1 commit from fix/chat-prompt-quartirografia-957 into main 2026-06-09 10:17:12 +00:00
Collaborator

Summary

Live LLM chat rendered the recommended квартирография as a garbled rank-hyphen-type list — 2-1-к, 3-2-к, 4-3-к, 5-80+ м² (= "rank 2: 1-к", …), which reads like junk codes. Fix: add rule 6 to chat_system@v2 — list квартирография/segments by clean TYPE (студия / 1-к / 2-к / 3-к / 80+ м²) + share %, no ordinal-number-hyphen-type concatenation. Bumped prompt version 1→2 (versioned-prompt convention; render() uses latest by name).

Data was always correct (numbers verbatim from the engine, §16) — this is purely the LLM's prose formatting.

Test plan

  • uv run pytest tests/services/llm/ tests/services/chat/ tests/api/v1/test_chat.py125 passed
  • new test locks chat_system version==2 + the formatting rule (anti-example «2-1-к») + that the core hard-rules survive
  • ruff + mypy clean
  • effect goes live on the next deploy (prompt is in the backend image); LLM chat then renders unit-mix cleanly.

Refs #957

## Summary Live LLM chat rendered the recommended квартирография as a garbled **rank-hyphen-type** list — `2-1-к`, `3-2-к`, `4-3-к`, `5-80+ м²` (= "rank 2: 1-к", …), which reads like junk codes. Fix: add **rule 6** to `chat_system@v2` — list квартирография/segments by clean TYPE (студия / 1-к / 2-к / 3-к / 80+ м²) + share %, no ordinal-number-hyphen-type concatenation. Bumped prompt version 1→2 (versioned-prompt convention; `render()` uses latest by name). Data was always correct (numbers verbatim from the engine, §16) — this is purely the LLM's prose formatting. ## Test plan - [x] `uv run pytest tests/services/llm/ tests/services/chat/ tests/api/v1/test_chat.py` → **125 passed** - [x] new test locks `chat_system` version==2 + the formatting rule (anti-example «2-1-к») + that the core hard-rules survive - [x] ruff + mypy clean - effect goes live on the next deploy (prompt is in the backend image); LLM chat then renders unit-mix cleanly. Refs #957
bot-backend added 1 commit 2026-06-09 10:07:56 +00:00
fix(chat): clean квартирография rendering in chat_system prompt (v2, #957)
All checks were successful
CI / frontend-tests (push) Has been skipped
CI / changes (push) Successful in 6s
CI / frontend-tests (pull_request) Has been skipped
CI / changes (pull_request) Successful in 6s
CI / backend-tests (pull_request) Successful in 6m24s
Deploy / build-frontend (push) Has been skipped
Deploy / build-worker (push) Successful in 3m5s
Deploy / deploy (push) Successful in 1m49s
CI / backend-tests (push) Successful in 6m24s
Deploy / changes (push) Successful in 5s
Deploy / build-backend (push) Successful in 2m8s
645b3c14a3
Live chat rendered the recommended unit-mix as a garbled rank-hyphen-type
list ("2-1-к", "3-2-к" = "rank 2: 1-к"). Add rule 6 to chat_system@v2:
list квартирография/segments by clean TYPE (студия / 1-к / 2-к / 3-к /
80+ м²) + share %, no ordinal-number-hyphen-type concatenation. Bumped
prompt version 1->2 (versioned-prompt convention). Test locks v2 + the rule.

Refs #957
bot-backend merged commit 645b3c14a3 into main 2026-06-09 10:17:12 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#1179
No description provided.