Merged in bugfix/code_breakout_rev (pull request #739)
bugfix/code_breakout_rev to main * added methodology to code explicit * pipeline fixes * Merged main into bugfix/code_breakout_rev * Remove prints Approved-by: Katon Minhas
This commit is contained in:
committed by
Katon Minhas
parent
f736bde987
commit
775d7eb1fb
@@ -78,7 +78,7 @@ def get_regex_answers(service, code_answer_dict):
|
||||
return code_answer_dict
|
||||
|
||||
|
||||
def code_explicit(service, filename):
|
||||
def code_explicit(service, methodology, filename):
|
||||
"""
|
||||
Processes a service string and invokes a language model to generate a response
|
||||
based on the provided primary questions. The response is then parsed into a
|
||||
@@ -100,7 +100,7 @@ def code_explicit(service, filename):
|
||||
file_path=config.FIELD_JSON_PATH, field_type="code_primary_breakout"
|
||||
).print_prompt_dict()
|
||||
claude_answer_raw = llm_utils.invoke_claude(
|
||||
prompt_templates.CODE_EXPLICIT(service, code_primary_questions),
|
||||
prompt_templates.CODE_EXPLICIT(service, methodology, code_primary_questions),
|
||||
"sonnet_latest",
|
||||
filename,
|
||||
)
|
||||
@@ -531,6 +531,8 @@ def extract_codes_from_service(answer_dict, constants: Constants):
|
||||
service, bill_type = answer_dict.get("SERVICE_TERM"), answer_dict.get(
|
||||
"BILL_TYPE_CD_DESC"
|
||||
)
|
||||
filename = answer_dict.get("FILENAME")
|
||||
methodology = answer_dict.get("REIMB_TERM")
|
||||
|
||||
if string_utils.is_empty(service):
|
||||
return {}
|
||||
@@ -564,7 +566,7 @@ def extract_codes_from_service(answer_dict, constants: Constants):
|
||||
return answer_dict
|
||||
|
||||
# Explicit Codes (run always)
|
||||
code_answer_dict = code_explicit(service_clean, "")
|
||||
code_answer_dict = code_explicit(service_clean, methodology, filename)
|
||||
if any(
|
||||
not string_utils.is_empty(value) for value in code_answer_dict.values()
|
||||
) and all(
|
||||
|
||||
Reference in New Issue
Block a user