Skip to content

Fix AI questionnaire generation and add progress bars - #20

Merged
codoom1 merged 1 commit into
mainfrom
agent/fix-ai-questionnaire-progress
Jul 25, 2026
Merged

Fix AI questionnaire generation and add progress bars#20
codoom1 merged 1 commit into
mainfrom
agent/fix-ai-questionnaire-progress

Conversation

@codoom1

@codoom1 codoom1 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

What changed

  • Replaces dozens of sequential questionnaire AI calls with one bounded Structured Outputs request.
  • Generates 1–5 validated, focused AI questions and merges them into the complete rules-based questionnaire.
  • Uses one quota unit per questionnaire request and sends a privacy-preserving safety identifier.
  • Falls back visibly to a complete rules-based questionnaire if AI is unavailable.
  • Adds staged progress overlays to statistical model selection and questionnaire generation.
  • Adds responsive, accessible progress styling and regression coverage.

Root cause

Production logs showed questionnaire generation repeatedly enhancing individual questions and generating each question type in separate OpenAI calls. Several calls exceeded the 400-token output ceiling, and Vercel ultimately terminated the request at its 60-second runtime limit.

Validation

  • pytest -q tests: 135 passed
  • Focused integration and route tests: 50 passed
  • Blocking flake8 checks: 0 errors
  • JavaScript syntax check: passed
  • git diff --check: passed

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
statistical-model-suggester Ready Ready Preview, Comment Jul 25, 2026 1:04am

@codoom1
codoom1 marked this pull request as ready for review July 25, 2026 01:09
Copilot AI review requested due to automatic review settings July 25, 2026 01:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codoom1
codoom1 merged commit a69c615 into main Jul 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants