@intellectif/lk-core 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/{ai-B1wYrqcB.d.cts → ai-Cnm0qE8v.d.cts} +296 -2
- package/dist/ai-Cnm0qE8v.d.cts.map +1 -0
- package/dist/{ai-B1wYrqcB.d.ts → ai-Cnm0qE8v.d.ts} +296 -2
- package/dist/ai-Cnm0qE8v.d.ts.map +1 -0
- package/dist/ai-check.cjs +77 -3
- package/dist/ai-check.cjs.map +1 -1
- package/dist/ai-check.d.cts +11 -3
- package/dist/ai-check.d.cts.map +1 -1
- package/dist/ai-check.d.ts +11 -3
- package/dist/ai-check.d.ts.map +1 -1
- package/dist/ai-check.js +77 -3
- package/dist/ai-check.js.map +1 -1
- package/dist/{ai-writing-DrPTV3R2.cjs → ai-writing-Bh2Y53cY.cjs} +2539 -178
- package/dist/ai-writing-Bh2Y53cY.cjs.map +1 -0
- package/dist/{ai-writing-B7oMCt66.js → ai-writing-DeIV-GfN.js} +2389 -136
- package/dist/ai-writing-DeIV-GfN.js.map +1 -0
- package/dist/{index-BU99GFTl.d.ts → index-CtoPhJAH.d.ts} +2 -2
- package/dist/{index-BU99GFTl.d.ts.map → index-CtoPhJAH.d.ts.map} +1 -1
- package/dist/{index-XCCoPoTU.d.cts → index-DMh3OYSb.d.cts} +2 -2
- package/dist/{index-XCCoPoTU.d.cts.map → index-DMh3OYSb.d.cts.map} +1 -1
- package/dist/{index-BdXs4-en.d.ts → index-HXvg0YRQ.d.ts} +2 -2
- package/dist/{index-BdXs4-en.d.ts.map → index-HXvg0YRQ.d.ts.map} +1 -1
- package/dist/{index-DP9rvyOz.d.cts → index-fZ67k-WR.d.cts} +2 -2
- package/dist/{index-DP9rvyOz.d.cts.map → index-fZ67k-WR.d.cts.map} +1 -1
- package/dist/{index-BTkMQtws.d.ts → index-g-EWIugp.d.ts} +2 -2
- package/dist/{index-BTkMQtws.d.ts.map → index-g-EWIugp.d.ts.map} +1 -1
- package/dist/{index-BM8LeDWn.d.cts → index-oST8GBFa.d.cts} +2 -2
- package/dist/{index-BM8LeDWn.d.cts.map → index-oST8GBFa.d.cts.map} +1 -1
- package/dist/index.cjs +280 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +227 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +227 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +269 -7
- package/dist/index.js.map +1 -1
- package/dist/{item-group-CeDk7mfM.js → item-group-BceUoxoM.js} +2 -2
- package/dist/{item-group-CeDk7mfM.js.map → item-group-BceUoxoM.js.map} +1 -1
- package/dist/{item-group-8P3WFuUK.cjs → item-group-KV4hYu3a.cjs} +2 -2
- package/dist/{item-group-8P3WFuUK.cjs.map → item-group-KV4hYu3a.cjs.map} +1 -1
- package/dist/{registry-hzrkTeIT.cjs → registry-Cymq7Ah0.cjs} +37 -2
- package/dist/registry-Cymq7Ah0.cjs.map +1 -0
- package/dist/{registry-D92hz9iA.js → registry-tkacvJUI.js} +20 -3
- package/dist/registry-tkacvJUI.js.map +1 -0
- package/dist/{schemas-C7TViWCg.js → schemas-DM8sN_f0.js} +3 -3
- package/dist/{schemas-C7TViWCg.js.map → schemas-DM8sN_f0.js.map} +1 -1
- package/dist/{schemas-BWeskONy.cjs → schemas-wDzbKdKa.cjs} +3 -3
- package/dist/{schemas-BWeskONy.cjs.map → schemas-wDzbKdKa.cjs.map} +1 -1
- package/dist/schemas.cjs +3 -3
- package/dist/schemas.d.cts +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +3 -3
- package/dist/{scoring-CtkCFyFT.cjs → scoring-D9tFvPEG.cjs} +2 -2
- package/dist/{scoring-CtkCFyFT.cjs.map → scoring-D9tFvPEG.cjs.map} +1 -1
- package/dist/{scoring-DD1GHcLI.js → scoring-DIBmo_cy.js} +2 -2
- package/dist/{scoring-DD1GHcLI.js.map → scoring-DIBmo_cy.js.map} +1 -1
- package/dist/scoring.cjs +2 -2
- package/dist/scoring.d.cts +2 -2
- package/dist/scoring.d.ts +2 -2
- package/dist/scoring.js +2 -2
- package/dist/{xapi-7btSpx6v.cjs → xapi-Dyqcl3JK.cjs} +2 -2
- package/dist/{xapi-7btSpx6v.cjs.map → xapi-Dyqcl3JK.cjs.map} +1 -1
- package/dist/{xapi-Cgicg-zU.js → xapi-gCAo549Q.js} +2 -2
- package/dist/{xapi-Cgicg-zU.js.map → xapi-gCAo549Q.js.map} +1 -1
- package/dist/xapi.cjs +1 -1
- package/dist/xapi.d.cts +1 -1
- package/dist/xapi.d.ts +1 -1
- package/dist/xapi.js +1 -1
- package/package.json +2 -2
- package/vectors/README.md +23 -0
- package/vectors/variants.d.mts +20 -0
- package/vectors/variants.json +5753 -0
- package/vectors/variants.mjs +67 -0
- package/dist/ai-B1wYrqcB.d.cts.map +0 -1
- package/dist/ai-B1wYrqcB.d.ts.map +0 -1
- package/dist/ai-writing-B7oMCt66.js.map +0 -1
- package/dist/ai-writing-DrPTV3R2.cjs.map +0 -1
- package/dist/registry-D92hz9iA.js.map +0 -1
- package/dist/registry-hzrkTeIT.cjs.map +0 -1
|
@@ -1617,6 +1617,60 @@ type ItemFindingSeverity = 'warning' | 'advice';
|
|
|
1617
1617
|
*/
|
|
1618
1618
|
interface ItemFinding extends ValidationError {
|
|
1619
1619
|
severity: ItemFindingSeverity;
|
|
1620
|
+
/**
|
|
1621
|
+
* The other places a finding about several items involves, by path from the
|
|
1622
|
+
* same root as `path`: the item whose passage holds another's answer, the
|
|
1623
|
+
* questions whose keys share a position. Absent when only `path` is involved.
|
|
1624
|
+
*/
|
|
1625
|
+
related?: string[][];
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* One form of an exam, as `critiqueVersions` reads it: its sections in paper
|
|
1629
|
+
* order, each a list of sequence entries. A host without sections passes one.
|
|
1630
|
+
*/
|
|
1631
|
+
interface VersionPaper {
|
|
1632
|
+
sections: readonly {
|
|
1633
|
+
key?: string;
|
|
1634
|
+
title?: string;
|
|
1635
|
+
entries: readonly unknown[];
|
|
1636
|
+
}[];
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* One thing `critiqueVersions` found between two forms. `a` and `b` are where
|
|
1640
|
+
* it is in each, by path from the paper's root:
|
|
1641
|
+
* `['sections', '0', 'entries', '2', 'items', '1']`.
|
|
1642
|
+
*
|
|
1643
|
+
* - `invalid` — the two are not parallel: a different blueprint, type or
|
|
1644
|
+
* structure, so they do not score alike.
|
|
1645
|
+
* - `warning` — they are parallel, but a re-sitting learner would meet
|
|
1646
|
+
* something again, or one form is longer or tests another objective.
|
|
1647
|
+
* - `advice` — a picture both forms show, which a host may allow.
|
|
1648
|
+
*/
|
|
1649
|
+
interface VersionFinding extends ValidationError {
|
|
1650
|
+
severity: 'invalid' | 'warning' | 'advice';
|
|
1651
|
+
a?: string[];
|
|
1652
|
+
b?: string[];
|
|
1653
|
+
}
|
|
1654
|
+
/** One slot of the first form, with the slot of the second paired with it, and how they were paired. */
|
|
1655
|
+
interface VersionSlot {
|
|
1656
|
+
a: string[] | null;
|
|
1657
|
+
b: string[] | null;
|
|
1658
|
+
by: 'pairs' | 'slotKey' | 'position';
|
|
1659
|
+
}
|
|
1660
|
+
/** What `critiqueVersions` found. */
|
|
1661
|
+
interface VersionComparison {
|
|
1662
|
+
findings: VersionFinding[];
|
|
1663
|
+
/** Every slot of either form — entries, and the items of a group — paired or not. */
|
|
1664
|
+
slots: VersionSlot[];
|
|
1665
|
+
summary: {
|
|
1666
|
+
/** Items in each form: loose activities and the items of groups. */
|
|
1667
|
+
aItems: number;
|
|
1668
|
+
bItems: number;
|
|
1669
|
+
/** Items paired with one of the other form. */
|
|
1670
|
+
paired: number;
|
|
1671
|
+
/** Paired slots whose structure differs. */
|
|
1672
|
+
structureMismatches: number;
|
|
1673
|
+
};
|
|
1620
1674
|
}
|
|
1621
1675
|
/** What `createDraft` hands an activity type's `authoring.createDraft`. */
|
|
1622
1676
|
interface DraftContext {
|
|
@@ -2672,5 +2726,245 @@ interface AiVideoDraft {
|
|
|
2672
2726
|
/** What `critiqueItemGroupDraft` says of it. */
|
|
2673
2727
|
findings: ItemFinding[];
|
|
2674
2728
|
}
|
|
2675
|
-
|
|
2676
|
-
|
|
2729
|
+
/**
|
|
2730
|
+
* How hard a variant is meant to be next to its exemplar: one step, inside the
|
|
2731
|
+
* level, never another level. `same` is a parallel form. The SDK cannot
|
|
2732
|
+
* measure difficulty: this is an instruction to the model, and item statistics
|
|
2733
|
+
* after delivery are the measurement.
|
|
2734
|
+
*/
|
|
2735
|
+
type AiVariantDifficulty = 'easier' | 'same' | 'harder';
|
|
2736
|
+
/**
|
|
2737
|
+
* What the level covers, from the host's curriculum: grammar and vocabulary a
|
|
2738
|
+
* learner has been taught, and topics to keep away from. Told to the model;
|
|
2739
|
+
* the SDK does not check vocabulary.
|
|
2740
|
+
*/
|
|
2741
|
+
interface AiVariantLevelFacts {
|
|
2742
|
+
grammar?: string[];
|
|
2743
|
+
vocabulary?: string[];
|
|
2744
|
+
avoidTopics?: string[];
|
|
2745
|
+
}
|
|
2746
|
+
/** Why `aiVariantsRequest` left an exemplar out: it cannot yield a sound variant. */
|
|
2747
|
+
type AiVariantSkipCode = 'variant_exemplar_unheard' | 'variant_exemplar_unseen' | 'variant_exemplar_incomplete' | 'variant_exemplar_timeline' | 'variant_exemplar_unsupported' | 'variant_exemplar_too_long';
|
|
2748
|
+
/** An exemplar left out of the facts, and why. The host keeps it, or asks a person. */
|
|
2749
|
+
interface AiVariantSkip {
|
|
2750
|
+
/** Its index in the exemplars passed. */
|
|
2751
|
+
exemplarIndex: number;
|
|
2752
|
+
code: AiVariantSkipCode;
|
|
2753
|
+
message: string;
|
|
2754
|
+
}
|
|
2755
|
+
/**
|
|
2756
|
+
* What a variant must meet, computed from its exemplar, so that what the model
|
|
2757
|
+
* is told and what `checkAiVariants` checks are one thing.
|
|
2758
|
+
*/
|
|
2759
|
+
interface AiVariantTargets {
|
|
2760
|
+
/** The exemplar's type: an activity type, or `item-group`. */
|
|
2761
|
+
type: string;
|
|
2762
|
+
/**
|
|
2763
|
+
* The counts to keep: `{ mode: 'single', options: 4, correct: 1 }`,
|
|
2764
|
+
* `{ blanks: [{ oneWord: true, acceptedAnswers: [1, 3] }] }`,
|
|
2765
|
+
* `{ gaps: [{ bank: 0 }, …], banks: [{ choices: 7 }] }`,
|
|
2766
|
+
* `{ stimulus: 'audio', items: ['multiple-choice', …], speakers: 2, turns: [5, 8] }`.
|
|
2767
|
+
*/
|
|
2768
|
+
structure: Readonly<Record<string, unknown>>;
|
|
2769
|
+
/** Inclusive bounds, in words, for each text written: `{ 'stimulus.body': [162, 198], question: [6, 14] }`. */
|
|
2770
|
+
lengths: Readonly<Record<string, [number, number]>>;
|
|
2771
|
+
difficulty: AiVariantDifficulty;
|
|
2772
|
+
/** Why this item moves, in the host's words. Present only when `difficulty` is not `same`. */
|
|
2773
|
+
difficultyReason?: string;
|
|
2774
|
+
/** The ways this type is made easier or harder, as sentences. Present only when `difficulty` is not `same`. */
|
|
2775
|
+
levers?: string[];
|
|
2776
|
+
/**
|
|
2777
|
+
* For an item group whose items do not all move alike (`difficultyFor`
|
|
2778
|
+
* names some of them): each item's own difficulty, by its index in `items`.
|
|
2779
|
+
*/
|
|
2780
|
+
itemDifficulty?: {
|
|
2781
|
+
item: number;
|
|
2782
|
+
difficulty: AiVariantDifficulty;
|
|
2783
|
+
difficultyReason?: string;
|
|
2784
|
+
levers?: string[];
|
|
2785
|
+
}[];
|
|
2786
|
+
/** What the item critic finds in the exemplar: flaws the variant must not repeat. */
|
|
2787
|
+
exemplarFindings: {
|
|
2788
|
+
code: string;
|
|
2789
|
+
message: string;
|
|
2790
|
+
}[];
|
|
2791
|
+
}
|
|
2792
|
+
/** One exemplar as a model is given it. */
|
|
2793
|
+
interface AiVariantExemplarFacts {
|
|
2794
|
+
/** Its index in the exemplars passed: what the variant names as its `exemplar`. */
|
|
2795
|
+
exemplar: number;
|
|
2796
|
+
type: string;
|
|
2797
|
+
/**
|
|
2798
|
+
* The exemplar in the shape a variant is written in: every word a learner
|
|
2799
|
+
* reads or hears, which options are right, and each blank's answers. No ids,
|
|
2800
|
+
* HTML, settings or addresses.
|
|
2801
|
+
*/
|
|
2802
|
+
content: Readonly<Record<string, unknown>>;
|
|
2803
|
+
/** What it tests, when the author said: the variant tests the same. */
|
|
2804
|
+
learningObjectives?: string[];
|
|
2805
|
+
targets: AiVariantTargets;
|
|
2806
|
+
}
|
|
2807
|
+
/**
|
|
2808
|
+
* A picture an exemplar shows, for a host that attaches pictures to its call:
|
|
2809
|
+
* in exemplar order, each with the `ref` the facts name it by.
|
|
2810
|
+
*/
|
|
2811
|
+
interface AiVariantImage {
|
|
2812
|
+
ref: string;
|
|
2813
|
+
exemplarIndex: number;
|
|
2814
|
+
/** Where the picture is, from the exemplar. */
|
|
2815
|
+
path: string[];
|
|
2816
|
+
alt?: string;
|
|
2817
|
+
url: string;
|
|
2818
|
+
}
|
|
2819
|
+
/**
|
|
2820
|
+
* What a host's model is given to write variants of existing items: built by
|
|
2821
|
+
* `aiVariantsRequest`, and by `aiVariantsRepairRequest` for a second pass.
|
|
2822
|
+
*
|
|
2823
|
+
* Only `feature`, `facts`, `shape` and, on a repair, `repair` are for the
|
|
2824
|
+
* model. The rest is for `checkAiVariants`: the exemplars and the other forms
|
|
2825
|
+
* as passed — answer keys and addresses included — and the host's settings.
|
|
2826
|
+
*/
|
|
2827
|
+
interface AiVariantsRequest {
|
|
2828
|
+
feature: 'variant-generation';
|
|
2829
|
+
facts: {
|
|
2830
|
+
/** One per exemplar that can be varied, in paper order. One variant is written for each. */
|
|
2831
|
+
exemplars: AiVariantExemplarFacts[];
|
|
2832
|
+
/** The level, as the host names it (`CEFR B1`): every variant stays inside it. */
|
|
2833
|
+
level: string;
|
|
2834
|
+
locale?: string;
|
|
2835
|
+
/** The default for every exemplar; each one's `targets.difficulty` says its own. */
|
|
2836
|
+
difficulty: AiVariantDifficulty;
|
|
2837
|
+
levelFacts?: AiVariantLevelFacts;
|
|
2838
|
+
/**
|
|
2839
|
+
* What happens to a picture: `describe` — the variant describes a new one
|
|
2840
|
+
* in its `alt`, for a person to find or commission; `reuse` — the variant
|
|
2841
|
+
* keeps the exemplar's and asks new questions about it.
|
|
2842
|
+
*/
|
|
2843
|
+
imagePolicy: 'describe' | 'reuse';
|
|
2844
|
+
/** Every picture the exemplars show, for a host that attaches them. Absent when there are none. */
|
|
2845
|
+
images?: AiVariantImage[];
|
|
2846
|
+
/**
|
|
2847
|
+
* The other forms' items, as their texts and right answers: what a variant
|
|
2848
|
+
* must not resemble. Absent when the host passed none.
|
|
2849
|
+
*/
|
|
2850
|
+
avoid?: {
|
|
2851
|
+
texts: string[];
|
|
2852
|
+
keys: string[];
|
|
2853
|
+
}[];
|
|
2854
|
+
/** The author's words to the model, as they are. */
|
|
2855
|
+
instructions?: string;
|
|
2856
|
+
/** What every variant must respect, as sentences a prompt can quote. */
|
|
2857
|
+
rules: string[];
|
|
2858
|
+
};
|
|
2859
|
+
/** The JSON Schema of a reply — `{ variants: [...] }` — one per exemplar in the facts. */
|
|
2860
|
+
shape: Readonly<Record<string, unknown>>;
|
|
2861
|
+
/** The exemplars as passed. Not for the model: it holds answer keys and addresses. */
|
|
2862
|
+
exemplars: readonly unknown[];
|
|
2863
|
+
/** The other forms as passed. Not for the model. */
|
|
2864
|
+
avoid?: readonly unknown[];
|
|
2865
|
+
/** The host's settings for every variant of a type. Not for the model. */
|
|
2866
|
+
settings?: AiDraftSettings;
|
|
2867
|
+
/** The host's length ratios, overriding `AI_VARIANT_LENGTH_BANDS`. Not for the model. */
|
|
2868
|
+
lengthTolerance?: {
|
|
2869
|
+
material?: number;
|
|
2870
|
+
item?: number;
|
|
2871
|
+
};
|
|
2872
|
+
/** Spread single-answer keys across positions, from this seed. Not for the model. */
|
|
2873
|
+
balanceKeyPositions?: {
|
|
2874
|
+
seed: string;
|
|
2875
|
+
};
|
|
2876
|
+
/** The exemplars that cannot be varied, and why. */
|
|
2877
|
+
skipped: AiVariantSkip[];
|
|
2878
|
+
/**
|
|
2879
|
+
* On a repair: what to write again, each with the problems the model can
|
|
2880
|
+
* fix — `variant` absent for one the model did not write. The reply holds
|
|
2881
|
+
* one variant for each, naming its exemplar.
|
|
2882
|
+
*/
|
|
2883
|
+
repair?: {
|
|
2884
|
+
exemplar: number;
|
|
2885
|
+
variant?: Readonly<Record<string, unknown>>;
|
|
2886
|
+
problems: AiDraftProblem[];
|
|
2887
|
+
}[];
|
|
2888
|
+
}
|
|
2889
|
+
/**
|
|
2890
|
+
* Why a variant is not a parallel item of its exemplar: `variant_type` — not
|
|
2891
|
+
* its type; `variant_structure` — a count a learner answers, or a setting that
|
|
2892
|
+
* scores it, differs. Always `invalid`, and repairable.
|
|
2893
|
+
*/
|
|
2894
|
+
interface AiVariantMismatch {
|
|
2895
|
+
path: string[];
|
|
2896
|
+
message: string;
|
|
2897
|
+
code: 'variant_type' | 'variant_structure';
|
|
2898
|
+
severity: 'invalid';
|
|
2899
|
+
}
|
|
2900
|
+
/** An exemplar the reply wrote no variant for. Invalid, and repairable. */
|
|
2901
|
+
interface AiVariantMissing {
|
|
2902
|
+
exemplarIndex: number;
|
|
2903
|
+
code: 'variant_missing';
|
|
2904
|
+
message: string;
|
|
2905
|
+
severity: 'invalid';
|
|
2906
|
+
}
|
|
2907
|
+
/**
|
|
2908
|
+
* One item of an exemplar and the variant's item in its place, by path from
|
|
2909
|
+
* each entry (`[]` for a loose activity or a group, `['items', '2']` for an
|
|
2910
|
+
* item in it) and by id: what lines up one form's slot with another's when
|
|
2911
|
+
* the content has no `slotKey`.
|
|
2912
|
+
*/
|
|
2913
|
+
interface AiVariantPair {
|
|
2914
|
+
exemplarPath: string[];
|
|
2915
|
+
variantPath: string[];
|
|
2916
|
+
exemplarId: string;
|
|
2917
|
+
variantId: string;
|
|
2918
|
+
}
|
|
2919
|
+
/** A variant as the SDK made it from a reply: copied fields put back, ids minted, checked and compared. */
|
|
2920
|
+
interface AiGeneratedVariant {
|
|
2921
|
+
/** Its exemplar's index in the exemplars passed. */
|
|
2922
|
+
exemplarIndex: number;
|
|
2923
|
+
/** The exemplar's type: an activity type, or `item-group`. */
|
|
2924
|
+
type: string;
|
|
2925
|
+
/** The variant: a sequence entry once `status` is `complete`. */
|
|
2926
|
+
entry: Record<string, unknown>;
|
|
2927
|
+
/**
|
|
2928
|
+
* `invalid` when `validation` is, or a mismatch says so; else `incomplete`
|
|
2929
|
+
* when `validation` is; else `complete`. A recording, or a picture to
|
|
2930
|
+
* describe, comes back with no file — `media_url_required`, so `incomplete`
|
|
2931
|
+
* — until the host attaches one.
|
|
2932
|
+
*/
|
|
2933
|
+
status: 'complete' | 'incomplete' | 'invalid';
|
|
2934
|
+
/** What `validateDraft`, or `validateItemGroupDraft`, says of it. */
|
|
2935
|
+
validation: DraftValidationResult<unknown>;
|
|
2936
|
+
/** How it fails to be parallel to its exemplar. */
|
|
2937
|
+
mismatches: AiVariantMismatch[];
|
|
2938
|
+
/** What the item critic finds, then `variant_length`, `variant_near_copy` and `variant_same_key`. */
|
|
2939
|
+
findings: ItemFinding[];
|
|
2940
|
+
/** Each item of the exemplar with the variant's item in its place. */
|
|
2941
|
+
pairs: AiVariantPair[];
|
|
2942
|
+
/** The variant as the model wrote it, for a repair. */
|
|
2943
|
+
generated: Readonly<Record<string, unknown>>;
|
|
2944
|
+
}
|
|
2945
|
+
/** What `checkAiVariants` makes of a reply. */
|
|
2946
|
+
interface AiVariants {
|
|
2947
|
+
/** The variants the reply wrote, in exemplar order. */
|
|
2948
|
+
variants: AiGeneratedVariant[];
|
|
2949
|
+
/** The exemplars it wrote none for. */
|
|
2950
|
+
missing: AiVariantMissing[];
|
|
2951
|
+
/** What only the set shows, over the variants as returned: the paper codes of `critiqueDrafts`. */
|
|
2952
|
+
findings: ItemFinding[];
|
|
2953
|
+
provenance?: AiProvenance;
|
|
2954
|
+
usage?: GraderUsage;
|
|
2955
|
+
}
|
|
2956
|
+
/** What `generateVariants` came to. */
|
|
2957
|
+
interface AiVariantsRun {
|
|
2958
|
+
/** The best pass of each variant, in exemplar order. */
|
|
2959
|
+
variants: AiGeneratedVariant[];
|
|
2960
|
+
/** The exemplars no pass wrote a variant for. */
|
|
2961
|
+
missing: AiVariantMissing[];
|
|
2962
|
+
/** What only the set shows, over the variants as they ended. */
|
|
2963
|
+
findings: ItemFinding[];
|
|
2964
|
+
/** The exemplars that could not be varied, and why. */
|
|
2965
|
+
skipped: AiVariantSkip[];
|
|
2966
|
+
/** Every call, in order: the first, then each repair. */
|
|
2967
|
+
calls: AiDraftsCall[];
|
|
2968
|
+
}
|
|
2969
|
+
export { AiTextResult as $, GradeRoutingReason as $n, DictationEquivalence as $t, AiGapSelectFacts as A, ScoringOutcome as An, TimelineCue as At, AiGroupInput as B, XAPIActor as Bn, VersionFinding as Bt, AiDraftsCall as C, ReadAloudDimension as Cn, MediaTimeline as Ct, AiFeature as D, RecordingBounds as Dn, Stimulus as Dt, AiExplanationRequest as E, ReadAloudSlowMedia as En, SequenceSlotGroup as Et, AiGradingCriterionFact as F, WrittenResponseData as Fn, DraftSeverity as Ft, AiOptionFact as G, XAPIObject as Gn, ActivityFeedback as Gt, AiItemFacts as H, XAPIContext as Hn, VersionSlot as Ht, AiGradingFacts as I, WrittenResponseLearnerResponse as In, DraftValidationResult as It, AiReadingWordFact as J, XAPIStatement as Jn, ActivityType as Jt, AiProvenance as K, XAPIResult as Kn, ActivityMedia as Kt, AiGradingJudgement as L, WrittenResponseRubric as Ln, ItemFinding as Lt, AiGeneratedVariant as M, ScriptTurn as Mn, DraftContext as Mt, AiGrade as N, ValidationError as Nn, DraftIssue as Nt, AiFillInTheBlanksFacts as O, RecordingRef as On, StimulusKind as Ot, AiGradedCriterion as P, ValidationResult as Pn, DraftNotComplete as Pt, AiSupportedActivityType as Q, GradeRouting as Qn, DictationData as Qt, AiGradingRequest as R, WrittenResponseRubricCriterion as Rn, ItemFindingSeverity as Rt, AiDrafts as S, ReadAloudData as Sn, MediaProgress as St, AiDraftsRun as T, ReadAloudLearnerResponse as Tn, SequenceSlot as Tt, AiMaterialFacts as U, XAPIContextActivities as Un, ActivityData as Ut, AiHintRequest as V, XAPIConfig as Vn, VersionPaper as Vt, AiMultipleChoiceFacts as W, XAPIError as Wn, ActivityDataMap as Wt, AiRubricCriterionFact as X, CriterionScore as Xn, DeferredReason as Xt, AiRefusal as Y, XAPIVerbObject as Yn, BlankConfig as Yt, AiSoundFact as Z, GradeRecord as Zn, DeferredScoringPartial as Zt, AiDraftCaption as _, MultipleChoiceData as _n, AiWritingFacts as _t, AiCoachingRequest as a, GapSelectBank as an, InlineCorrection as ar, AiVariantMissing as at, AiDraftSource as b, MultipleChoiceOptionMedia as bn, AiWritingFeedbackResult as bt, AiCriterionJudgement as c, GapSelectGap as cn, levenshteinDistance as cr, AiVariantSkipCode as ct, AiCritiqueFinding as d, InteractionKind as dn, AiVariantsRequest as dt, DictationLearnerResponse as en, Grader as er, AiVariantDifficulty as et, AiCritiqueFindingResult as f, ItemOutcome as fn, AiVariantsRun as ft, AiDictationFacts as g, MediaTrack as gn, AiWritingCorrection as gt, AiCritiqueResult as h, MediaPlaybackPolicy as hn, AiWordFact as ht, AiCoaching as i, FillInTheBlanksLearnerResponse as in, GradingState as ir, AiVariantMismatch as it, AiGeneratedDraft as j, ScoringResult as jn, DraftComplete as jt, AiGapFact as k, ScoringDetail as kn, TimelineChapter as kt, AiCritique as l, GapSelectLearnerResponse as ln, matchText as lr, AiVariantTargets as lt, AiCritiqueRequest as m, LearnerResponseMap as mn, AiVideoDraft as mt, AiActivityInput as n, DictationTolerance as nn, GraderKind as nr, AiVariantImage as nt, AiCoachingResult as o, GapSelectChoice as on, TextMatchPolicy as or, AiVariantPair as ot, AiCritiqueKind as p, LearnerResponse as pn, AiVerdict as pt, AiReadingFacts as q, XAPIScore as qn, ActivityResult as qt, AiBlankFact as r, FillInTheBlanksData as rn, GraderUsage as rr, AiVariantLevelFacts as rt, AiCoachingWord as s, GapSelectData as sn, TextMatchResult as sr, AiVariantSkip as st, ActivityAiPermissions as t, DictationSlowMedia as tn, GraderConfiguration as tr, AiVariantExemplarFacts as tt, AiCritiqueField as u, InteractionEvent as un, AiVariants as ut, AiDraftProblem as v, MultipleChoiceLearnerResponse as vn, AiWritingFeedback as vt, AiDraftsRequest as w, ReadAloudDimensionWeight as wn, SequenceEntry as wt, AiDraftType as x, NativeControlHint as xn, ItemGroup as xt, AiDraftSettings as y, MultipleChoiceOption as yn, AiWritingFeedbackRequest as yt, AiGradingRequestProblem as z, WrittenResponseRubricLevel as zn, VersionComparison as zt };
|
|
2970
|
+
//# sourceMappingURL=ai-Cnm0qE8v.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-Cnm0qE8v.d.ts","names":[],"sources":["../src/scoring/text-match.ts","../src/types/grading.ts","../src/types/xapi.ts","../src/types/activity.ts","../src/types/authoring.ts","../src/types/item-group.ts","../src/types/ai.ts"],"mappings":";;;;;;;;UAQiB;;EAEf;;EAEA;;;;;;;EAOA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;EAKA;;;;;;;;;;;;UAae;EACf;EACA;;;;;;iBAmDc,oBAAoB,WAAW,WAAW;;;;;;;;;;;iBAoC1C,UACd,eACA,sCACA,SAAQ,kBACP;;;;;;KCrHS;;;;;;;;;KAUA;;UAGK;EACf,MAAM;;EAEN;;EAEA;;EAEA;;;UAIe;EACf;EACA;EACA;;;UAIe;;EAEf;;;;;;EAMA;;;;;;;;;;;;;;;;EAgBA;;EAEA;;EAEA;;;;;;EAMA;;EAEA;;;;;;;EAOA;;;;;;;UAQe;;EAEf;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;KAmBU;;UASK;;EAEf;;EAEA,SAAS;;EAET;IAAgB;IAAoB;;;;UAIrB;;EAEf;;EAEA;EACA;;EAEA;IAAU;IAAe;;;EA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,YAAY;IACZ;IACA;;;EAGF;IAAoB;IAAc;;;;UAInB;;EAEf;EACA;;;;;;EAMA,SAAS,SAAS;;EAElB;EACA,SAAS;;;;;;UAOM;EACf;EACA;;EAEA;EACA;EACA;;;;;;;;;;UAWe;EACf;EACA;;IAEE,WAAW;;IAEX;IACA;;IAEA,YAAY;IACZ,aAAa;;;;;;IAMb;;IAEA,SAAS;;;;;IAKT;MAAU;MAAiB;;;IAE3B;;IAEA;;;EAGF,OAAO,SAAS;;EAEhB;;EAEA;;EAEA,WAAW;;EAEX;IAAoB;IAAmB;;;EAEvC;IAAwB;;;EAExB,SAAS;;;;;;EAMT;IACE;IACA,UAAU,SAAS;IACnB,UAAU;;;;;;;;UASG;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;;;;;;UASe;EACf;EACA;EACA;EACA;;;UAIe;;EAEf;;EAEA;;EAEA,OAAO;;;;;;;EAOP;;EAEA,YAAY;;EAEZ,YAAY;;EAEZ,UAAU;;EAEV,OAAO;;EAEP,WAAW,SAAS;;;UAIL;;EAEf,UAAU;;EAEV,SAAS;;EAET,UAAU;EACV,aAAa;EACb,QAAQ;;;UAIO;;EAEf,UAAU;;EAEV,SAAS;;EAET,UAAU;;EAEV,SAAS;;EAET,OAAO"}
|
package/dist/ai-check.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ai_writing = require("./ai-writing-
|
|
3
|
-
const require_scoring = require("./scoring-
|
|
2
|
+
const require_ai_writing = require("./ai-writing-Bh2Y53cY.cjs");
|
|
3
|
+
const require_scoring = require("./scoring-D9tFvPEG.cjs");
|
|
4
4
|
// src/ai-check/cases.ts
|
|
5
5
|
/**
|
|
6
6
|
* The items the cases are built from. Small, ordinary language-course content
|
|
@@ -556,6 +556,49 @@ function draftsCase(id, about, types, source, extra = {}) {
|
|
|
556
556
|
request
|
|
557
557
|
};
|
|
558
558
|
}
|
|
559
|
+
/** Builds a variants case, failing loudly rather than shipping one with nothing to vary. */
|
|
560
|
+
function variantsCase(id, about, exemplars, extra = {}) {
|
|
561
|
+
const request = require_ai_writing.aiVariantsRequest({
|
|
562
|
+
exemplars,
|
|
563
|
+
level: "CEFR A2",
|
|
564
|
+
...extra
|
|
565
|
+
});
|
|
566
|
+
if (request.facts.exemplars.length !== exemplars.length) throw new Error(`ai-check: an exemplar of "${id}" cannot be varied`);
|
|
567
|
+
return {
|
|
568
|
+
id,
|
|
569
|
+
feature: "variant-generation",
|
|
570
|
+
about,
|
|
571
|
+
request
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
/** A text everyone has read: a model is tempted to copy it rather than write a parallel one. */
|
|
575
|
+
const famous = {
|
|
576
|
+
schemaVersion: "1.0",
|
|
577
|
+
type: "read-aloud",
|
|
578
|
+
id: "ai-check-famous",
|
|
579
|
+
title: "Read the opening aloud",
|
|
580
|
+
referenceText: "It was the best of times, it was the worst of times, it was the age of wisdom.",
|
|
581
|
+
locale: "en-US",
|
|
582
|
+
recording: { maxSeconds: 20 },
|
|
583
|
+
scoring: { dimensions: [{
|
|
584
|
+
name: "accuracy",
|
|
585
|
+
weight: 1
|
|
586
|
+
}] }
|
|
587
|
+
};
|
|
588
|
+
/** A grammar item whose only natural answer, in any parallel sentence, is the same word. */
|
|
589
|
+
const secondConditional = {
|
|
590
|
+
schemaVersion: "1.0",
|
|
591
|
+
type: "fill-in-the-blanks",
|
|
592
|
+
id: "ai-check-second-conditional",
|
|
593
|
+
title: "If I were you",
|
|
594
|
+
instructions: "Complete the sentence. Use ONE word.",
|
|
595
|
+
passage: "If I {{be}} you, I would take the early train tomorrow.",
|
|
596
|
+
blanks: [{
|
|
597
|
+
id: "be",
|
|
598
|
+
acceptedAnswers: ["were"]
|
|
599
|
+
}],
|
|
600
|
+
scoringStrategy: "all-or-nothing"
|
|
601
|
+
};
|
|
559
602
|
/**
|
|
560
603
|
* What a host sets on every read-aloud it drafts: the SDK has no default for a
|
|
561
604
|
* recording's length or the dimensions a reading is graded on.
|
|
@@ -799,7 +842,24 @@ function aiCheckCases() {
|
|
|
799
842
|
data: tidesSummaryExam,
|
|
800
843
|
group: tidesExam
|
|
801
844
|
}),
|
|
802
|
-
gradingCase("grading-in-spanish", "The essay with mistakes, with comments asked for in Spanish", "Last weekend I go to the market and buyed a apple. My friends was there too, so we don't go home early. Then I go to the cinema.", { learnerLocale: "es" })
|
|
845
|
+
gradingCase("grading-in-spanish", "The essay with mistakes, with comments asked for in Spanish", "Last weekend I go to the market and buyed a apple. My friends was there too, so we don't go home early. Then I go to the cinema.", { learnerLocale: "es" }),
|
|
846
|
+
variantsCase("variants-choice", "A parallel version of a multiple choice", [capital]),
|
|
847
|
+
variantsCase("variants-cloze", "A parallel version of a fill-in-the-blanks", [introduction]),
|
|
848
|
+
variantsCase("variants-gaps", "A parallel version of a gap select", [landscape]),
|
|
849
|
+
variantsCase("variants-dictation", "A parallel version of a dictation", [listening]),
|
|
850
|
+
variantsCase("variants-read-aloud", "A parallel version of a text to read aloud", [weather]),
|
|
851
|
+
variantsCase("variants-writing", "A parallel version of a writing task", [weekend]),
|
|
852
|
+
variantsCase("variants-reading", "A parallel reading part: a new passage and its questions", [tides]),
|
|
853
|
+
variantsCase("variants-section", "A parallel section, harder by one step, with its keys spread", [
|
|
854
|
+
capital,
|
|
855
|
+
introduction,
|
|
856
|
+
landscape
|
|
857
|
+
], {
|
|
858
|
+
difficulty: "harder",
|
|
859
|
+
balanceKeyPositions: { seed: "ai-check" }
|
|
860
|
+
}),
|
|
861
|
+
variantsCase("variants-famous", "A parallel version of a famous opening line", [famous]),
|
|
862
|
+
variantsCase("variants-grammar-key", "A parallel grammar item whose natural answer is the same word", [secondConditional])
|
|
803
863
|
];
|
|
804
864
|
}
|
|
805
865
|
// src/ai-check/index.ts
|
|
@@ -869,6 +929,7 @@ function portFor(ports, one) {
|
|
|
869
929
|
case "pronunciation-coaching": return ports.pronunciationCoaching;
|
|
870
930
|
case "item-critique": return ports.critique;
|
|
871
931
|
case "draft-generation": return ports.drafts;
|
|
932
|
+
case "variant-generation": return ports.variants;
|
|
872
933
|
case "grading": return ports.grading;
|
|
873
934
|
default: return ports.writingFeedback;
|
|
874
935
|
}
|
|
@@ -914,6 +975,19 @@ async function runCase(ports, one) {
|
|
|
914
975
|
ms
|
|
915
976
|
} : refused(one, raw, checked.refusal, ms);
|
|
916
977
|
}
|
|
978
|
+
if (one.request.feature === "variant-generation") {
|
|
979
|
+
let next = 0;
|
|
980
|
+
const checked = require_ai_writing.checkAiVariants(raw, one.request, { newId: () => {
|
|
981
|
+
next += 1;
|
|
982
|
+
return `ai-check-${next}`;
|
|
983
|
+
} });
|
|
984
|
+
return checked.ok ? {
|
|
985
|
+
case: one,
|
|
986
|
+
ok: true,
|
|
987
|
+
variants: checked.variants,
|
|
988
|
+
ms
|
|
989
|
+
} : refused(one, raw, checked.refusal, ms);
|
|
990
|
+
}
|
|
917
991
|
if (one.request.feature === "item-critique") {
|
|
918
992
|
const checked = require_ai_writing.checkAiCritique(raw, one.request);
|
|
919
993
|
return checked.ok ? {
|