Implement Primary Topic Resolution in Path Logic
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m22s
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m22s
- Introduced `resolve_path_primary_topic` function to enhance the determination of primary topics from goal queries and semantic briefs, improving exercise relevance. - Updated `_match_roadmap_slot` and `detect_off_topic_steps` functions to utilize the new primary topic resolution logic, ensuring accurate topic identification. - Enhanced tests to validate the functionality of primary topic resolution and its impact on exercise selection and off-topic detection. - Improved handling of primary topics in the `ExerciseProgressionPathBuilder` and related components for better integration with the overall path-building process.
This commit is contained in:
1 parent
f63b09fc9c
commit
044ce2ee60
7 files changed
+128
-16
No files matched your search
@@ -46,6 +46,7 @@ from planning_exercise_semantics import (
|
||||
enrich_brief_with_path_constraints,
|
||||
enrich_target_with_semantic_expectations,
|
||||
resolve_path_anti_patterns,
|
||||
resolve_path_primary_topic,
|
||||
exercise_passes_path_semantic_gate,
|
||||
pick_best_path_hit,
|
||||
resolve_semantic_skill_weights,
|
||||
@@ -631,9 +632,17 @@ def _match_roadmap_slot(
|
||||
extra_context=path_context_note,
|
||||
)
|
||||
stage_anti = list(dict.fromkeys([*(stage_spec.anti_patterns or []), *path_anti]))
|
||||
path_primary = (semantic_brief.primary_topic or "").strip()
|
||||
path_primary = (
|
||||
resolve_path_primary_topic(
|
||||
goal_query,
|
||||
semantic_brief,
|
||||
stage_learning_goal=stage_goal,
|
||||
extra_context=path_context_note,
|
||||
)
|
||||
or ""
|
||||
).strip()
|
||||
path_tech_excludes = list(semantic_brief.exclude_phrases or [])
|
||||
if semantic_brief.topic_type == "technique" and path_primary:
|
||||
if path_primary:
|
||||
from planning_exercise_semantics import technique_sibling_excludes
|
||||
|
||||
for item in technique_sibling_excludes(path_primary):
|
||||
|
||||
Reference in new issue
Block a user