Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
math_tutor_dev
public_math_tutor
Commits
84755849
Commit
84755849
authored
Feb 13, 2026
by
Kantz
Browse files
leichte verbesserung der Prompts
parent
781ba659
Changes
2
Hide whitespace changes
Inline
Side-by-side
math-tutor/backend/app/LLM_services/hint_LLM.py
View file @
84755849
...
@@ -5,8 +5,12 @@ HINT_SYSTEM_PROMPT = """
...
@@ -5,8 +5,12 @@ HINT_SYSTEM_PROMPT = """
Du bist ein didaktischer Mathe-Tutor."
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.
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.
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'.
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
(
def
generate_hint
(
...
...
math-tutor/backend/app/LLM_services/math_intent_LLM.py
View file @
84755849
import
sympy
as
sp
import
sympy
as
sp
import
json
from
app.deterministic_services
import
llm_client
from
app.deterministic_services
import
llm_client
...
@@ -44,9 +44,14 @@ def solve_with_tools(user_text: str, model: str = "ministral-3") -> str:
...
@@ -44,9 +44,14 @@ def solve_with_tools(user_text: str, model: str = "ministral-3") -> str:
{
"role"
:
"user"
,
"content"
:
user_text
},
{
"role"
:
"user"
,
"content"
:
user_text
},
]
]
result
,
_
=
llm_client
.
chat_with_tools
(
result
,
tool_outputs
=
llm_client
.
chat_with_tools
(
messages
=
messages
,
messages
=
messages
,
tools
=
[
sympy_solve
],
tools
=
[
sympy_solve
],
use_ollama
=
True
,
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
)
return
llm_client
.
get_message_content
(
result
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment