lex-eval 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e519977bbdf83bbb365455d368008b572ec68a46b756e9e33aed4376122549fd
|
|
4
|
+
data.tar.gz: c91130345e012f2b585fa86b26f3578b0b111a2d95a76e21ec3c1316065a830c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 749867fd2b8004bbc96cf29192ad9d33302677e31019eb4c2b8c315320544b0b407b4272edd4a159effeec77c505f3e8fd7d94f4088b6b86695a2bf35d410f86
|
|
7
|
+
data.tar.gz: d0579690cba79a88f1b88bee339a571933cc4aa053ca6222ef9f7285ca7cf3b871e9d40c5dec2e56e48b46ef5a04edf4fb412cddc59405f6fb8cf06759065b49
|
|
@@ -45,7 +45,8 @@ module Legion
|
|
|
45
45
|
return evaluate_regex_fallback(prompt) unless structured_available?
|
|
46
46
|
|
|
47
47
|
result = Legion::LLM.structured(message: prompt, schema: JUDGE_SCHEMA,
|
|
48
|
-
intent: { capability: :reasoning }
|
|
48
|
+
intent: { capability: :reasoning },
|
|
49
|
+
caller: { extension: 'lex-eval', operation: 'judge' })
|
|
49
50
|
{ score: result[:score], passed: result[:passed],
|
|
50
51
|
explanation: result[:explanation], evidence: result[:evidence] || [] }
|
|
51
52
|
rescue StandardError
|
|
@@ -53,7 +54,8 @@ module Legion
|
|
|
53
54
|
end
|
|
54
55
|
|
|
55
56
|
def evaluate_regex_fallback(prompt)
|
|
56
|
-
response = Legion::LLM.chat(message: prompt, intent: { capability: :reasoning }
|
|
57
|
+
response = Legion::LLM.chat(message: prompt, intent: { capability: :reasoning },
|
|
58
|
+
caller: { extension: 'lex-eval', operation: 'judge' })
|
|
57
59
|
score = extract_score(response.content)
|
|
58
60
|
{ score: score, explanation: response.content, passed: score >= threshold, evidence: [] }
|
|
59
61
|
rescue StandardError => e
|
|
@@ -26,7 +26,8 @@ module Legion
|
|
|
26
26
|
def review_output(input:, output:, review_prompt: nil, **)
|
|
27
27
|
prompt = build_review_message(review_prompt || default_review_prompt, input, output)
|
|
28
28
|
Legion::LLM.structured(message: prompt, schema: REVIEW_SCHEMA,
|
|
29
|
-
intent: { capability: :reasoning }
|
|
29
|
+
intent: { capability: :reasoning },
|
|
30
|
+
caller: { extension: 'lex-eval', operation: 'agentic_review' })
|
|
30
31
|
rescue StandardError => e
|
|
31
32
|
{ confidence: 0.0, recommendation: 'reject',
|
|
32
33
|
issues: [], explanation: "review error: #{e.message}" }
|