Tutorial: Build Your First Model
In this tutorial, you'll create a complete organization model using Metapad's AI assistant. By the end, you'll have departments, employees, and relationships connecting them - all built through natural language conversation.
Time required: ~10 minutes
Prerequisites
- A Metapad account (sign up free)
- A new, empty model (create one from your gallery)
Tip: Want to see the finished result first? Check out the completed tutorial model in our gallery.
Step 1: Open the AI Assistant
- Open your new model
- Click the AI icon in the toolbar (or press
Ctrl/Cmd + J) - The chat panel will open on the right side
The AI assistant can help you create node types, relationship types, instances, and connections - all from natural language descriptions.
Step 2: Create Your First Node Type
Let's start by defining what a "Department" looks like in our organization.
Type this prompt:
Create a "Department" node type with a "budget" number property and a "location" text property.
What happens:
- The AI analyzes your request
- It shows a preview: "Add node type 'Department'" with 2 properties
- Click Apply Changes to create it
You'll see "Department" appear in the Tree View under "Node Types".
Step 3: Create an Employee Type
Now let's define employees.
Type this prompt:
Create an "Employee" node type with "role" and "email" text properties.
What happens:
- Another node type is proposed
- Apply the changes
Now you have two node types: Department and Employee.
Step 4: Create a Relationship Type
We need a way to connect employees to departments.
Type this prompt:
Create a "works_in" relationship type that connects employees to departments.
What happens:
- The AI creates the relationship type
- Apply the changes
Step 5: Define the Connection Rule
Metapad uses "Allowed Connections" to define which relationships can connect which node types. Let's set this up.
Type this prompt:
Allow the works_in relationship to connect Employee nodes to Department nodes.
What happens:
- An allowed connection rule is created
- This ensures data integrity - only valid connections can be made
Step 6: Create Department Instances
Now let's add some actual departments.
Type this prompt:
Create three departments:
- Engineering (budget: 500000, location: Berlin)
- Sales (budget: 300000, location: Munich)
- HR (budget: 150000, location: Berlin)
What happens:
- Three department nodes are created with their properties filled in
- Apply the changes
Check the Tree View - you'll see your departments under "Nodes > Department".
Step 7: Create Employee Instances
Let's add some employees.
Type this prompt:
Create these employees:
- Oliver (role: CTO, email: oliver@example.com)
- Sarah (role: Sales Lead, email: sarah@example.com)
- Chris (role: HR Manager, email: chris@example.com)
- Max (role: Developer, email: max@example.com)
What happens:
- Four employee nodes are created
- Apply the changes
Step 8: Connect Employees to Departments
Now for the relationships.
Type this prompt:
Connect the employees to their departments:
- Oliver and Max work in Engineering
- Sarah works in Sales
- Chris works in HR
What happens:
- Four "works_in" relationships are created
- Apply the changes
Step 9: Visualize Your Model
Let's see what we've built!
- Create a new diagram (right-click "Diagrams" in Tree View > "New Diagram")
- Name it "Organization Overview"
- Drag your departments and employees from the Tree View onto the canvas
- The relationships will automatically appear as you add connected nodes
Arrange the nodes to create a clear organizational chart.
Step 10: Query Your Model
The AI can also help you explore your model.
Try these prompts:
Show me all employees in the Engineering department.
Response: Oliver (CTO), Max (Developer)
What's the total budget across all departments?
Response: 950,000
Which employees are in Berlin?
Response: Lists employees in Berlin-based departments
What You've Learned
Congratulations! You've just:
- Created a metamodel (node types, relationship types, allowed connections)
- Populated it with instances (departments, employees)
- Connected instances with relationships
- Visualized everything in a diagram
- Queried your model using natural language
Next Steps
- Experiment: Try adding more types like "Project" or "Skill"
- Explore templates: Check out the Template Gallery for more complex examples
- Learn concepts: Read Core Concepts to understand the theory behind metamodeling
- Collaborate: Invite a colleague and try real-time editing together
Quick Reference: Useful Prompts
| Task | Example Prompt |
|---|---|
| Create node type | "Create a Project node type with status and deadline properties" |
| Create relationship type | "Create an 'assigned_to' relationship type" |
| Allow connection | "Allow assigned_to to connect Employee to Project" |
| Create instances | "Create three projects: Alpha, Beta, and Gamma" |
| Create relationships | "Assign Oliver to Project Alpha" |
| Query model | "Which projects have no assigned employees?" |
| Update data | "Change Oliver's role to CEO" |
Happy modeling!