Repository navigation
Conversation
Question and answer types, Python json.dumps parity, Laya 0.3.5 sequence assembly and answer decoding, with a parity fixture from the official checkpoint. Not exported yet; the native backend and DecisionEngine facade follow in the next PR. Design: doc/decision_engine.md.
12 tasks done
Owner
Author
Contributor
|
Chat app preview removed for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DecisionEnginestack (#604). Adds the design docdoc/decision_engine.mdand the pure-Dart core for Laya-style decision models underlib/src/core/decision/:python_json.dart: byte parity with Pythonjson.dumps, including floatrepr,NaN/Infinityandensure_ascii.decision_question.dart,decision_result.dart: the question, request and answer types, in Laya'ssystem_onewire format.decision_sequence.dart: Laya 0.3.5 option rendering and sequence assembly, with the option squeeze, 512-token cut and marker-overflow error.decision_decoder.dart: temperature buckets and clamping, confidence, act features, answer decoding.LlamaDecisionException.test/fixtures/decision/: 24 rows from official laya 0.3.5 (checkpoint1c5edc17…, FP32 CPU), with the scripts that produced it and their provenance.Production-readiness scope
lib/llamadart.dart.LlamaDecisionExceptiondoes become public, becauseexceptions.dartis already exported whole, but nothing throws it publicly until the next PR.fromJsonis stricter than Laya in two places, and both are documented: scorecriteriamust be a list, and noulcriteriamust be null or a map.Completeness checklist
Test Plan
dart run tool/prepare_workspace.dartdart format --output=none --set-exit-if-changed .dart analyzedart test -p vm test/unit/core/decision test/unit/core/exceptions_test.dart test/unit/test_structure(209 pass). The full VM suite runs in CI.dart test -p chrome test/unit/core/decision(112 pass). The 24-row fixture tests are VM-only because the fixture is read withdart:io.dart run tool/testing/check_platform_boundaries.dart. Parity was checked against laya 0.3.5 on randomized inputs forjson.dumps, sequence assembly and decoding. A mutation pass left no surviving mutant in the new code, apart from two that were judged not worth a test: the exception's superclass and a wire constant that has no consumer yet.Matrix Evidence
Review Notes
High-risk regression review
classify_high_risk_changes.dartover every changed path)