Refactor Planning Exercise Suggestion and Enhance LLM Integration
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 40s
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 1m16s
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 40s
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 1m16s
- Replaced the previous exercise matching logic with a new multistage planning retrieval process, improving the accuracy of exercise suggestions. - Introduced LLM gates to limit LLM calls based on query length and intent application, optimizing performance and resource usage. - Updated the `compose_retrieval_phase` function to include profile preselection, enhancing the retrieval process. - Incremented version to 0.5.0 and updated changelog to reflect these significant enhancements in planning AI capabilities.
This commit is contained in:
1 parent
b0611b9f7f
commit
8e68261bc1
6 files changed
+756
-275
No files matched your search
@@ -44,11 +44,40 @@ def test_should_skip_llm_for_preset():
|
||||
)
|
||||
|
||||
|
||||
def test_should_skip_llm_intent_short_free_search():
|
||||
from planning_exercise_target_pipeline import SCENARIO_FREE_SEARCH, should_run_llm_intent_pipeline
|
||||
|
||||
assert not should_run_llm_intent_pipeline(
|
||||
"Partnerübung",
|
||||
SCENARIO_FREE_SEARCH,
|
||||
include_llm_intent=True,
|
||||
)
|
||||
|
||||
|
||||
def test_should_skip_llm_rank_when_intent_already_applied():
|
||||
from planning_exercise_target_pipeline import SCENARIO_ADDITIVE, should_run_llm_rank_pipeline
|
||||
|
||||
hits = [{"score": 0.5}, {"score": 0.48}, {"score": 0.47}, {"score": 0.46}]
|
||||
assert not should_run_llm_rank_pipeline(
|
||||
"Baut auf dem Plan auf und trainiert zusätzlich Schnellkraft mit Partner",
|
||||
SCENARIO_ADDITIVE,
|
||||
include_llm_rank=True,
|
||||
query_intent_applied=True,
|
||||
hits=hits,
|
||||
)
|
||||
|
||||
|
||||
def test_compose_retrieval_phase():
|
||||
assert compose_retrieval_phase(query_intent=False, llm_rank=False) == "profile_v1"
|
||||
assert compose_retrieval_phase(query_intent=True, llm_rank=True) == "profile_v1+query_intent+llm_rank"
|
||||
|
||||
|
||||
assert (
|
||||
compose_retrieval_phase(profile_preselect=True, query_intent=True, llm_rank=False)
|
||||
== "profile_v1+profile_preselect+query_intent"
|
||||
)
|
||||
|
||||
|
||||
def test_parse_planning_query_intent_response():
|
||||
parsed = parse_planning_query_intent_response(
|
||||
'{"intent":"continue_plan_goal","scenario":"additive_constraint",'
|
||||
|
||||
Reference in new issue
Block a user