update
This commit is contained in:
+8
-7
@@ -694,14 +694,15 @@ function evaluator(state::T1, thoughtDict, text2textInstructLLM::Function, llmFo
|
||||
response = replace(response, "***"=>"")
|
||||
|
||||
# check whether response has all header
|
||||
detected_kw = GeneralUtils.detect_keyword(header, response)
|
||||
if 0 ∈ values(detected_kw)
|
||||
errornote = "Your previous attempt does not have all answer points"
|
||||
println("\nERROR SQLLLM evaluator() Attempt $attempt/$maxattempt. $errornote ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||
detected_kw = GeneralUtils.detectKeywordVariation(header, response)
|
||||
missingkeys = [k for (k, v) in detected_kw if v === nothing]
|
||||
if !isempty(missingkeys)
|
||||
errornote = "$missingkeys are missing from your previous response"
|
||||
println("\nERROR SQLLLM extractContent_dataframe() $errornote ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||
continue
|
||||
elseif sum(values(detected_kw)) > length(header)
|
||||
errornote = "Your previous attempt has duplicated answer point"
|
||||
println("\nERROR SQLLLM evaluator() Attempt $attempt/$maxattempt. $errornote ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||
elseif sum([length(i) for i in values(detected_kw)]) > length(header)
|
||||
errornote = "\nYour previous attempt has duplicated points according to the required response format"
|
||||
println("\nERROR SQLLLM extractContent_dataframe() $errornote ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||
continue
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user