diff --git a/core b/core index a880739..30dd7dc 100644 Binary files a/core and b/core differ diff --git a/src/interface.jl b/src/interface.jl index f38a3aa..f75b374 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -650,12 +650,11 @@ function evaluator(state::T1, text2textInstructLLM::Function; Trajectories: ... You should then respond to the user with: - 1) Trajectory_evaluation: - - Analyze the trajectories of a solution to answer the user's original question. - Then given a question and a trajectory, evaluate its correctness and provide your reasoning and - analysis in detail. Focus on the latest thought, action, and observation. - Incomplete trajectories can be correct if the thoughts and actions so far are correct, - even if the answer is not found yet. Do not generate additional thoughts or actions. + 1) Trajectory_evaluation: Analyze the trajectory of a solution to answer the user's original question. + - Evaluate the correctness of each section and the overall trajectory based on the given question. + - Provide detailed reasoning and analysis, focusing on the latest thought, action, and observation. + - Incomplete trajectories are acceptable if the thoughts and actions up to that point are correct, even if the final answer isn't reached. + - Do not generate additional thoughts or actions. 2) Answer_evaluation: - Focus only on the matter mentioned in the question and comprehensively analyze how the latest observation's details addresses the question - State your rationale @@ -738,14 +737,14 @@ function evaluator(state::T1, text2textInstructLLM::Function; state[:isterminal] = true # user score as reward because different answers hold different value for the user. - state[:reward] = responsedict[:score] + state[:reward] = responsedict[:score] - #add to vectorDB + # add to vectorDB if addSQLVectorDB !== nothing addSQLVectorDB(state) end end - println("~~~ 5 Evaluator() ", @__FILE__, " ", @__LINE__) + println("~~~ Evaluator() ", @__FILE__, " ", @__LINE__) pprintln(Dict(responsedict)) return responsedict[:score] diff --git a/src/llmfunction.jl b/src/llmfunction.jl index 14c0e5b..92707e1 100644 --- a/src/llmfunction.jl +++ b/src/llmfunction.jl @@ -644,7 +644,7 @@ function SQLexecution(executeSQL::Function, sql::T else error("Error, SQL execution failed because it does not ended with ';'") end - println("~~~ SQL ", @__FILE__, " ", @__LINE__) + println("~~~ SQLexecution() SQL: ", @__FILE__, " ", @__LINE__) println(sql) result = executeSQL(sql) @@ -666,19 +666,16 @@ function SQLexecution(executeSQL::Function, sql::T df end - println("~~~ SQLexecution() ", @__FILE__, " ", @__LINE__) + println("~~~ SQLexecution() result: ", @__FILE__, " ", @__LINE__) println(df1) return (result=df1, success=true, errormsg=nothing) catch e - println("~~~ Error SQLexecution() 2 ", @__FILE__, " ", @__LINE__) io = IOBuffer() showerror(io, e) errorMsg = String(take!(io)) st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace())) println(errorMsg) - println("~~~ Error SQLexecution() 2.1 ", @__FILE__, " ", @__LINE__) response = (result=nothing, success=false, errormsg=errorMsg) - println("~~~ Error SQLexecution() 2.2 ", @__FILE__, " ", @__LINE__) return response end end