SDKs & clients

jev-pii-checker

@coo-quack1TypeScriptMITupdated 2026-09-20runnable

CLI that finds PII in text with TypeSafe Jev: presence, sensitivity, and located spans

coo-quack/jev-pii-checker

Where it calls Jev

import { choice, noul, score, TypeSafeClient } from "@typesafe-ai/sdk";

src/judge.ts:1

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from src/gate.ts:35

  1. person_nametrue/false

    Does the text mention the name of a specific individual person?

  2. email_or_phonetrue/false

    Does the text contain an email address or phone number of a specific person?

  3. postal_addresstrue/false

    Does the text contain a postal address associated with a specific person?

  4. date_of_birthtrue/false

    Does the text contain the date of birth of a specific person?

  5. government_idtrue/false

    Does the text contain a government-issued identifier of a person (e.g., マイナンバー, passport number, driver's licence number)?

  6. financial_accounttrue/false

    Does the text contain a credit card number or bank account number of a person?

  7. health_infotrue/false

    Does the text contain medical information, diagnosis, or treatment details of an identifiable person?

  8. biometrictrue/false

    Does the text contain biometric data (fingerprint, facial recognition, iris scan) of a specific person?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    person_name: { type: 'boolean', instructions: 'Does the text mention the name of a specific individual person?' },
    email_or_phone: { type: 'boolean', instructions: 'Does the text contain an email address or phone number of a specific person?' },
    postal_address: { type: 'boolean', instructions: 'Does the text contain a postal address associated with a specific person?' },
    date_of_birth: { type: 'boolean', instructions: 'Does the text contain the date of birth of a specific person?' },
    government_id: { type: 'boolean', instructions: 'Does the text contain a government-issued identifier of a person (e.g., マイナンバー, passport number, driver\'s licence number)?' },
    financial_account: { type: 'boolean', instructions: 'Does the text contain a credit card number or bank account number of a person?' },
    health_info: { type: 'boolean', instructions: 'Does the text contain medical information, diagnosis, or treatment details of an identifiable person?' },
    biometric: { type: 'boolean', instructions: 'Does the text contain biometric data (fingerprint, facial recognition, iris scan) of a specific person?' },
  },
});

from src/locate.ts:62

  1. is_personaltrue/false

    Is the email address "

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    is_personal: { type: 'boolean', instructions: 'Is the email address "' },
  },
});

from src/locate.ts:101

  1. digit_typechoice

    In `text`, what kind of number is 「${match.text}」?

    • my_numberマイナンバー or Japanese My Number
    • credit_cardCredit card number
    • bank_accountBank account number
    • phonePhone number (mobile or landline)
    • driver_licence_or_passportDriver's licence or passport number
    • national_idSocial security number or other national identification number
    • order_or_tracking_numberOrder number or parcel tracking number
    • product_serialProduct serial number or SKU
    • dateDate or date-related number
    • otherOther type of number

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    digit_type: { type: 'choice', instructions: 'In `text`, what kind of number is 「${match.text}」?',
      criteria: { my_number: 'マイナンバー or Japanese My Number', credit_card: 'Credit card number', bank_account: 'Bank account number', phone: 'Phone number (mobile or landline)', driver_licence_or_passport: 'Driver\'s licence or passport number', national_id: 'Social security number or other national identification number', order_or_tracking_number: 'Order number or parcel tracking number', product_serial: 'Product serial number or SKU', date: 'Date or date-related number', other: 'Other type of number' } },
  },
});

from src/locate.ts:150

  1. is_personaltrue/false

    Is the phone number "

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    is_personal: { type: 'boolean', instructions: 'Is the phone number "' },
  },
});

Other projects in this category