GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — feat(evaluator): add a generic evaluation kind by reachjalil · Pull Request #5 · ByteSliceHQ/looms Conversation
|
| Order | PR | What it ships |
|---|---|---|
| 1/2 | #6 | defineKind / createKind |
| 2/2 (this) | #5 | A generic evaluator kind on that builder |
Unique files (ignore #6 in the GitHub “Files changed” tab):
reachjalil:feat/define-kind...reachjalil:feat/jev-evaluator-module
This branch is feat/define-kind plus the evaluator commits. Both PRs target main. Merge #6 first, then this.
A durable workflow can score typed questions, write the result on the run log, and branch — the same composition slot as defineAgent, defineWorkflow, and gate().
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.
const scoreRefund = defineEvaluator({ name: 'score-refund', model: 'typesafe-ai/jev', questions: { /* boolean | choice | score */ }, skipModel: (input) => (input.amount >= 500 ? { route: 'review', reason: 'skipped' } : undefined), route: ({ answers }) => ({ route: 'auto' | 'review', reason: 'model' | 'uncertain' }), })
defineEvaluator is defineKind('evaluator', def) plus questions, optional model, optional skipModel, and route. Output on the log is evaluator.evaluated (answers, application route string, reason: model | uncertain | skipped | unavailable). A workflow ctx.spawns it; an agent can wrap it with asEvaluatorTool; evaluate() is the inline gate()-shaped wait.
vercelEvaluator({ model }) calls the Vercel AI SDK experimental_evaluate API. Omitting model uses typesafe-ai/jev.
@swirls/looms/evaluator — thread, evaluate effect, stub evaluator, evaluations projectionvercelEvaluator() in @swirls/looms/ai-vercel (experimental_evaluate; needs ai 7.0.105+)asEvaluatorTool, docs, minor changesetDefault evaluator is a stub, so CI needs no key.
gate() — the example composes themdefineJev / vercelJev / asJevTool preset. Pass the model id to defineEvaluator and vercelEvaluator.packages/evaluator/src/definitions.ts and examples/evaluator.tsbun run --filter @looms/examples evaluator
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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' })
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.