Refactor Planning Exercise Retrieval and Suggestion Logic
Deploy Development / deploy (push) Successful in 39s
Test Suite / pytest-backend (push) Successful in 39s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m12s

- Updated the planning exercise retrieval process to implement a multistage approach, ranking the entire visible library deterministically against the expectation profile.
- Removed the previous profile OR pool mechanism, simplifying the retrieval logic and ensuring full-text search is only used as a scoring signal.
- Adjusted the `compose_retrieval_phase` function to accommodate the new full library ranking strategy.
- Incremented version to 0.8.177 and updated changelog to reflect these changes in planning exercise capabilities.
This commit is contained in:
Lars committed 2026-05-23 06:35:45 +02:00
1 parent a8633235f2
commit d1d8539b42
6 files changed
+208 -259

No files matched your search

+5 -4
View File
@@ -629,7 +629,7 @@ def suggest_planning_exercises(
effective_club_id=tenant.effective_club_id,
)
hits, skills_by_ex, profile_preselect_applied = run_multistage_planning_retrieval(
hits, skills_by_ex, full_library_ranked = run_multistage_planning_retrieval(
cur,
vis_sql=vis_sql,
vis_params=vis_params,
@@ -645,7 +645,7 @@ def suggest_planning_exercises(
llm_rank_applied = False
retrieval_phase = compose_retrieval_phase(
profile_preselect=profile_preselect_applied,
full_library=full_library_ranked,
query_intent=query_intent_applied,
llm_expectation=llm_expectation_applied,
llm_rank=False,
@@ -680,7 +680,7 @@ def suggest_planning_exercises(
)
if llm_rank_applied:
retrieval_phase = compose_retrieval_phase(
profile_preselect=profile_preselect_applied,
full_library=full_library_ranked,
query_intent=query_intent_applied,
llm_expectation=llm_expectation_applied,
llm_rank=True,
@@ -718,7 +718,8 @@ def suggest_planning_exercises(
"scenario_kind": scenario_kind,
"query_intent_summary": query_intent_summary,
"retrieval_phase": retrieval_phase,
"profile_preselect_applied": profile_preselect_applied,
"full_library_ranked": full_library_ranked,
"profile_preselect_applied": False,
"llm_rank_applied": llm_rank_applied,
"llm_intent_applied": query_intent_applied,
"llm_expectation_applied": llm_expectation_applied,