AtlasML Models
Module: atlasml/models/competency.py. These Pydantic models define the API contracts and core DTOs. They are validated automatically by FastAPI and rendered in OpenAPI, enabling type-safe client generation and consistent error handling.
Core Types
-
OperationType:UPDATE|DELETE. Indicates whether a request should upsert or remove records. UseUPDATEfor both creating and modifying entries. -
Competency. Represents a single competency item identified within a course. It is the core unit for suggestions, relations, and persistence.id: inttitle: strdescription: Optional[str]course_id: int
-
ExerciseWithCompetencies. Captures an exercise artifact and optional competency links. Useful when associating learning content with one or more competencies.id: inttitle: strdescription: strcompetencies: Optional[list[int]]course_id: int
-
SemanticCluster. Describes a group identifier, its course context, and a vector embedding. This can support clustering and labeling workflows.cluster_id: strcourse_id: intvector_embedding: list[float]
Request/Response DTOs
-
SuggestCompetencyRequest. Input payload for retrieving recommended competencies. Provide a natural-languagedescriptionand thecourse_idfor contextualization.description: strcourse_id: int
-
SuggestCompetencyResponse. Output with a ranked list ofCompetencyobjects. Consumers can display, filter, or post-process suggestions as needed.competencies: list[Competency]
-
SaveCompetencyRequest. Wrapper for saving either a list of competencies, a single exercise, or both, along with anoperation_type. This unifies create/update/delete behaviors behind a single endpoint.competencies: Optional[list[Competency]]exercise: Optional[ExerciseWithCompetencies]operation_type: OperationType
-
RelationType:MATCHES|EXTENDS|REQUIRES. Encodes the semantics of edges in a competency graph (e.g., prerequisites or hierarchical relationships). -
CompetencyRelation. Directed edge fromtail_idtohead_idwith an associatedrelation_type. Used to represent candidate or curated links among competencies.tail_id: inthead_id: intrelation_type: RelationType
-
CompetencyRelationSuggestionResponse. Collection of proposed relations for a course. Downstream systems may visualize, validate, or persist these links.