Repository navigation
The ontology agent writes labels and definitions in the base's ontology_lang, since an empty ontology has no language to follow - #1468
Conversation
WaylandYang
left a comment
There was a problem hiding this comment.
Thanks for finding this. 0004 decisions 3 and 5 make `kb.ontology_lang` the language of generated labels and descriptions, and the caller states it. The documents' language would ignore that setting on a base set to `zh` with English documents. Please take the alternative from #1467: pass the base's `ontology_lang` into the prompt, for labels and definitions, with keys staying ASCII. The stale `lang_name()` mention in 0004 decision 5 should be updated in the same PR.
…gy_lang, since an empty ontology has no language to follow Signed-off-by: Schro-code <78734653+Schro-code@users.noreply.github.com>
0200896 to
398de58
Compare
|
Thanks, done. The agent now takes |
WaylandYang
left a comment
There was a problem hiding this comment.
Thanks, this matches 0004. Merging.
Why
Refs #1467. #1129 retired Suggest, and with it the only prompt that named
kb.ontology_langfor generated labels and descriptions (0004 decisions 3 and 5). The 0061 agent asked for "the language of the ontology", and that fails in two cases:ontology_langsays.Labels had no language rule at all. On one Spanish base, a single round left 183 class proposals, and about two thirds of them had English definitions.
What changes
crates/utopia-extract/src/ontology_agent.rs:build_proposal_messagestakes the base'sontology_lang. The system prompt now says "Write every label and definition in {LANGUAGE}, even where the shapes, the ontology or these instructions use another; keys stay snake_case ASCII."zhreads asChineseand anything else asEnglish, the same ruledescribe_datauses inmappings.rs.crates/utopia-server/src/ontology_agent.rs:propose_withalready loads the base, and now hands it topropose_locked, so the caller states the language.docs/decisions/0004-language-and-localization.md: decision 5 keeps its text, with a dated revision note in place where it namedlang_name(). The status line says it was revised.Record: this revises 0004 decision 5, and the status line is updated.
Not in this PR:
signatures_already_proposedkeeps the agent from proposing a shape again.How it was checked
dev@ fbe13bd:cargo fmt --all --check: clean.cargo clippy --locked --workspace --all-targets -- -D warnings: clean.cargo test --locked --workspace: 1810 passed, 0 failed, 6 ignored.UTOPIA_DATABASE_URLwas not set, so the store's SQL tests and the server tests that runproposeskipped locally; CI runs them.the_prompt_names_every_input_oncenow passeszhand asserts that the system prompt says "definition in Chinese". The assertion fails ondev.Before review
git commit -s)cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepassdocs/decisions/: 0004 decision 5 revised in place