Skip to content

Concept elaborations#159

Open
Luburic wants to merge 51 commits into
developmentfrom
feat/elaboration
Open

Concept elaborations#159
Luburic wants to merge 51 commits into
developmentfrom
feat/elaboration

Conversation

@Luburic
Copy link
Copy Markdown
Contributor

@Luburic Luburic commented Apr 12, 2026

Change Goal

  • Instructors can define concept records to support student elaborations.
  • Learners can practice oral exam-like interviews around a concept to improve their thought articulation and knowledge verbalization.

Database Changes

CREATE SCHEMA IF NOT EXISTS elaborations;

CREATE TABLE elaborations."ConceptElaborationTasks" (
    "Id"          integer GENERATED BY DEFAULT AS IDENTITY,
    "UnitId"      integer NOT NULL,
    "Order"       integer NOT NULL,
    "Title"       text    NOT NULL,
    "Description" text    NOT NULL,
    CONSTRAINT "PK_ConceptElaborationTasks" PRIMARY KEY ("Id")
);

CREATE INDEX "IX_ConceptElaborationTasks_UnitId_Order"
    ON elaborations."ConceptElaborationTasks" ("UnitId", "Order");

CREATE TABLE elaborations."ConceptRecords" (
    "Id"                       integer GENERATED BY DEFAULT AS IDENTITY,
    "ConceptElaborationTaskId" integer NOT NULL,
    "CanonicalDefinition"      text    NOT NULL,
    "KeyPropositions"          jsonb   NOT NULL,
    "CommonMisconceptions"     jsonb   NOT NULL,
    "KeyRelations"             jsonb   NOT NULL,
    CONSTRAINT "PK_ConceptRecords" PRIMARY KEY ("Id"),
    CONSTRAINT "FK_ConceptRecords_ConceptElaborationTasks_ConceptElaborationTaskId"
        FOREIGN KEY ("ConceptElaborationTaskId")
        REFERENCES elaborations."ConceptElaborationTasks" ("Id")
        ON DELETE CASCADE
);

CREATE UNIQUE INDEX "IX_ConceptRecords_ConceptElaborationTaskId"
    ON elaborations."ConceptRecords" ("ConceptElaborationTaskId");

CREATE TABLE elaborations."ConversationAttempts"
(
    "Id" integer NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "ConceptElaborationTaskId" integer NOT NULL,
    "LearnerId" integer NOT NULL,
    "Status" integer NOT NULL,
    "StartedAt" timestamp with time zone NOT NULL,
    "CompletedAt" timestamp with time zone,
    "FinalGrade" double precision NOT NULL,
    "TotalTargets" integer NOT NULL,
    "MaxRounds" integer NOT NULL,
    CONSTRAINT "PK_ConversationAttempts" PRIMARY KEY ("Id")
);

CREATE INDEX "IX_ConversationAttempts_ConceptElaborationTaskId_LearnerId"
    ON elaborations."ConversationAttempts" ("ConceptElaborationTaskId", "LearnerId");

CREATE TABLE elaborations."ConversationRounds"
(
    "Id" integer NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "ConversationAttemptId" integer NOT NULL,
    "Order" integer NOT NULL,
    "ElaborationContent" text NOT NULL,
    "SubmittedAt" timestamp with time zone NOT NULL,
    "FeedbackContent" text,
    "Probes" jsonb NOT NULL,
    CONSTRAINT "PK_ConversationRounds" PRIMARY KEY ("Id"),
    CONSTRAINT "FK_ConversationRounds_ConversationAttempts_ConversationAttempt~" FOREIGN KEY ("ConversationAttemptId")
        REFERENCES elaborations."ConversationAttempts" ("Id") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE CASCADE
);

CREATE INDEX "IX_ConversationRounds_ConversationAttemptId_Order"
    ON elaborations."ConversationRounds" ("ConversationAttemptId", "Order");

CREATE TABLE elaborations."RoundEvaluations"
(
    "Id" integer NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "ConversationRoundId" integer NOT NULL,
    "Assessments" jsonb NOT NULL,
    "TriggeredMisconceptions" jsonb NOT NULL,
    CONSTRAINT "PK_RoundEvaluations" PRIMARY KEY ("Id"),
    CONSTRAINT "FK_RoundEvaluations_ConversationRounds_ConversationRoundId" FOREIGN KEY ("ConversationRoundId")
        REFERENCES elaborations."ConversationRounds" ("Id") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE CASCADE
);

CREATE UNIQUE INDEX "IX_RoundEvaluations_ConversationRoundId"
    ON elaborations."RoundEvaluations" ("ConversationRoundId");

Luburic added 30 commits March 25, 2026 11:16
…me we change the data model. This change will improve agentic workflow.
…y message as something that needs to be evaluated.
…rce consistent behavior across agent implementations and reduce duplication.
… VOs. Simplifies Agent structure, but will need additional work.
Luburic added 21 commits April 28, 2026 08:14
…ing and decisions into one, hopefully easier-to-understand, flow.
…valuation to per-KP/KR precision evaluation.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 11, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant