Enhance Planning Exercise Functionality and LLM Integration
Deploy Development / deploy (push) Successful in 41s
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 1m15s

- Added support for the new planning exercise expectation profile slug in the AI prompt runtime.
- Refactored SQL parameter handling in the planning exercise retrieval process to ensure correct binding for full-text search.
- Updated the planning exercise suggestion logic to incorporate LLM expectation handling, improving the accuracy of exercise recommendations.
- Introduced new functions to determine when to run the LLM expectation pipeline, enhancing the decision-making process for exercise suggestions.
- Incremented version to 0.8.176 and updated changelog to reflect these enhancements in planning AI capabilities.
This commit is contained in:
Lars committed 2026-05-22 23:08:53 +02:00
1 parent 04cc77d501
commit 5c882985e0
10 files changed
+332 -15

No files matched your search

+7
View File
@@ -617,6 +617,8 @@ def suggest_planning_exercises(
weights = _intent_weights(intent)
target_profile_summary = target_profile.to_summary_dict(cur)
query_intent_applied = bool(query_intent_summary.get("llm_applied"))
llm_expectation_applied = bool(query_intent_summary.get("llm_expectation_applied"))
profile_llm_applied = bool(query_intent_summary.get("profile_llm_applied"))
profile_id = tenant.profile_id
role = tenant.global_role
@@ -645,6 +647,7 @@ def suggest_planning_exercises(
retrieval_phase = compose_retrieval_phase(
profile_preselect=profile_preselect_applied,
query_intent=query_intent_applied,
llm_expectation=llm_expectation_applied,
llm_rank=False,
)
run_llm_rank = should_run_llm_rank_pipeline(
@@ -652,6 +655,7 @@ def suggest_planning_exercises(
scenario_kind,
include_llm_rank=body.include_llm_rank,
query_intent_applied=query_intent_applied,
llm_expectation_applied=llm_expectation_applied,
hits=hits,
)
if run_llm_rank:
@@ -678,6 +682,7 @@ def suggest_planning_exercises(
retrieval_phase = compose_retrieval_phase(
profile_preselect=profile_preselect_applied,
query_intent=query_intent_applied,
llm_expectation=llm_expectation_applied,
llm_rank=True,
)
tail = hits[pre_limit:]
@@ -716,6 +721,8 @@ def suggest_planning_exercises(
"profile_preselect_applied": profile_preselect_applied,
"llm_rank_applied": llm_rank_applied,
"llm_intent_applied": query_intent_applied,
"llm_expectation_applied": llm_expectation_applied,
"profile_llm_applied": profile_llm_applied,
"intent_resolved": intent,
"intent_heuristic": heuristic_intent,
"query_normalized": query or None,