Edu SDKEdu SDK
Core

createPracticeProblems

Generate practice problems from educational content.

Generates practice problems from educational content. Each problem includes a hint, an answer, and a worked solution.

Usage

import { createPracticeProblems } from "edu-sdk";

const problems = await createPracticeProblems({
  model: "google/gemini-3.6-flash",
  content,
  count: 5,
  difficulty: "medium"
});

Options

OptionTypeRequiredDefault
modelstring | LanguageModelYes
contentstringYes
countnumber (positive int)Yes
difficulty"easy" | "medium" | "hard"No"medium"

Returns

Promise<PracticeProblem[]>

Each problem contains:

{
  question: string;
  hint: string;
  answer: string;
  solution: string;
}

Example

import { createPracticeProblems } from "edu-sdk";

const problems = await createPracticeProblems({
  model: "google/gemini-3.6-flash",
  content: worksheetNotes,
  count: 6,
  difficulty: "hard"
});

Render with <PracticeProblems />.

On this page