Implement Phase B Enhancements for Planning Exercise Profiles
Test Suite / playwright-tests (push) Waiting to run
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 41s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Has been cancelled
Test Suite / playwright-tests (push) Waiting to run
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 41s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Has been cancelled
- Added support for section guidance notes and titles in the planning target profile, enabling richer context for exercise suggestions. - Introduced deterministic text-to-catalog signal mapping, allowing for improved integration of planning text signals into the exercise retrieval process. - Implemented a partner-related filter in exercise retrieval, enhancing the relevance of suggested exercises based on user intent. - Updated the retrieval phase to account for text signals, improving the accuracy of exercise recommendations. - Incremented version to 0.8.181 and updated changelog to reflect these significant enhancements in planning AI capabilities.
This commit is contained in:
1 parent
46fae3da33
commit
a0a891e550
8 files changed
+328
-4
No files matched your search
@@ -0,0 +1,7 @@
|
||||
"""Tests Partner-Filter im Planungs-Retrieval."""
|
||||
from planning_exercise_retrieval import _exercise_looks_partner_related
|
||||
|
||||
|
||||
def test_exercise_partner_heuristic():
|
||||
assert _exercise_looks_partner_related({"title": "Partner-Fangspiel", "summary": ""})
|
||||
assert not _exercise_looks_partner_related({"title": "Kihon Solo", "summary": "Allein"})
|
||||
@@ -0,0 +1,47 @@
|
||||
"""Tests Phase B: Text-Signale für PlanningTargetProfile."""
|
||||
from planning_exercise_text_signals import resolve_planning_text_to_catalog_weights
|
||||
|
||||
|
||||
def test_resolve_planning_text_matches_skill_and_partner_hint():
|
||||
class _Cur:
|
||||
def execute(self, sql, params=None):
|
||||
self._sql = sql
|
||||
|
||||
def fetchall(self):
|
||||
sql = getattr(self, "_sql", "")
|
||||
if "FROM skills" in sql:
|
||||
return [
|
||||
{"id": 5, "name": "Kime"},
|
||||
{"id": 8, "name": "Schnellkraft"},
|
||||
{"id": 2, "name": "Ab"},
|
||||
]
|
||||
if "FROM focus_areas" in sql:
|
||||
return [{"id": 10, "name": "Karate Technik"}]
|
||||
if "FROM style_directions" in sql:
|
||||
return []
|
||||
if "FROM training_types" in sql:
|
||||
return []
|
||||
if "FROM target_groups" in sql:
|
||||
return [{"id": 3, "name": "Partnerübung"}]
|
||||
return []
|
||||
|
||||
focus, style, tt, tg, skills = resolve_planning_text_to_catalog_weights(
|
||||
_Cur(),
|
||||
"Abschnitt: Kime vertiefen mit Partnerübung",
|
||||
)
|
||||
assert skills.get(5, 0) > 0
|
||||
assert 8 not in skills
|
||||
assert tg.get(3, 0) > 0
|
||||
assert not style and not tt
|
||||
|
||||
|
||||
def test_resolve_planning_text_empty():
|
||||
class _Cur:
|
||||
def execute(self, sql, params=None):
|
||||
pass
|
||||
|
||||
def fetchall(self):
|
||||
return []
|
||||
|
||||
focus, style, tt, tg, skills = resolve_planning_text_to_catalog_weights(_Cur(), " ")
|
||||
assert not focus and not skills
|
||||
Reference in new issue
Block a user