Add ToolCorrectness metric with full Python deepeval parity#1
Merged
Conversation
Port of deepeval's ToolCorrectnessMetric with all features: - Deterministic tool calling score (exact match, non-exact, weighted LCS) - LLM-based tool selection scoring when available_tools provided - strict_mode, include_reason, evaluation_params options - Empty list handling matching Python behaviour (scores, not errors) - Prompt template and schema modules following existing patterns
d579604 to
e4388a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ToolCorrectnessMetricto Elixir with full feature parityavailable_toolsare provided (final score = min of both)evaluation_paramsfor comparing:input_parametersand:outputfields beyond tool namestrict_mode,include_reason, and threshold configurationTest plan
tool_correctness_test.exscovers: non-exact match, exact match, ordering (weighted LCS), parameter evaluation, strict mode, reason generation, tool selection (LLM), and validation edge casesmix formatpassesmix credo --strictpassesmix dialyzerpasses