Enhance Planning Exercise Path Builder and Retrieval Logic
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) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m23s
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) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m23s
- Updated the path selection logic to incorporate semantic gating, ensuring only relevant exercises are considered based on semantic scores. - Introduced new functions for building path target profiles and resolving semantic skill weights, enhancing the contextual understanding of exercise suggestions. - Improved the retrieval process by applying dynamic retrieval weights based on semantic strength, refining the accuracy of exercise recommendations. - Incremented version to 0.8.188 and updated changelog to document these enhancements in planning AI functionality.
This commit is contained in:
1 parent
c2c736dafc
commit
5b73d1a1f5
6 files changed
+333
-73
No files matched your search
@@ -1,17 +1,25 @@
|
||||
"""Tests Planungs-KI Phase E — Pfad-QA."""
|
||||
from planning_exercise_path_builder import _pick_best_path_hit
|
||||
from planning_exercise_semantics import build_semantic_brief
|
||||
from planning_exercise_path_qa import apply_llm_path_reorder
|
||||
|
||||
|
||||
def test_pick_best_path_hit_prefers_semantic_score():
|
||||
brief = build_semantic_brief("Mae Geri Perfektion")
|
||||
hits = [
|
||||
{"id": 1, "title": "Mawashi", "score": 0.9, "semantic_score": 0.1},
|
||||
{"id": 2, "title": "Mae Geri", "score": 0.75, "semantic_score": 0.85},
|
||||
]
|
||||
chosen = _pick_best_path_hit(hits, set())
|
||||
chosen = _pick_best_path_hit(hits, set(), semantic_brief=brief)
|
||||
assert chosen["id"] == 2
|
||||
|
||||
|
||||
def test_pick_best_path_hit_skips_off_topic_when_gate():
|
||||
brief = build_semantic_brief("Mae Geri")
|
||||
hits = [{"id": 1, "title": "Kumite Grundstellung", "score": 0.9, "semantic_score": 0.05}]
|
||||
assert _pick_best_path_hit(hits, set(), semantic_brief=brief) is None
|
||||
|
||||
|
||||
def test_pick_best_path_hit_skips_used():
|
||||
hits = [{"id": 1, "title": "A", "score": 0.5, "semantic_score": 0.5}]
|
||||
assert _pick_best_path_hit(hits, {1}) is None
|
||||
|
||||
Reference in new issue
Block a user