{
  "skill_name": "natural-language",
  "evals": [
    {
      "id": 0,
      "name": "text-analysis-pipeline",
      "prompt": "Our support inbox app receives short customer messages in many languages. For each message we want the language, any people, places and companies mentioned, an overall mood score, and a list of similar past keywords. Processing runs on a background queue with several workers. Design the NaturalLanguage side.",
      "expected_output": "Picks sensible token units, keeps every NLTokenizer and NLTagger confined to one worker at a time, uses languageConstraints or languageHints because messages are short, tags entities with the .nameType scheme and scores mood with .sentimentScore, passes .omitWhitespace, .omitPunctuation and .joinNames, handles optional tags and sentiment without force unwraps, and checks that a word embedding exists before using it.",
      "files": [],
      "expectations": [
        "Chooses appropriate tokenizer units and confines each tokenizer or tagger to a single thread",
        "Adds languageConstraints or languageHints for short messages",
        "Uses .nameType for entities and .sentimentScore for mood",
        "Uses the options .omitWhitespace, .omitPunctuation and .joinNames",
        "Handles optional tags, sentiment and embeddings without force unwrapping"
      ]
    },
    {
      "id": 1,
      "name": "translation-availability-review",
      "prompt": "Review our plan: we target iOS 17.4, call TranslationSession directly on launch with the high-fidelity strategy because it uses the cloud, and translate our menu in one batch without any error handling. What is wrong?",
      "expected_output": "Separates availability: the system translation sheet exists from iOS 17.4, whereas iOS 18 is the floor for sessions, the translationTask modifier, LanguageAvailability and batches, and strategies need 26.4. Corrects the claim that .highFidelity uses a server: translation runs on device, with .highFidelity preferring Apple Intelligence models and .lowLatency the classic models. Uses LanguageAvailability with its installed, supported and unsupported states, puts every translate, translations(from:) and prepareTranslation call inside do-catch, and explains that TranslationSession(installedSource:target:) needs both languages installed while translationTask can prompt for downloads.",
      "files": [],
      "expectations": [
        "Distinguishes the 17.4 presentation API from the iOS 18 session, task, availability and batch APIs",
        "States that neither strategy sends text to a server",
        "Lists the .installed, .supported and .unsupported availability states",
        "Catches errors from translate, translations(from:) and prepareTranslation",
        "Explains that the installedSource initializer requires installed languages whereas translationTask can request downloads"
      ]
    },
    {
      "id": 2,
      "name": "sibling-boundary-routing",
      "prompt": "Our travel journal app scans printed tickets, dictates voice notes, shows its UI in eight languages, summarizes each trip, and tags places and moods in the journal text. Which parts belong to the NaturalLanguage skill and which go elsewhere?",
      "expected_output": "Keeps tokenization, language identification, entity extraction, sentiment, embeddings and translation of journal text in this skill. Ticket OCR goes to vision-framework, voice-note transcription to speech-recognition, String Catalogs, plurals and formatting to ios-localization, and generated trip summaries to apple-on-device-ai.",
      "files": [],
      "expectations": [
        "Keeps tokenization, language identification, entities, sentiment, embeddings and translation here",
        "Sends ticket OCR to vision-framework",
        "Sends voice-note transcription to speech-recognition",
        "Sends UI strings, plurals and formatting to ios-localization",
        "Sends generated trip summaries to apple-on-device-ai"
      ]
    }
  ]
}
