abjasrees commited on
Commit
962ac80
·
verified ·
1 Parent(s): 0ba0181

Update hedis_engine.py

Browse files
Files changed (1) hide show
  1. hedis_engine.py +11 -4
hedis_engine.py CHANGED
@@ -31,14 +31,16 @@ class InteractiveHedisComplianceEngine:
31
  role="HEDIS Measure Expert",
32
  goal=(
33
  f"Provide accurate, official details for HEDIS measure {measure_code} "
34
- "including required tests, codes, timeframes, and exclusions."
 
35
  ),
36
  verbose=True,
37
  memory=False,
38
  tools=[], # design choice: no web/search tools here; rely on model knowledge
39
  backstory=(
40
  "Healthcare quality expert with deep knowledge of NCQA HEDIS specifications. "
41
- "Must compute concrete absolute date ranges given the measurement year."
 
42
  ),
43
  llm=self.model,
44
  )
@@ -88,8 +90,13 @@ class InteractiveHedisComplianceEngine:
88
  hedis_task_description += f"\n\nIncorporate these suggestions: {suggestions}\n"
89
 
90
  hedis_task_description += (
91
- "IMPORTANT: Return ONLY valid JSON without any markdown formatting, code blocks, or extra text. "
92
- "The response must start with { and end with } and be valid JSON that can be parsed directly."
 
 
 
 
 
93
  )
94
 
95
  hedis_task = Task(
 
31
  role="HEDIS Measure Expert",
32
  goal=(
33
  f"Provide accurate, official details for HEDIS measure {measure_code} "
34
+ "including required tests, codes, timeframes, and exclusions. "
35
+ "ALWAYS respond with valid JSON format only."
36
  ),
37
  verbose=True,
38
  memory=False,
39
  tools=[], # design choice: no web/search tools here; rely on model knowledge
40
  backstory=(
41
  "Healthcare quality expert with deep knowledge of NCQA HEDIS specifications. "
42
+ "Must compute concrete absolute date ranges given the measurement year. "
43
+ "CRITICAL: Always respond with properly formatted JSON without any markdown or extra text."
44
  ),
45
  llm=self.model,
46
  )
 
90
  hedis_task_description += f"\n\nIncorporate these suggestions: {suggestions}\n"
91
 
92
  hedis_task_description += (
93
+ "\n\nCRITICAL FORMATTING REQUIREMENTS:\n"
94
+ "- Return ONLY valid JSON without any markdown formatting, code blocks, or extra text\n"
95
+ "- Do not wrap the JSON in ```json``` blocks\n"
96
+ "- Do not add any explanatory text before or after the JSON\n"
97
+ "- The response must start with { and end with }\n"
98
+ "- Ensure all JSON keys and string values are properly quoted\n"
99
+ "- Example format: {\"measure\":\"...\",\"required_tests\":[...],\"codes\":{...}}"
100
  )
101
 
102
  hedis_task = Task(