Skip to content

Rubric eval progress poll downloads the full result set every second #94

Description

@ay-bh

While a rubric evaluation is running, the UI requests GET /{collection_id}/{rubric_id}/rubric_run_state every second. Each request loads all results collected so far, parses their citations, and sends the full list back. The progress indicator uses results.length to count completed runs.

That means each poll does more database work, citation parsing, and data transfer as results accumulate, even for results the user isn't viewing.

The relevant code is in use-job-status.ts, get_rubric_run_state, and get_rubric_results, which fetches results without a limit.

One possible fix would be to poll just the job status and completed count, and fetch results separately as they're needed. There's already a /job endpoint, though it doesn't return a completed count yet. The results list could use pagination, and the detail page could fetch a single result by ID.

We'd need to account for the list's filtering and clustering, which currently use the full result set, and preserve the existing endpoint behavior for SDK clients.

Happy to work on this if you'd like.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions