AxiomEngine
Study-plan generation with graph-derived prerequisites and deterministic output ordering.
- Interface
- HTTP API
- Language
- Go
- Typed model calls
- BAML
- Model provider
- AWS Bedrock
Illustrative simulation with fixed example data. No live model or service is called.
Problem
A study plan needs a prerequisite order, not just a list of topics. AxiomEngine combines declared assessment deficits with a curriculum knowledge graph: concepts connected by typed relationships. Generated study items use a declared VARK preference—visual, auditory, read/write or kinesthetic—as an input, not evidence of educational effectiveness.
How it works
The service validates the request, extracts nearby graph context and plans for each failed topic in parallel. It then merges results and uses the graph again to replace prerequisite chains and assign priorities.
Return ordered items; resources and explanations remain unvalidated.
All components
- Validate request
Validate identifiers, declared preference and known failed topics before any model call.
- Extract subgraph
Read a depth-2 neighborhood and graph-derived prerequisite order.
- Concept graph
The in-memory graph supplies depends_on and is_a relationships to extraction and validation.
- Topic 1
Generate one topic plan with a timeout and shared circuit breaker.
- Topic n
Topic calls run in parallel and write to their assigned slots.
- Merge
De-duplicate items in request-topic order; a topic failure fails the request.
- Validate against the graph
Drop unknown topics, replace prerequisite chains and assign consecutive priorities.
- Study plan
Return ordered items; resources and explanations remain unvalidated.
Validate the request
The service checks identifiers, VARK preference and failed topics. It trims and de-duplicates topics, then rejects unknown concepts before any model call.
Validate before planning
- Request
- Checked
- Accepted
More detail
- VARK: visual, auditory, read/write, kinesthetic
- Safe IDs: letters, digits, dot, underscore, colon or hyphen; up to 128 characters
- Trim spaces and remove duplicate topics
- 1–10 unique topics with the default limit
- Every topic exists in the graph
Learning-style, identifier and topic checks either accept the request or stop it with 400/422 before any model call.
Extract nearby graph context
A breadth-first traversal follows relationships in both directions. Plan generation uses depth two and de-duplicates the resulting tuples.
Two hops of graph context
- Depth 0
- Depth 1
- Depth 2
More detail
Polymorphism
Inheritance / Generics / Design Patterns
Classes / Interfaces
Breadth-first search follows both directions for two hops; encountered tuples become the planning context.
Build prerequisite chains
A depth-first traversal orders dependencies before the target concept. Each topic call receives this graph-derived chain together with local graph context.
Deepest prerequisites first
- Variables
- Objects
- Classes
- Inheritance
More detail
DFS post-order
Then the target: Polymorphism
Depth-first post-order puts four prerequisites before Polymorphism, excluding the target from its own chain.
Plan for topics in parallel
Each failed topic gets one model call with a timeout and a shared circuit breaker. Results are written to assigned slots rather than completion order.
Parallel work, shared protection
- Request
- Design Patterns
- Merge Sort
- Shared circuit breaker
- Stopped
More detail
One call per failed topic runs in parallel under a per-topic deadline and shared breaker; any failure stops the whole request.
Merge in request order
The service reads slots in request-topic order and keeps the first item for each topic. Faster calls cannot move their items ahead merely by finishing first.
Keep request order, drop repeats
- Finish order: 2
- Finish order: 1
- Merge order
More detail
Finish order: 2 → 1
Merge order: 1 → 2
- 1Classes
- 2Objects
- 3Functions
Results stay in request slots, so merging follows request order and keeps the first occurrence of each topic.
Validate the plan against the graph
Unknown output topics are dropped. Graph-derived chains replace model chains; a stable sort then assigns consecutive priorities.
Ground the draft in the graph
- Model draft
- Graph
- Plan
More detail
Model draft
MonadsUnknown topic
Plan
- 1Variables
- 2Objects
- 3Classes
- 4Inheritance
- 5Polymorphism
Chain replaced: Variables → Objects → Classes → Inheritance
Unknown topics are dropped, supplied chains are replaced, and first-appearance ranks become contiguous priorities.
Details
Concept graph
The graph connects concepts through dependency and category relationships. Prerequisite chains use a depth-first traversal; local context uses a breadth-first traversal in both directions.
Illustrative simulation with fixed example data. No live model or service is called.
Parallel planning
Each topic call writes to an assigned result slot. Merging follows request-topic order, so a faster response cannot gain precedence simply by finishing first. Any failed call fails the whole request.
Illustrative simulation with fixed example data. No live model or service is called.
Validation against the graph
Unknown output topics are dropped. The graph replaces the draft’s prerequisite chains, determines topic ranks and assigns consecutive priorities.
Illustrative simulation with fixed example data. No live model or service is called.
Decisions and tradeoffs
Let the graph own prerequisites
The model’s prerequisite chains are replaced, not merely checked. Priorities follow graph-derived ranks after a stable sort.
The graph is the ordering authority
- Model draft
- Graph
- Plan
More detail
Graph checks override the draft’s topics, chains and priorities; resource wording remains model-produced and unchecked.
Separate concurrency from ordering
Indexed slots preserve request order despite different completion times. Merging keeps the first item for each topic.
Completion order is not output order
- Finish order
- Slot
- Same merge order
More detail
Arrival A
Arrival B
Same merge order
Per-topic slots preserve the request-order merge regardless of which planning call finishes first.
Bound upstream failure
Topic calls share a circuit breaker that opens after three consecutive failures. Its open timeout is 15 seconds; each topic also has its own call timeout.
Reject unhealthy calls quickly
- Closed
- Open
- Half-open
More detail
Tradeoff: requests can be rejected quickly
Three consecutive failures open the breaker; recovery probes trade some immediate availability for fast rejection.
Reject malformed graph input
The loader rejects unknown JSON fields, empty values, unsupported relations and self loops. It trims fields and de-duplicates valid tuples before building the graph.
Only well-formed relations enter
- Graph input
- Checked
- Supported relation
More detail
- Unknown fields
- Empty fields
- Unsupported relation
- Self loop
Unknown fields, empty values, unsupported relations and self loops reject the graph; exact duplicate tuples collapse.
Fail rather than return a partial plan
Any failed topic fails the whole request. Successful fragments from the remaining calls are not returned as a partial plan.
A plan is all or nothing
- Another topic fails
- Stopped
- No partial plan
More detail
An upstream error, open circuit or timeout fails the request rather than returning an incomplete partial plan.
Limitations
Resources and explanations remain unchecked
Go does not validate resource URLs, titles, types or explanation text. Graph validation corrects structure, not the quality of that generated content.
Ordering is not content validation
- Model draft
- Checked
- Unchecked
More detail
Topics, chains, order
- Resource title
- Resource link
- Resource type
- Explanation
The graph does not validate resource titles, links, types or explanation text, so ordering is not a quality guarantee.
The loader does not check cycles
Malformed tuples and self loops are rejected, but the loader does not detect cycles across several nodes. A visited set prevents graph traversal from looping indefinitely.
Termination is not cycle validation
- Topic A
- Topic B
- Topic C
More detail
Hypothetical cycle — not the bundled graph
- 1Topic A
- 2Topic B
- 3Topic C
Prerequisite order is not guaranteed
A visited set makes traversal terminate even in a cyclic curriculum, but it does not establish a valid prerequisite order.
The seed graph is small
The repository’s seed contains 20 relationships in a computer-science curriculum. It is a bounded example, not a complete curriculum.
A small curriculum example
- Bundled curriculum
- Operator-supplied graph
More detail
Bundled curriculum
The bundled example has 20 relations across computing topics; an operator-supplied graph replaces it for another curriculum.
No learning-outcome claims
Plans are not checked for completeness or educational quality. VARK is a declared preference, and the cognitive graph’s default “mastered” label is not evidence of mastery.
A valid order is not a learning outcome
- Study order
- Learner outcomes
More detail
- Graph membership
- Prerequisite chains
- Topic order
- Learning gains
- Teaching effectiveness
- Plan quality
Topic validation and prerequisite ordering do not measure whether a learner improves or whether the plan teaches well.