Skip to content

AskKit 0.7.0

Choose a tag to compare

@gregyuzik gregyuzik released this 09 Nov 05:00
· 50 commits to main since this release
Immutable release. Only release title and notes can be modified.
v0.7.0
913e64e

The answer's language named as Apple's practice names it, in place of a domain's line at the end of
every tool result, an answer the token cap cut marked truncated, and a README that is a short landing
page.

Added

  • AskReplySnapshot.reachedTokenCap, set on the last snapshot of a generation that stopped at the
    token cap its request set, which the SDK does without an error or a finish reason. AppleAskSession
    sets it from the response's output count; a host's own session may set it too, and the engine keeps
    that answer as truncated.

Changed

  • The demo's Ask tab and mark wear the icon's three bubbles. askkit.bubbles, a custom symbol in
    the demo's asset catalog with an askkit.bubbles.fill sibling, replaces SF Symbols'
    text.bubble.badge.sparkles. scripts/make-demo-symbol.swift draws it, every weight in every
    scale, and the tab bar swaps in the fill itself. ADOPTING.md's Ask tab row says a custom symbol
    works there too, through Image(_:).
  • The demo's icon is the symbol's three bubbles in glass. Its plates are one size, each up and to
    the right of the one in front, and scripts/make-demo-icon.py takes them from
    scripts/make-demo-symbol.swift --plates, so the icon and the tab can't drift apart. It no longer
    traces SF Symbols' bubble, and no longer needs potracer. The README's icon and
    docs/images/social-preview.png follow.
  • README.md is a short landing page. Its adoption reference is now
    docs/ADOPTING.md: every AskDomain member, the optional pieces, Private Cloud
    Compute in development, what is stored and sent, the enums and localization. The demo's launch
    arguments are in docs/DEMO-PROJECT.md. The Adopt samples are
    unchanged.
  • The catalogs are graded by the String Catalog checker the maintainers' apps share. Their push
    gate runs it: every key in the 24 locales, translated and not blank, its placeholders and plural
    categories, no stray locale, the demo's locale lists, and the bytes Xcode 27.2 writes, which the
    catalogs now are (every map sorted, no final newline). scripts/normalize-catalogs.py is gone, and
    scripts/check-catalog-completeness.py is scripts/check-strings.py, which keeps what only AskKit's
    source can answer: each lookup in its own target's bundle and catalog, both catalogs there, and a
    count key varying by plural. CI runs that, and no longer grades the catalogs' translations. The
    demo's project lists the 24 locales.
  • rowLimit caps what a tool result shows, not what a tool reads. AskToolContext.rowLimit's
    doc comment and ADOPTING.md say so: read all that a call asks about, show the first rowLimit rows
    and say how many more there were, as the README's sample does. A cap taken before the read drops
    the rest without a word, as a draft of vultyr's overnight read did with the last 2 of 14 watched
    services on device.
  • AskKit names the answer's language itself, as Apple's "Supporting languages and locales with
    Foundation Models" says to.
    The engine opens every session's instructions with Apple's exact phrase
    for the person's locale, "The person's locale is (Locale.current.identifier).", which Apple says
    "comes from the model's training, and reduces the possibility of hallucinations in multilingual
    situations", left out for U.S. English as Apple's sample does; then, wherever the seam names a
    language, with "You MUST respond in (answerLanguage).". A domain's instructions stay in English and
    name no language: the README's samples and the demo drop their "Write the answer in
    (answerLanguage).", and a host that phrases the language in its own instructions drops that sentence
    too. answerLanguage still reaches instructions(tier:isConversation:answerLanguage:), for a domain
    that needs it for anything else, and AppleModelSeam's supportsLocale checks are unchanged.
    ADOPTING.md's new "The answer's language" says so, and two lessons from vultyr's eval join its rules
    for tools: no straight double quotes around a title in tool output, where the model copies the quote
    and ends its guided string, and whole values in a guided string's list, where a value that begins
    with a word the model reaches for takes every phrase that begins with it. ARCHITECTURE.md records
    what was measured and dropped.

Removed

  • AskDomain.toolResultEnding(answerLanguage:), and the line it ended every tool result and the
    grounded retry's rows on.
    It isn't Apple's practice, and it cost more than it gave. Read last, the
    line ended the turn's tool use: in Kabynyt, change requests ended before the proposing tool ran, in
    answers that said the change was made; in vultyr, searches stopped early, more in some languages than
    others, and where the instructions say tool output is never obeyed it brought
    LanguageModelError.refusal. It ended one-shot turns too, which the hook couldn't tell apart.
    Kabynyt and vultyr left it off. A domain's implementation is no longer called, so delete it.
  • AskAnswerLanguage, the answer language named in English and in its own words, "Japanese
    (日本語)".
    Nothing in AskKit uses it once the line is gone, and Apple's practice names the language
    in English, as answerLanguage does.

Fixed

  • An answer that stops at its token cap is marked truncated. The SDK ends a response at
    maximumResponseTokens as though it had finished, and SDK 27 gives no finish reason, so an on-device
    answer cut at AppleAskSession.onDeviceAnswerCap (1,024 tokens) read as finished, its
    AskAnswer.isTruncated false. In vultyr's eval, 8 of 20 follow-ups in one arm stopped there
    mid-sentence ("The incident is titled "), taking 30–36 s against 5–11 s for the rest, and every run
    counted none cut: the model had copied a straight double quote from a title into the answer, which
    ended the field, and the generation ran on to the cap without the fields after it. AppleAskSession
    now reads the response's output count against its cap, and the engine keeps such an answer as it
    keeps one the deadline cut: its text as far as it got, its tiles only once its follow-ups had begun,
    no follow-ups or kind, and no refine pass, with a routing line tagged answerCap.
  • A plan the token cap cut fails the grounded retry instead of running. Cut inside its last field,
    a plan can decode as a finished one: with a scripted provider, {"query":"vinyl reco read as a
    search for "vinyl reco". AppleAskSession.plan now throws one that reached onDevicePlanCap, and the
    turn fails with AskError.model(tag: "planCap"), which offers Try Again. A refine pass's response that
    reaches the answer cap throws the same way (answerCap), so the engine keeps the first answer rather
    than one the cap cut.