Repository navigation
feat(evaluator): add a generic evaluation kind - #5
Conversation
1f38670 to
7edac6f
Compare
7edac6f to
a59f4b0
Compare
|
Stack 2/2. Merge #6 first. Unique diff (this PR only): reachjalil:feat/define-kind...reachjalil:feat/jev-evaluator-module |
a59f4b0 to
e7c2cf3
Compare
|
I generalized this off the Jev name. The capability is an evaluation thread: typed boolean, choice, and score questions, then a route and reason on the log. Jev is one model that does that, not the kind. The package is now Rebased onto main. #6 is still just |
|
Follow-up: the Jev-named helpers are gone from the public API. There is no Pass the model id on the generic helpers: defineEvaluator({ name: 'score-refund', model: 'typesafe-ai/jev', questions })
vercelEvaluator({ model: 'typesafe-ai/jev' })
|
b586130 to
8502050
Compare
Score typed questions and branch on route and reason. The thread kind stays evaluator. Co-authored-by: Cursor <[email protected]>
Select a model with defineEvaluator({ model }).
There is no defineJev, vercelJev, or asJevTool helper.
Co-authored-by: Cursor <[email protected]>
Drop the log-triage sample from the public module. Call experimental_evaluate directly. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
8502050 to
cf5f4a6
Compare
Stack (2/2) — merge after #6
defineKind/createKindUnique files (ignore #6 in the GitHub “Files changed” tab):
reachjalil:feat/define-kind...reachjalil:feat/jev-evaluator-module
This branch is
feat/define-kindplus the evaluator commits. Both PRs targetmain. Merge #6 first, then this.Delivered value
A durable workflow can score typed questions, write the result on the run log, and branch — the same composition slot as
defineAgent,defineWorkflow, andgate().The thread kind is
evaluator. A model id is an argument, not a second definition helper. TypeSafe Jev is one model you can pass; a later model uses the same definition and a different id.defineEvaluatorisdefineKind('evaluator', def)plusquestions, optionalmodel, optionalskipModel, androute. Output on the log isevaluator.evaluated(answers, applicationroutestring,reason:model|uncertain|skipped|unavailable). A workflowctx.spawns it; an agent can wrap it withasEvaluatorTool;evaluate()is the inlinegate()-shaped wait.vercelEvaluator({ model })calls the Vercel AI SDKexperimental_evaluateAPI. Omittingmodelusestypesafe-ai/jev.In this diff (unique vs #6)
@swirls/looms/evaluator— thread,evaluateeffect, stub evaluator,evaluationsprojectionvercelEvaluator()in@swirls/looms/ai-vercel(experimental_evaluate; needsai7.0.105+)asEvaluatorTool, docs, minor changesetDefault evaluator is a stub, so CI needs no key.
Not in this PR
gate()— the example composes themdefineJev/vercelJev/asJevToolpreset. Pass the model id todefineEvaluatorandvercelEvaluator.Review
packages/evaluator/src/definitions.tsandexamples/evaluator.tsbun run --filter @looms/examples evaluator