Fable Data and AI Design

Part of Fable. Infrastructure: Fable Technology and Infrastructure.

Proposed entities

EntityKey contents
ProfileUser ID, German level, explanation language, interests
Grammar topicStable topic ID, language code, aliases, suggested level, links to explanations
Grammar explanation versionTopic ID, specific question or construction, explanation language and level, rule, examples, exceptions, review status, provenance
StoryShared catalog ID, title, language, normalized topic, sharing eligibility
Story versionImmutable text, stable sentence IDs, requested level, grammar focus, generation model and prompt versions, validation state
Story level checkStory version, estimated level, choice probabilities, Jev model and rubric versions, outcome, check time
Learner storyUser ID, story version, library state, reading position
Contextual explanationStory version, selected passage, question, explanation language, structured response, optional wiki version reference
Saved vocabularyOwner, language, lemma or phrase, original form, grammatical details, linked story contexts
QuizStory version, questions, answer key, explanations, supporting sentence IDs
AttemptOwner, quiz ID, answers, score, assistance usage, submission time
Reading sessionOwner, story version, position, completion state, timestamps
JobOwner, operation, idempotency key, status, attempts, lease, error, result reference
FeedbackOwner, story or wiki version, issue category, optional comment

Store German content with language_code = de. Reading progress, attempts, saved words, and private story access belong to the learner. Shared content carries no learner identifiers or raw prompts.

Story generation pipeline

  1. Validate requested level, length, topic, and optional German grammar focus.
  2. Look for an eligible, ready German story and quiz matching the normalized topic, requested level, length band, and grammar focus. Prefer a version the learner has yet to read. A hit links that version to the learner and skips generation and level checking.
  3. On a miss, use a versioned prompt with level-specific guidance to generate the story and 3–5 comprehension questions as a structured package. Check language, length, schema, sentence IDs, grammar examples, and answer evidence.
  4. Run the Jev level check before making the package ready. Retry failed generation or validation within the job’s retry budget. Show a recoverable failure if the package cannot be accepted.
  5. Store accepted text and quiz together as an immutable version. Keep failed attempts visible to admins through job records. Persist any generated candidates needed for review as restricted records. Regeneration creates a new version while saved references stay pinned.

Share packages generated from reusable topic inputs. Restrict stories based on private or identifying input to the requesting learner and authorized admins. Coalesce simultaneous misses for the same reusable request so one job can serve both learners.

Story difficulty with Jev

Use a server-side Jev Choice question with defined options for A1, A2, B1, outside the supported range, and unclear. Send the German story text and a versioned reading rubric. Assess the text independently of the requested level. Base the rubric on vocabulary familiarity, sentence complexity, cohesion, and how much the reader must infer. TypeSafe model documentation, Council of Europe CEFR Companion Volume

Benchmark a pinned Jev version on separately reviewed German texts across A1–B1, including borderline and harder examples. Use a tuning set for the rubric and confidence threshold, then check agreement and errors on a held-out set. Record the requested level, estimate, probabilities, model version, rubric version, and outcome for each story version.

Once the benchmark supports automatic acceptance, accept a confident match that passes the other content checks. Route uncertain or mismatched results to admin review after bounded retries. An admin can confirm the requested level and release the package, or reject it. While accuracy is being established, Jev provides an estimate and an admin confirms difficulty before a story enters the reusable pool. If the provider is unavailable, record the error and retry or route the story to review. The estimate describes story difficulty.

Contextual word help

Send the selected form, its sentence, and limited nearby context. Return a contextual meaning, lemma, part of speech, relevant grammatical features, and an example. Handle separable verbs, compounds, inflected forms, idioms, and multiword expressions explicitly.

Never derive a German noun’s article from its ending alone. If the system cannot confidently establish a grammatical fact, show uncertainty or omit the field. A reviewed dictionary integration can improve reliability later, subject to licensing and coverage evaluation.

Grammar help and shared wiki

  1. Resolve a question to a stable German topic and a specific construction or question intent. Look up an active wiki explanation that matches the topic, intent, explanation language, and applicable learner level. Use aliases for common phrasings.
  2. On a hit, return that explanation directly with no generation call. For sentence questions, show the saved rule alongside the learner’s selected sentence. Highlight how the rule applies only when the construction can be verified in that sentence.
  3. On a miss, generate and validate a structured general explanation with a short rule, examples, and relevant exceptions. Create a canonical topic if the reusable construction has no topic yet. Save the reusable entry as AI-generated and unreviewed. Generate missing explanations as questions arrive so the wiki grows one entry at a time. Use a unique lookup key and one in-flight job per reusable explanation to prevent duplicate work on simultaneous misses.
  4. Keep learner-specific questions and passage details private. If a question cannot be safely mapped to a reusable topic or needs a case-specific answer, keep that answer scoped to the learner and passage. A distinct construction under an existing topic can add a new explanation without rewriting the topic.
  5. Admins can inspect, correct, approve, or withdraw entries. Corrections create a new active version, and withdrawn versions are ineligible for reuse. Show the active entry’s AI provenance and review status.

For example, the first A2 learner asking in English about dative after mit creates the entry. A second A2 learner asking why the phrase is mit dem Bus gets that entry when the question resolves to the same construction. A question about the dative object of helfen uses a different entry.

Treat learner-entered text as data. Keep database credentials and tool access outside the model.

Comprehension and progress

Review the sample packages for natural German, correct grammar, unambiguous questions, accurate evidence, and helpful explanations.

For the first release, use choice-based questions with server-side scoring. Keep correct answers out of the pre-submission API response. Return supporting passages and explanations after submission. Store repeat attempts separately and track whether help was used.

Scores describe performance on that story. Level recommendations, if introduced later, should combine several sessions and learner feedback rather than promote a learner after one high score.