-
Notifications
You must be signed in to change notification settings - Fork 2
Update to prompts #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to prompts #357
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #357 +/- ##
==========================================
+ Coverage 43.32% 43.33% +0.01%
==========================================
Files 45 45
Lines 4240 4241 +1
Branches 380 380
==========================================
+ Hits 1837 1838 +1
Misses 2378 2378
Partials 25 25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors repeated prompt instruction text by introducing a YES_NO_PROMPT template variable to reduce code duplication and simplify future prompt adjustments across all graph-based extraction and validation modules.
Key Changes:
- Added
_YES_NO_PROMPTconstant incompass/common/base.pycontaining "Please start your response with either 'Yes' or 'No' and briefly explain your answer." - Registered
YES_NO_PROMPTas a graph-level template variable insetup_graph_no_nodes() - Replaced 50+ occurrences of the repeated yes/no instruction text with
{YES_NO_PROMPT}across validation and extraction modules
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| compass/common/base.py | Added _YES_NO_PROMPT constant definition and registered it in the graph setup function; replaced 20+ occurrences in base graph setup functions with the template variable |
| compass/validation/graphs.py | Replaced 20+ occurrences of the repeated yes/no prompt instruction with {YES_NO_PROMPT} across document type and jurisdiction validation prompts |
| compass/extraction/wind/graphs.py | Replaced 10+ occurrences in wind energy system type classification and setback extraction prompts with the template variable |
| compass/extraction/solar/graphs.py | Replaced 6+ occurrences in solar energy farm type classification and setback extraction prompts with the template variable |
| compass/extraction/small_wind/graphs.py | Replaced 10+ occurrences in small wind system type classification and setback extraction prompts with the template variable |
Add
YES_NO_PROMPTto template to reduce code repetition and make it easier to adjust instructions across all prompts.