Skip to content

slide: /v1/slide/learn takes questions beside its text - #992

Merged
ashhart merged 1 commit into
ashhart:mainfrom
Pentatonic-Ltd:slide-supplied-questions
Oct 18, 2026
Merged

ashhart merged 1 commit into
ashhart:mainfrom
Pentatonic-Ltd:slide-supplied-questions

Conversation

@philip-pentatonic

Copy link
Copy Markdown
Contributor

What this changes

POST /v1/slide/learn takes an optional questions array beside text, the questions-only shape agreed on #687. Each fact's lesson takes the supplied questions ahead of the ones the model writes, and every one goes through the same filters and the same answer the model gives knowing the fact, so a supplied question that names no subject, asks the fact's own value, is not asked as the user asks, or is not answered from the fact is dropped as a written one is. Supplied answers are not taken. At most 16 questions of 300 bytes each; anything but an array of strings is a 400. Without the field the lesson's question list is the model's own, the same slice, so the text-only path is unchanged.

Part of #687 (the endpoint the thread asked for).

Receipt

  • Environment: TensorFold 6ee828c2 plus this commit, Zig 0.17.0, Linux aarch64, host only, no GPU.
  • Exactness: n/a. No kernel, sampler or token path changes. With no questions field ahead returns the model's list itself (tested).
  • Decode speed before and after: n/a, the change is in the learn request only.
  • Prompt speed before and after: n/a, same reason.
  • Tests run: zig build test-server-cpu 376 of 376; zig build test test-golden 88 of 88 steps, 1379 of 1386 tests (7 skipped), golden 309 of 319 equal to the frozen answers with 0 unexpected differences; zig fmt --check clean; the lean check shows 0 new problems against main. New: five parser and ordering tests in slide_supplied.zig, and three tests in slide_questions_test.zig that run take over a fake engine with supplied questions: an accepted supplied question, filtered-out ones (a yes or no on the fact's own value, a question about something else, one not asked as the user asks, one the fact does not answer), and the text-only path giving the same kept questions as before. With the supplied questions not reaching the lesson the accepted-question test fails (expected 2, found 0).
  • Not run, and why: the real learner (--slide) on a model, which needs a GB10 and a taught fact takes minutes; the filters are the existing ones and these tests check how the questions reach them, not the model's judgment. The one line in factLesson that calls ahead is not covered by the fake-engine tests, which call ahead and take directly. macOS and Metal not run. I will add a real-model run to this description when I have one.

Checklist

  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off.
  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (No change to any of them.)
  • No precision traded for speed. If the bits change, the description says which sums change and why. (No bits change.)
  • A new or changed GPU kernel is registered with the kernel contract. (n/a, no kernel.)
  • Prompt processing is no slower than the last release. (Unchanged path.)
  • The description says which platforms I ran, Metal M1 to M5 and CUDA, and which I could not.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths. No AI attribution lines.

…the model's own and judged as they are

A body of text may carry "questions": [...] (at most 16, 300 bytes each, trimmed, blanks and repeats left out; anything
but an array of strings is a 400). Each fact's lesson takes them first, ahead of the questions the model writes, and
every one goes through the same filters and the same answer the model gives knowing the fact, so a supplied question
that names no subject, asks the fact's own value or is not answered from the fact is dropped as a written one is.
Supplied answers are not taken. Without the field the lesson's question list is the model's own, untouched.

@cwschroeder cwschroeder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reproduced a subject-filter regression at fb207d99: unrelated supplied questions can remove the subject restriction before per-fact filtering. The CPU regression uses your existing Robot fixture and filtering code. The unchanged candidate passes 381/381 tests (376 server plus 5 JSON); adding the regression gives 376 server passes and one failure, expected 3, found 4 (JSON cached).

Whole-tree Zig formatting and patch whitespace pass. Astra reviewed the source and the bounded test addition. These are CPU diagnostics, not a learner/model/device qualification or a complete factLesson integration test. The questions-only shape and supplied-question ownership otherwise look consistent with #687. The documentation example also needs an accepted question, as noted inline.

const asked = try askBase(srv, cx, null, try questionsFor(a, parts.document, fact, probes, language), 32 * probes, gone);
const qs = try wording.questions(a, asked.content, probes);
// the caller's own questions go first, judged as the model's are: a lesson's wording need not name the subject
const qs = try supplied_questions.ahead(a, supplied, try wording.questions(a, asked.content, probes));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Keep unrelated supplied questions from disabling subject filtering

The combined list reaches factSubject before per-fact filtering. With three generated questions naming “warehouse robot”, seven supplied questions make each subject word occur in only 3/10 questions, below asked's one-third threshold. The subject words become empty, and take skips the subject check. In the CPU regression, What do we call it? alone is rejected, but adding six unrelated first-person questions makes it a fourth accepted example. Supplied questions should not remove an established subject restriction before their own validation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a bounded fix for this at local commit ce881fec, directly on fb207d99: format-patch and test receipt. The production helper derives subject words and names from the model-written list first. Supplied candidates are added afterward; if no anchors remain, they stay out. The personal-fact path and proper-name/document fallbacks remain. The documentation example is corrected too.

The two regressions fail with the previous combined-corpus behavior and pass after the fix. All 20 focused server cases pass in Debug and actual ReleaseFast; Astra reviewed the helper and its use in factLesson. The complete Debug target remains red: 380 of 382 server tests pass, with delayed HTTP-reason and public-checkpoint request-count failures. Both full logs and scoped results are attached; this is a component/source fix offer, with learner and device qualification still open.

Comment thread docs/living-weights.md
Comment on lines +95 to +96
Use it when a fact's own wording would not have named its subject, for example `{"text": "Our warehouse robot is called
Pebble.", "questions": ["What is Pebble?"]}`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] Show a question this chat-fact path accepts

With the default chat source, “Our warehouse robot is called Pebble.” follows the personal-fact path. What is Pebble? fails its first-person requirement and does not name the detected subject. Your new filter test and #687 update explicitly identify it as dropped, so following this example cannot add the intended supplied question. What is our warehouse robot called? would match the accepted test case; adjust the introductory sentence to describe providing the caller's wording.

@ashhart

ashhart commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Thank you, @philip-pentatonic, for caller-supplied lesson questions and the server checks.

This feature moves with Living Weights to 1.1.1, the next patch release. The reviewed fix derives the subject from generated questions before filtering supplied questions, so unrelated additions cannot erase the fact's anchor. Accepted supplied questions retain priority.

The actual-lesson regression stays with the feature. The combined learner still needs retention and quality checks on real lesson workloads before it ships.

Posted by Ash's AI Assistant Synthena

@ashhart
ashhart merged commit 544dc68 into ashhart:main Oct 18, 2026
4 checks passed
ashhart added a commit that referenced this pull request Oct 18, 2026
ashhart added a commit that referenced this pull request Oct 18, 2026
…ide/learn move to 1.1.1 with Living Weights

This reverts the merge 1460fda4d (its first parent kept) and cba6da7e1. The supplied questions build on the Living
Weights series that 1.1.0 leaves out, so they wait for it.
ashhart added a commit that referenced this pull request Oct 18, 2026
…Next on CUDA's lines say what was measured

The six Living Weights rows (#876, #877, #878, #891, #905 and #992) leave Unreleased with the series. The EXL3
operators' line names GLM-5.3-Flash's two-rank engine as the family that serves them; #995's and #979's launches have
their records on nvcc 13.0 and 13.2; and Flash Next on CUDA states what a GB10 served from the MLX 4-bit checkpoint,
text and PNG images.
@ashhart ashhart mentioned this pull request Oct 18, 2026
@ashhart

ashhart commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Thank you, @philip-pentatonic, for caller-supplied lesson questions and the server checks.

This feature moves with Living Weights to the next patch release that passes its gates, 1.1.1 if they pass in time. The reviewed fix derives the subject from generated questions before filtering supplied questions, so unrelated additions cannot erase the fact's anchor. Accepted supplied questions retain priority.

The actual-lesson regression stays with the feature. The combined learner still needs retention and quality checks on real lesson workloads before it ships.

Nemotron on Apple M3 Ultra kept 3 of 4 facts and Apple M5 Ultra kept 2 of 4, both failing at the same rounding check, so Living Weights stays held for a repaired 4/4 rerun plus the NVIDIA GB10 27B and persistence/retention gates.

Posted by Ash's AI Assistant Synthena

BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
…ut ahead of the model's own and judged as they are

slide.zig took both sides: this line's conversation context import beside the supplied questions import, with the
learned conversation route kept.
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
… /v1/slide/learn move to 1.1.1 with Living Weights

This reverts the merge 1460fda4d (its first parent kept) and cba6da7e1. The supplied questions build on the Living
Weights series that 1.1.0 leaves out, so they wait for it.
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
…Next on CUDA's lines say what was measured

The six Living Weights rows (ashhart#876, ashhart#877, ashhart#878, ashhart#891, ashhart#905 and ashhart#992) leave Unreleased with the series. The EXL3
operators' line names GLM-5.3-Flash's two-rank engine as the family that serves them; ashhart#995's and ashhart#979's launches have
their records on nvcc 13.0 and 13.2; and Flash Next on CUDA states what a GB10 served from the MLX 4-bit checkpoint,
text and PNG images.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants