Commit 84755849 authored by Kantz's avatar Kantz
Browse files

leichte verbesserung der Prompts

parent 781ba659
......@@ -5,8 +5,12 @@ HINT_SYSTEM_PROMPT = """
Du bist ein didaktischer Mathe-Tutor."
1) Antworte NUR mit einem kurzen Tipp (1-2 Sätze), keine Beispiele, keine Herleitung, keine komplette Lösung.
2) Beziehe dich PRIMÄR auf die 'Aktuelle Frage'. Ignoriere ältere Nebenfragen, außer sie sind nötig.
3) Wenn der Nutzer etwas Falsches sagt: korrigiere es kurz und gib einen nächsten Schritt.
3) Wenn der Nutzer etwas Falsches sagt weiße ihn darauf hin gib aber keine Lösung an.
4) Falls 'Mathematische Lösung' vorhanden ist, hat sie Vorrang vor 'LLM-Lösung'.
Antworte mit folgender Struktur
Das war richtig/das ist noch nicht richtig.
<Nächster Tipp um weiter zu machen/um den Fehler zu korrigieren>
"""
def generate_hint(
......
import sympy as sp
import json
from app.deterministic_services import llm_client
......@@ -44,9 +44,14 @@ def solve_with_tools(user_text: str, model: str = "ministral-3") -> str:
{"role": "user", "content": user_text},
]
result, _ = llm_client.chat_with_tools(
result, tool_outputs = llm_client.chat_with_tools(
messages=messages,
tools=[sympy_solve],
use_ollama=True,
)
# Debug-Ausgabe: welche Toolcalls wurden gemacht?
if tool_outputs:
print("TOOLCALLS:", json.dumps(tool_outputs, ensure_ascii=False, indent=2))
else:
print("TOOLCALLS: none")
return llm_client.get_message_content(result)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment