Trim defect_categories.json to category/subcategory only #1

Merged
jahnavijoshi merged 3 commits from ncr-analysis-defect-categorization into main 2026-08-25 18:09:02 +00:00
Owner

Reference file was embedded in full on every defect-categorization API call, adding ~7KB of fixed overhead against Margsarthi's 8000-character question limit. Dropping subcategory_code and per-defect items reduces it to ~1.3KB.

Reference file was embedded in full on every defect-categorization API call, adding ~7KB of fixed overhead against Margsarthi's 8000-character question limit. Dropping subcategory_code and per-defect items reduces it to ~1.3KB.
Adds combine_deficiencies.py to build a unique combined list of
descriptions from ncrs.json, non_ncr_deficiencies.json, and
major_deficiencies_summary.json, and categorize_deficiencies() in
ncr_analysis.py to classify each against reference/defect_categories.json
via Margsarthi, falling back to "Others" when nothing matches.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reference file was embedded in full on every defect-categorization
API call, adding ~7KB of fixed overhead against Margsarthi's 8000
character question limit. Dropping subcategory_code and the
per-defect items reduces it to ~1.3KB.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jahnavijoshi/QIR_Analysis!1
No description provided.