Learn how to connect ALOC's curriculum data and step-by-step reasoning directly to LLM agents (Claude / GPT-4) to deliver pedagogical Socratic tutoring without spoiling answers.
Standard LLM question-answering immediately reveals the correct option and solution. Socratic tutoring inverts this behavior by providing progressive scaffolding:
Prompts the student to recall the underlying law or formula (e.g. Newton's 2nd Law).
Diagnoses why a specific distractor was chosen (e.g. forgot to square the radius).
Reveals the full step-by-step solution only after repeated attempts.
Our official package @massteck/aloc-mcp-server provides tools like aloc_search_questions and aloc_get_question_explanation:
// mcp-config.json
{
"mcpServers": {
"aloc": {
"command": "npx",
"args": ["-y", "@massteck/aloc-mcp-server"],
"env": {
"ALOC_API_KEY": "alc_live_your_key_here",
"ALOC_BASE_URL": "https://dev.aloc.com.ng/api/v1"
}
}
}
}Using TypeScript and LLM system prompts, enforce progressive scaffolding:
import { QuestionsApi, ExplanationsApi, Configuration } from "@massteck/aloc-sdk";
const aloc = new QuestionsApi(new Configuration({ apiKey: process.env.ALOC_API_KEY }));
const explainer = new ExplanationsApi(new Configuration({ apiKey: process.env.ALOC_API_KEY }));
export async function handleStudentAttempt(questionId: string, selectedOption: string) {
// 1. Fetch explanation & misconception models
const explanation = await explainer.explainQuestion({
id: questionId,
explainQuestionRequest: { depth: "step_by_step" },
});
const isCorrect = selectedOption.toLowerCase() === explanation.data.correctAnswer?.toLowerCase();
if (isCorrect) {
return {
status: "correct",
feedback: "Excellent! You applied the principle correctly.",
};
}
// 2. Return remedial hint without giving away the answer
return {
status: "incorrect",
hint: explanation.data.simplifiedExplanation,
misconceptions: explanation.data.commonMistakes,
};
}Learn how to generate and export complete exam papers in Python.