Precedent Network¶
The precedent network provides case-based reasoning through semantic similarity matching. Cases with similar ethical situations connect through embedding-based similarity scores.
Overview¶
Precedent discovery identifies cases with similar:
- Fact patterns
- Ethical reasoning
- Code provisions
- Professional contexts
Accessing Precedent Discovery¶
From Navigation¶
Navigate to Case Relations > Similar Cases in the navigation bar.
Direct URL: /cases/precedents/
From Cases List¶
Each case card includes a Find Similar link (blue badge) that opens precedent discovery with that case pre-selected.
From Case Structure¶
On any case Structure page, click Find More Precedents in the Similar Cases sidebar.
Precedent discovery page showing similar cases ranked by component-aware similarity
Using Precedent Discovery¶
Select Source Case¶
- Open Precedents page
- Select a case from the dropdown
- View similar cases ranked by similarity
View Matches¶
Results are presented as ranked cards, one per similar case. Each card shows:
| Element | Description |
|---|---|
| % Similar | Overall component-aware similarity |
| Retrieval Scores | Component similarity (the weighted nine-component embedding), provision overlap, and tag overlap |
| Component Breakdown | Expandable per-component similarity across the nine D-tuple components |
| Section Comparison | Collapsible facts/discussion similarity, shown for reference and not used in scoring |
Explore Matches¶
Click any match to view case details and compare analysis.
Interpreting Results¶
High Similarity (0.8+)¶
Cases with very similar fact patterns, ethical issues, and professional contexts. Suitable for direct precedent comparison.
Moderate Similarity (0.5-0.8)¶
Cases sharing related ethical concepts, similar role structures, or comparable dilemmas. Provides broader context.
Low Similarity (< 0.5)¶
Cases with limited connection but potential insights.
Similarity Network Visualization¶
The Similarity Network provides a visual overview of all cases and their relationships.
Navigate to Case Relations > Similarity Network or direct URL: /cases/precedents/network
Force-directed graph showing case relationships with color-coded outcomes
Node Colors (by Outcome)¶
| Color | Outcome |
|---|---|
| Green | Ethical |
| Red | Unethical |
| Orange | Mixed |
| Gray | Unknown/Unclear |
Edge Colors (by Similarity Score)¶
| Color | Score Range | Meaning |
|---|---|---|
| Green | > 0.5 | High similarity |
| Yellow | 0.3 - 0.5 | Moderate similarity |
| Red | < 0.3 | Low similarity |
Interacting with the Network¶
Click a Node - Displays case details panel showing title, outcome type, NSPE Code provisions, entity count, and connection count.
Click an Edge - Displays similarity breakdown with component scores for facts, discussion, provisions, outcome, tags, and principles.
Navigation - Drag nodes to reposition, scroll to zoom, click background to pan.
Filtering Options¶
Minimum Score Threshold¶
Use the Min dropdown to filter edges:
| Threshold | Result |
|---|---|
| 0.2 | Most relationships |
| 0.3 | Default balanced view |
| 0.4 | Higher similarity only |
| 0.5 | Strong relationships only |
Similarity Component Filters¶
| Filter | Description |
|---|---|
| Provisions | Cases sharing NSPE Code sections |
| Tags | Shared subject tags |
Entity-overlap filters restrict edges to cases sharing extracted entities.
Entity Overlap Filters¶
Filter by shared entities using the concept buttons (R, P, O, S, Rs, A, E, Ca, Cs).
Layout Options¶
| Layout | Description | Best For |
|---|---|---|
| Force | Physics-based simulation | Discovering clusters |
| Circular | All cases in a circle | Seeing all connections |
| Grid | Regular grid pattern | Dense networks |
| Radial | Grouped by outcome | Comparing outcomes |
Focus Mode¶
Network with a specific case focused and highlighted
Use URL parameter to focus: /cases/precedents/network?case_id=7
Similarity Components¶
The network uses six similarity factors:
| Component | Method | Description |
|---|---|---|
| Facts Similarity | Cosine | Semantic similarity of case facts |
| Discussion Similarity | Cosine | Semantic similarity of ethical analysis |
| Provision Overlap | Jaccard | NSPE Code section overlap |
| Outcome Alignment | Categorical | Ethical/unethical match |
| Tag Overlap | Jaccard | Subject tag overlap |
| Principle Overlap | Jaccard | Ethical principle conflicts |
Technical Details¶
Embedding Model¶
Default: all-MiniLM-L6-v2 (sentence-transformers)
- 384 dimensions
- Optimized for semantic similarity
Similarity Calculation¶
Cosine similarity between embeddings:
- 1.0 = Identical
- 0.8+ = Very similar
- 0.5-0.8 = Moderately similar
- < 0.5 = Dissimilar
The overall score is a component-aware weighted metric over the nine-component embeddings, combined with provision and tag overlap. Facts/discussion section similarity is displayed for reference and does not contribute to the score.
Related Pages¶
- Browsing Cases - Navigate the case repository
- Viewing Extractions - View extracted entities
- Guidelines - Browse professional codes