Repository navigation
v0.39.0
v0.39.0
@kanzo-tech/ai — minor · @kanzo-tech/llm — minor · @kanzo-tech/mosaic — minor
Ask fits the model's context. dataAgent and dataSuggestions describe each type once, with its
fields and values, and each relation in one line, its key, as LangChain's get_table_info does. They
used to repeat every type's fields in every relation that reached it. The answer tool names its
field list once under $defs. Measured with the models' own tokenizers on Keasy's seeds, LDBC SNB's
starters go from 10,466 to 1,290 tokens and its first question on Qwen3 from 16,565 to 3,212. Before,
neither fit an 8K or 16K context. /docs/design/ai-context has every graph measured.
New: context: { tokens, reserve? } on dataAgent and dataSuggestions, the window the model's
alias was started with. Given it, each call fits: the conversation so far is counted, then the
description narrows if it has to. The category values go first, then the relations the question
names least. The model is told those by name, and the answer tool offers only what was described.
When not one relation fits, the call fails as an AiError coded ai/context, with data.tokens
and data.budget, and nothing is sent. Without context, nothing narrows.
What to change:
- Pass each alias's declared context, the same number the AI services give Model Runner
(context_size, 8,192 in dev and 16,384 for the demo's Qwen3) or a provider's window:
dataAgent({ …, context: { tokens: 16384 } }),dataSuggestions({ …, context: { tokens: 8192 } }). AnswerInput.relationis the relation's key,"Person>knows>Person", not theRelation
object.Answer.relation, whatAnswerCard,onAddand a dashboard read, is still the object. A
test that calls the tool'sexecutedirectly writes the key, and a scripted model'sanswercall
writesrelation: "Person".- Word
ai/contextin your problem table, besideai/unavailable. For example: This graph is
too large to ask about with this model. answerSchema'srelationis a string enum, and every field slot is{ "$ref": "#/$defs/field" }.
A test that readrelation.properties.root.enumor a slot'senumreadsrelation.enumand
$defs.field.enum.
@kanzo-tech/mosaic adds relationSteps(graph, relation), each type a relation reaches with the
alias its columns are prefixed by (Person, Person2). The ./data size budget is raised as a
decision, from 7.25 kB to 8.5 kB (7.15 kB measured before this change, 8.39 kB after).
Every @kanzo-tech/* is published at 0.39.0. keasy and any host should move all of them together (@kanzo-tech/* pin each other exactly).