jevrecipes

Recipe catalog / funder-fit

Compare two funding opportunities for a program

Which of firstOpportunity and secondOpportunity better fits program in purpose, eligibility wording, and scope?

You are shortlisting funding opportunities for a described program and want a head-to-head read on which of two calls fits it better before a development officer reads the full guidelines.

Explore this recipe interactively ยท Source and implementation guide

Use funder-fit 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 { funderFit } from 'jev-recipes/funder-fit';

const result = await funderFit({
  "program": "Mobile dental clinic serving uninsured adults in Harney and Malheur counties, rural eastern Oregon. Operated by Sagebrush Health Partners, a 501(c)(3) founded in 2019. Two clinic days per week rotating across four towns, providing cleanings, fillings, and extractions. Seeking about $120,000 for one year of clinical staffing and supplies.",
  "firstOpportunity": "Hollis Family Foundation, Rural Health Access grants. Awards of $25,000 to $150,000 to nonprofit organizations delivering direct health services in rural counties of Oregon and Washington. Priority given to programs serving uninsured or underinsured adults. Applicants must hold 501(c)(3) status and have at least two years of operating history. Operating and program costs are eligible.",
  "secondOpportunity": "Brightway Fund, Youth Wellness Initiative. Awards of $10,000 to $50,000 for school-based health and nutrition programs serving children ages 5 to 18 in the Portland metropolitan area. Public schools and their nonprofit partners are eligible. Capital and equipment purchases are not funded.",
  "minConfidence": 0.8
});
console.log(result);

Input contract

FieldTypeNeeded
programstringRequired
firstOpportunitystringRequired
secondOpportunitystringRequired
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "program": {
        "type": "string"
      },
      "firstOpportunity": {
        "type": "string"
      },
      "secondOpportunity": {
        "type": "string"
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "program",
      "firstOpportunity",
      "secondOpportunity"
    ]
  },
  "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": [
          "first",
          "second",
          "tie",
          "neither",
          "unclear"
        ]
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "probabilities": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "enum": [
            "first",
            "second",
            "tie",
            "neither",
            "unclear"
          ]
        },
        "additionalProperties": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "required": [
          "first",
          "second",
          "tie",
          "neither",
          "unclear"
        ]
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "verdict",
      "confidence",
      "probabilities"
    ],
    "additionalProperties": false
  }
}

Saved example result

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

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "verdict": "first",
  "confidence": 0.92,
  "probabilities": {
    "first": 0.92,
    "second": 0.01,
    "tie": 0.02,
    "neither": 0.03,
    "unclear": 0.02
  }
}

Evaluation evidence

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.

Limitations

Related recipes