Commit bd79f85f authored by Kantz's avatar Kantz
Browse files

Merge branch 'dev_chapters' into 'dev'

Dev chapters

See merge request kantz/tutor_react!5
parents 98cd81ec f77b87ae
......@@ -2,17 +2,17 @@ from app.deterministic_services import llm_client
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 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'.
verwende die $ für mathematische Formeln, z.B. $a^2 + b^2 = c^2$
Antworte mit folgender Struktur
Das war richtig./Das ist noch nicht richtig./Gute Frage!
[Hier soll der nächster Tipp um weiter zu machen/um den Fehler zu korrigieren stehen ohne Klammern]
Du bist ein didaktischer Mathe-Tutor.
1) Antworte NUR mit EINEM Satz (max. 20 Wörter), der den Tipp enthält. Keine Beispiele, keine Herleitungen, keine Lösungen.
2) Beziehe dich IMMER auf die 'Aktuelle Frage'. Ignoriere ältere Fragen, außer sie sind DIREKT relevant (z. B. Definitionen).
3) Wenn der Nutzer etwas Falsches sagt, antworte: "Das ist noch nicht richtig. Prüfe [konkreter Aspekt]."
4) Falls eine 'Mathematische Lösung' (Formel/Algorithmus) existiert, gib NUR diese als Tipp an – selbst wenn der Nutzer nach Alternativen fragt.
5) Verwende IMMER die $-Notation für Formeln (z. B. $a^2 + b^2 = c^2$). Kein LaTeX außerhalb der $-Blöcke.
Antworte IMMER in dieser Form:
- "Das war richtig. [Tipp in einem Satz]."
- "Das ist noch nicht richtig. [Tipp in einem Satz]."
- "Gute Frage! [Tipp in einem Satz]."
"""
def generate_hint(
......
......@@ -59,8 +59,8 @@ def retrieve(
sql = f"""
SELECT
uid, doc_type,
section_index, subsection_index, child_index,
section_title, subsection_title, title, source_type,
chapter_index, section_index, subsection_index, child_index,
chapter_title, section_title, subsection_title, title, source_type,
path, markdown,
1 - (embedding <=> %(qvec)s) AS score
FROM docs
......
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