compass.validation.graphs.setup_graph_correct_jurisdiction_from_url#
- setup_graph_correct_jurisdiction_from_url(jurisdiction, **kwargs)[source]#
Build a decision tree for validating jurisdictions from URLs
- Parameters:
jurisdiction (
compass.utilities.location.Jurisdiction) – Jurisdiction descriptor supplying state, county, and subdivision phrases used in prompts.**kwargs – Additional keyword arguments forwarded to
compass.common.base.setup_graph_no_nodes().
- Returns:
networkx.DiGraph– Graph that queries whether a URL explicitly references the jurisdiction’s state, county, and subdivision names and returns a JSON verdict.
Notes
The graph aggregates boolean keys such as
correct_stateandcorrect_county. The final prompt instructs the LLM to emit a JSON document describing each match plus an explanatory string.