VGL Guide — Decision Tree
Estimated reading time: 1 minutes.
Decision Tree
Decision logic as questions, choices and outcomes, read top to bottom.
Node types
DecisionPoint— a question determining which path to followChoice— a potential answer branching from a questionOutcome— a terminal result
Edge types
decision_to_choice— DecisionPoint → Choice (the question branches)choice_to_decision— Choice → DecisionPoint (the option leads to a further question)choice_to_outcome— Choice → Outcome (the option terminates)
A decision logic graph for a hiring process showing how a series of questions leads to distinct outcomes:
vgraph hiringDecision: DecisionTree "Should We Hire This Candidate?" {
// Opening decision point
node q1: DecisionPoint "Is the candidate technically qualified?";
node c1: Choice "Yes";
node c2: Choice "No";
// Follow-up question for qualified candidates
node q2: DecisionPoint "Does the candidate fit the team culture?";
node c3: Choice "Yes";
node c4: Choice "No";
// Terminal outcomes
node o1: Outcome "Extend offer";
node o2: Outcome "Reject — technical skills insufficient";
node o3: Outcome "Reject — poor cultural fit";
// Branch from first question
edge q1 -> c1: decision_to_choice;
edge q1 -> c2: decision_to_choice;
// Path for unqualified candidate leads directly to outcome
edge c2 -> o2: choice_to_outcome;
// Qualified candidates proceed to culture question
edge c1 -> q2: choice_to_decision;
edge q2 -> c3: decision_to_choice;
edge q2 -> c4: decision_to_choice;
// Final outcomes
edge c3 -> o1: choice_to_outcome;
edge c4 -> o3: choice_to_outcome;
}
Home