GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(evaluator): add a generic evaluation kind by reachjalil · Pull Request #5 · ByteSliceHQ/looms

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 17, 2026 •
edited by dylnslck
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Stack (2/2) — merge after #6

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.

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, 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.

In this diff (unique vs #6)

  • @swirls/looms/evaluator — thread, evaluate effect, stub evaluator, evaluations projection
  • vercelEvaluator() in @swirls/looms/ai-vercel (experimental_evaluate; needs ai 7.0.105+)
  • Stub example: refund score → auto / review / skip-large → maybe spawn a stub agent
  • asEvaluatorTool, docs, minor changeset

Default evaluator is a stub, so CI needs no key.

Not in this PR

  • The kind builder (review/merge feat(core): add defineKind and createKind for custom types #6)
  • Replacing agents or gate() — the example composes them
  • Hosted Jev in CI
  • A defineJev / vercelJev / asJevTool preset. Pass the model id to defineEvaluator and vercelEvaluator.

Review

  1. Merge or read feat(core): add defineKind and createKind for custom types #6 first
  2. Unique compare link above, then packages/evaluator/src/definitions.ts and examples/evaluator.ts
  3. bun run --filter @looms/examples evaluator

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@reachjalil
reachjalil marked this pull request as draft September 17, 2026 19:39
@reachjalil
reachjalil force-pushed the feat/jev-evaluator-module branch from 1f38670 to 7edac6f Compare September 17, 2026 20:00
@reachjalil
reachjalil marked this pull request as ready for review September 17, 2026 21:12
@reachjalil reachjalil mentioned this pull request Sep 17, 2026
feat(core): add defineKind and createKind for custom types #6
Merged
@reachjalil
reachjalil force-pushed the feat/jev-evaluator-module branch from 7edac6f to a59f4b0 Compare September 17, 2026 21:36
@reachjalil

reachjalil commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Stack 2/2. Merge #6 first.

Unique diff (this PR only): reachjalil:feat/define-kind...reachjalil:feat/jev-evaluator-module

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dylnslck
dylnslck force-pushed the feat/jev-evaluator-module branch from a59f4b0 to e7c2cf3 Compare September 24, 2026 19:35
@dylnslck dylnslck changed the title feat(jev): add TypeSafe Jev as a first-class run kind feat(evaluator): add a generic evaluation kind Sep 24, 2026
@dylnslck

dylnslck commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

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 @swirls/looms/evaluator with kind evaluator. defineJev and vercelJev() stay as presets that select typesafe-ai/jev. Another model that answers the same questions uses vercelEvaluator({ model }).

Rebased onto main. #6 is still just defineKind / createKind and should merge first.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dylnslck

dylnslck commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up: the Jev-named helpers are gone from the public API. There is no defineJev, vercelJev, or asJevTool.

Pass the model id on the generic helpers:

defineEvaluator({ name: 'score-refund', model: 'typesafe-ai/jev', questions })
vercelEvaluator({ model: 'typesafe-ai/jev' })

vercelEvaluator() still defaults the model string to typesafe-ai/jev when you omit model. The kind, events, and package stay evaluator.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dylnslck
dylnslck approved these changes Sep 24, 2026
View reviewed changes
@dylnslck
dylnslck force-pushed the feat/jev-evaluator-module branch from b586130 to 8502050 Compare September 24, 2026 21:06
dylnslck and others added 4 commits September 24, 2026 15:10
@dylnslck @cursoragent
feat(evaluator): add a generic evaluation kind
f69214c
Score typed questions and branch on route and reason.
The thread kind stays evaluator.

Co-authored-by: Cursor <[email protected]>
@dylnslck @cursoragent
refactor(evaluator): drop Jev-named helpers from the public API
7e190df
Select a model with defineEvaluator({ model }).
There is no defineJev, vercelJev, or asJevTool helper.

Co-authored-by: Cursor <[email protected]>
@dylnslck @cursoragent
refactor(evaluator): run only from a registered definition
f6b7530
Drop the log-triage sample from the public module.
Call experimental_evaluate directly.

Co-authored-by: Cursor <[email protected]>
@dylnslck @cursoragent
style(evaluator): format docs and effect imports
cf5f4a6
Co-authored-by: Cursor <[email protected]>
@dylnslck
dylnslck force-pushed the feat/jev-evaluator-module branch from 8502050 to cf5f4a6 Compare September 24, 2026 21:11
@dylnslck
dylnslck merged commit a879e8b into ByteSliceHQ:main Sep 24, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dylnslck dylnslck dylnslck approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@reachjalil @dylnslck
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.