Skip to content
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

[MDS-6260] Added support to permit condition extraction pipeline to create identified reports #3339

Merged
merged 6 commits into from
Dec 13, 2024

Conversation

simensma-fresh
Copy link
Collaborator

@simensma-fresh simensma-fresh commented Dec 11, 2024

Objective

MDS-6260

This PR adds support for automatically creating Report Definitions for permit conditions OpenAI flags as needing a report as part of the Permit indexing pipeline. In addition, it contains a couple of fixes and quality of life improvements

Note: This PR only contains the backend part. Putting the frontend changes in a separate PR as we're a few people in there at the moment.

Report Definition Creation

  • Permit condition pipeline has been updated on the Core side to create MineReportPermitRequirements for conditions that are flagged as needing a report (meta dict -> questions).
  • New permit condition meta column : Contains any information extracted about a condition from OpenAI and Azure Document intelligence, including answers to the questions we ask (does the condition require a report, what''s the due date), and things like the bounding box of the condition in the original PDF

Permit Condition Extraction Changes

  • Tweaked the prompt a bit to ensure we reduce the chance of missing report requirements.
  • Now chunking the prompts we send to OpenAI based on the sections/subsections identified in an effort to improve accuracy as it seems do degrade for larger permits. I added in some basic parallelism here as well
  • Fixed a bunch of typing errors

Auto-reload celery worker
Changed core_api_celery to run using watchdog in development to enable hot-reloading. Previously core celery needed a restart to see any changes

@simensma-fresh simensma-fresh marked this pull request as ready for review December 11, 2024 23:57
Copy link

Copy link

@simensma-fresh simensma-fresh requested review from matbusby-fw, taraepp, asinn134 and sggerard and removed request for matbusby-fw December 12, 2024 16:49
@simensma-fresh simensma-fresh added 👍 Ready for review Pull request has been double checked by the author and is ready for comments and feedback. 💾 Backend This pull request includes backend changes. 🌶 Enhancement This is a new feature or request. labels Dec 12, 2024
@@ -17,7 +17,7 @@ ELASTICSEARCH_PASSWORD=elastic

AZURE_API_KEY=
AZURE_API_VERSION=2024-02-01
AZURE_DEPLOYMENT_NAME=mds-permits-turbo
AZURE_DEPLOYMENT_NAME=gpt-4o
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😮

Copy link
Collaborator

@matbusby-fw matbusby-fw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good to me!

@simensma-fresh simensma-fresh merged commit 98b736e into develop Dec 13, 2024
14 checks passed
@simensma-fresh simensma-fresh deleted the MDS-6260-Populate-Reports branch December 13, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💾 Backend This pull request includes backend changes. 🌶 Enhancement This is a new feature or request. 👍 Ready for review Pull request has been double checked by the author and is ready for comments and feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants