Conversation
There was a problem hiding this comment.
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
tsupand expose a newevaluators-batchbinary. - 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.
173a014 to
13325f1
Compare
1e50c35 to
a412e0b
Compare
44c78cd to
e6621b5
Compare
e6621b5 to
d501654
Compare
There was a problem hiding this comment.
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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
d501654 to
2b1311a
Compare
| if (a === 'K') return -1; | ||
| if (b === 'K') return 1; | ||
| return parseInt(a) - parseInt(b); | ||
| return parseInt(a, 10) - parseInt(b, 10); |
There was a problem hiding this comment.
Unrelated to the scope of this particular PR
5a5816d to
c77b424
Compare
czi-fsisenda
left a comment
There was a problem hiding this comment.
Very nice PR! Love the structure. Easy to follow for such a large feature.
Mostly nits and some suggestions for future iterations.
One blocking issue: I think the integration tests should run against all available evals and should fail instead of skip for missing api keys.
| /** | ||
| * Input row from CSV | ||
| */ | ||
| export interface BatchInput { |
| /** | ||
| * Individual evaluation task | ||
| */ | ||
| export interface BatchTask { | ||
| text: string; | ||
| grade: string; | ||
| evaluatorId: string; | ||
| rowIndex: number; | ||
| } |
There was a problem hiding this comment.
[P1] generic input vs text and grade
| totalInputRows: number; | ||
| } | ||
|
|
||
| export function formatAsHTML(output: BatchOutput, meta: ReportMeta): string { |
There was a problem hiding this comment.
[P2] I wonder if we can share a common template once the Playground has batch support too.
|
@czi-fsisenda - Thank you for your review. Addressed feedback. Please review the last commit - b1dbb69 |
b1dbb69 to
a307a42
Compare
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
Documentation
See
sdks/typescript/src/batch/README.mdTesting