jevrecipes

Recipe catalog / style-kind

Identify a musical style

style-kind is a Jev recipe from the jev-recipes TypeScript package. What style does the described passage or request evoke? Use it when a passage or a listener's request is described in text and you need one of a fixed set of broad styles to steer what comes next or to label what was played.

Last updated .

Explore this recipe interactively · Source and implementation guide · Markdown version

How do I use style-kind in TypeScript?

Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.

import { styleKind } from 'jev-recipes/style-kind';

const result = await styleKind({
  "description": "Walking bass in the left hand under extended seventh and ninth chords, swung eighth notes, a ii-V-I turnaround every four bars, right hand improvising around the changes with chromatic approach tones.",
  "minConfidence": 0.8
});
console.log(result);

What input does style-kind take?

FieldTypeNeeded
descriptionstringRequired
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "description": {
        "type": "string"
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "description"
    ]
  },
  "result": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "model": {
        "type": "string"
      },
      "usage": {
        "type": "object",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "output_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "additionalProperties": false
      },
      "status": {
        "type": "string",
        "enum": [
          "ready",
          "review"
        ]
      },
      "verdict": {
        "type": "string",
        "enum": [
          "classical",
          "jazz",
          "blues",
          "pop",
          "electronic",
          "folk",
          "unclear"
        ]
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "probabilities": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "enum": [
            "classical",
            "jazz",
            "blues",
            "pop",
            "electronic",
            "folk",
            "unclear"
          ]
        },
        "additionalProperties": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "required": [
          "classical",
          "jazz",
          "blues",
          "pop",
          "electronic",
          "folk",
          "unclear"
        ]
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "verdict",
      "confidence",
      "probabilities"
    ],
    "additionalProperties": false
  }
}

What does a style-kind result look like?

This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo style-kind.

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "verdict": "jazz",
  "confidence": 0.92,
  "probabilities": {
    "classical": 0.02,
    "jazz": 0.92,
    "blues": 0.03,
    "pop": 0.01,
    "electronic": 0,
    "folk": 0,
    "unclear": 0.02
  }
}

Input

See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas.

Result

verdict is one of classical, jazz, blues, pop, electronic, folk, unclear. unclear means the supplied facts do not establish a decision and always requires review.

A result is ready when confidence meets minConfidence and the verdict is not unclear. Inspect the verdict as well as the status: a ready result can name an outcome your application treats as negative. probabilities covers every verdict.

Reuse and calls

Uses the shared choice helper for the Jev call and response parsing. This folder owns its question, verdict criteria, and review policy. A live invocation makes one logical Jev request.

Limits

The label is the broad style a description evokes, not a verdict on the genre of any real recording, and sub-genres such as bebop, bossa nova, or house are folded into their nearest broad style. Descriptions that only list notes, chords, or a tempo without idiomatic markers cannot be placed and land on unclear; the recipe does not guess from sparse text. Because the recipe reads text rather than audio, a description that misnames a technique or borrows terms loosely produces a label about the description, not the sound.

Example input

demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo style-kind shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe style-kind to inspect the input and result schemas.

How accurate is style-kind?

Fixture only

No verified live accuracy measurement is available. Evaluate representative cases before using this decision in your workflow.

Use the evaluation guide to measure this decision on your own labeled cases.

What are the limits of style-kind?