From 57fdf2e1356b791fc981dab3182ddb0b4fc4f6ec Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sat, 31 Jan 2026 03:19:24 -0300 Subject: [PATCH] fix: pin snapshot context in system prompt --- atlasbot/llm/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/atlasbot/llm/client.py b/atlasbot/llm/client.py index 28c6d19..a987e4d 100644 --- a/atlasbot/llm/client.py +++ b/atlasbot/llm/client.py @@ -60,9 +60,10 @@ class LLMClient: def build_messages(system: str, prompt: str, *, context: str | None = None) -> list[dict[str, str]]: - messages: list[dict[str, str]] = [{"role": "system", "content": system}] + system_content = system if context: - messages.append({"role": "user", "content": "Context (grounded):\n" + context}) + system_content = system_content + "\n\nContext (grounded facts):\n" + context + messages: list[dict[str, str]] = [{"role": "system", "content": system_content}] messages.append({"role": "user", "content": prompt}) return messages