Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compass/data/conus_jurisdictions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -10242,7 +10242,7 @@ Illinois,Perry,Swanwick,precinct,1714593348,
Illinois,Perry,Tamaroa No. 1,precinct,1714593384,
Illinois,Perry,Tamaroa No. 2,precinct,1714593386,
Illinois,Perry,Willisville,village,1781867,
Illinois,Perry,,county,17145,https://perryil.com/
Illinois,Perry,,county,17145,https://perrycountyil.gov/
Illinois,Piatt,Bement,village,1705144,
Illinois,Piatt,Blue Ridge,township,1714706808,
Illinois,Piatt,Cerro Gordo,village,1712268,https://fathill.com/
Expand Down
2 changes: 1 addition & 1 deletion compass/extraction/ghp/geothermal_heat_pump_schema.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"properties": {
"outputs": {
"type": "array",
"description": "Sparse long-form extraction table. Include only features with an enacted, explicit requirement and emit **at most one row per feature**. Never infer, imply, or guess a requirement from related context.",
"description": "Sparse long-form extraction table. Include only features with an enacted, explicit requirement in the source text and emit **at most one row per feature**. Never infer, imply, or guess a requirement from related context. If no in-scope features exist in the source text, this should be an empty array.",
"items": {
"type": "object",
"required": [
Expand Down
16 changes: 8 additions & 8 deletions compass/extraction/ghp/plugin_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ heuristic_keywords:
- "injection well"
- "wellbeing"
- "well-being"
- "wellness"
- "as well as"
- "theater"

collection_prompts: True

extraction_system_prompt: |-
You are a legal scholar extracting structured data from geothermal ground source heat pump ordinances.
Be focused and literal: extract only enacted, explicit, in-scope requirements.
Be thorough and complete: review all relevant sections, including tables and
lists, so no explicitly stated feature is missed.
Before finalizing, perform a feature-coverage check against the schema enum and
ensure each explicitly supported feature is captured exactly once.
Pay extra attention to any descriptions, instructions, examples, and definitions in the schema,
and be sure to follow all schema instructions carefully.
You are a legal scholar extracting structured data specifically about **geothermal ground source heat pumps, geothermal heat exchanges, or similar** from ordinance documents.
Be focused and literal: extract only enacted, explicit, in-scope requirements: {scope}.
Be thorough and complete: review all relevant sections, including tables and lists, so no explicitly stated feature is missed.
Before finalizing, perform a feature-coverage check against the schema enum and ensure each explicitly supported geothermal ground source heat pump, geothermal heat exchange, or similar feature is captured exactly once.
If there is no data to extract for geothermal ground source heat pumps, geothermal heat exchanges, or similar, or geothermal definitions, return an empty array for the "outputs" array. Do not fabricate or infer any data. If a feature is not explicitly stated in the ordinance, leave it out of the output.
Pay extra attention to any descriptions, instructions, examples, and definitions in the schema, and be sure to follow all schema instructions carefully.
2 changes: 2 additions & 0 deletions compass/plugin/one_shot/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,14 @@ async def parse(self, text, jurisdiction):
)

todays_date = datetime.now().strftime("%B %d, %Y")
scope = self.SCHEMA.get("$scope")
sys_prompt = (
f"{self.SYSTEM_PROMPT}\n\n{_DATA_PARSER_ADDITIONAL_CONTEXT}"
)
sys_prompt = sys_prompt.format(
desc=desc,
schema=self.SCHEMA,
scope=scope or "unknown",
todays_date=todays_date,
jur_type=jurisdiction.type,
jur_state=jurisdiction.state,
Expand Down
1 change: 1 addition & 0 deletions compass/utilities/costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"gpt-5.6-sol": {"prompt": 5, "response": 30},
"gpt-5.6-terra": {"prompt": 2, "response": 12},
"gpt-5.6-luna": {"prompt": 0.2, "response": 1.2},
"gpt-5.6-luna-aws": {"prompt": 0.22, "response": 1.32},
"compassop-gpt-4o": {"prompt": 2.5, "response": 10},
"compassop-gpt-4o-mini": {"prompt": 0.15, "response": 0.6},
"compassop-gpt-4.1": {"prompt": 2, "response": 8},
Expand Down