Skip to content

feat: Implement Batch Evaluator#16

Open
adnanrhussain wants to merge 5 commits intomainfrom
ahussain/sdk_7_batch
Open

feat: Implement Batch Evaluator#16
adnanrhussain wants to merge 5 commits intomainfrom
ahussain/sdk_7_batch

Conversation

@adnanrhussain
Copy link
Contributor

@adnanrhussain adnanrhussain commented Feb 9, 2026

Summary

A CLI tool that processes CSV files containing educational text through multiple AI evaluators (vocabulary, sentence structure, grade-level appropriateness) in parallel, outputting results in CSV, JSON, and interactive HTML formats with progress tracking and graceful shutdown support.

Example of Report HTML

image

Documentation

See sdks/typescript/src/batch/README.md

Testing

  • CI workflow should build successfully

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new TypeScript “batch” feature: an interactive CLI and supporting runtime APIs for evaluating many CSV rows across multiple evaluators in parallel, producing CSV/JSON/HTML outputs.

Changes:

  • Builds and ships a new CLI entrypoint (src/batch/index.ts) plus batch runtime modules (evaluator, formatters, progress, types).
  • Updates build/package wiring to include the batch entry in tsup and expose a new evaluators-batch binary.
  • Adds unit + integration tests and a CSV fixture for batch parsing/formatting.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
sdks/typescript/tsup.config.ts Adds src/batch/index.ts as a build entrypoint so the CLI is emitted into dist/.
sdks/typescript/package.json Adds bin entry + new deps for CSV parsing and interactive prompts.
sdks/typescript/package-lock.json Locks new dependencies introduced for batch functionality.
sdks/typescript/src/utils/prompts.ts Adjusts prompt directory resolution to support the batch build output layout.
sdks/typescript/src/evaluators/base.ts Introduces an abstract evaluate(text, grade) method on the base class.
sdks/typescript/src/evaluators/text-complexity.ts Removes an unused import.
sdks/typescript/src/batch/types.ts Defines batch input/result/output/config types.
sdks/typescript/src/batch/evaluator.ts Implements concurrency-controlled batch execution + cancellation + summary aggregation.
sdks/typescript/src/batch/formatters.ts Implements CSV/JSON/HTML output formatting for batch results.
sdks/typescript/src/batch/progress.ts Implements terminal progress rendering and summary display.
sdks/typescript/src/batch/index.ts Implements the interactive CLI flow (CSV selection, evaluator selection, keys, outputs, shutdown).
sdks/typescript/src/batch/README.md Adds end-user documentation for running the CLI and interpreting outputs.
sdks/typescript/tests/unit/batch/*.test.ts Adds unit tests for formatters and CSV parsing helpers and limit math.
sdks/typescript/tests/integration/batch.integration.test.ts Adds an opt-in integration test that exercises the batch evaluator with real API keys.
sdks/typescript/tests/fixtures/batch-test.csv Adds a fixture CSV with column-name variants to validate robust parsing.
Files not reviewed (1)
  • sdks/typescript/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adnanrhussain adnanrhussain force-pushed the ahussain/sdk_6_composite_evals branch from 173a014 to 13325f1 Compare March 3, 2026 17:37
@adnanrhussain adnanrhussain force-pushed the ahussain/sdk_7_batch branch from 1e50c35 to a412e0b Compare March 5, 2026 04:53
Base automatically changed from ahussain/sdk_6_composite_evals to ahussain/sdk_typescript March 5, 2026 23:07
Base automatically changed from ahussain/sdk_typescript to main March 13, 2026 19:40
@adnanrhussain adnanrhussain requested a review from Copilot March 17, 2026 00:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 20 changed files in this pull request and generated 6 comments.

Files not reviewed (1)
  • sdks/typescript/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 78.94737% with 60 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
sdks/typescript/src/batch/evaluator.ts 26.25% 59 Missing ⚠️
sdks/typescript/src/batch/formatters.ts 99.42% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

if (a === 'K') return -1;
if (b === 'K') return 1;
return parseInt(a) - parseInt(b);
return parseInt(a, 10) - parseInt(b, 10);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated to the scope of this particular PR

@adnanrhussain adnanrhussain marked this pull request as ready for review March 17, 2026 05:54
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