Objective:
Our engine/ directory is bloated with reluctant hardcoded .py scripts like bail_analyzer.py, risk_analyzer.py, summarizer.py, and deadline_extractor.py all perform seperate tasks, which can be implemented using one single script - ocr_summarizer with customized system prompt. This ensures that the engine/ directory does not have any unnecessary scripts.
Action Items:
Objective:
Our engine/ directory is bloated with reluctant hardcoded .py scripts like
bail_analyzer.py,risk_analyzer.py,summarizer.py, anddeadline_extractor.pyall perform seperate tasks, which can be implemented using one single script - ocr_summarizer with customized system prompt. This ensures that the engine/ directory does not have any unnecessary scripts.Action Items:
Create a new central script: engine/ocr_summarizer.py.
Create a single, universal execution function in ocr_summarizer.py that accepts (text, prompt_type).
Refactor the UI pages to call ocr_summarizer.py instead of the individual scripts and modify the UI code in Document OCR to extract the keywords from the LLM response - this can be achieved with proper system prompts.
Delete the redundant _analyzer scripts once the router is confirmed working.