feat(eval): multi-turn conversation mode with turn-by-turn evaluation#1054
Merged
feat(eval): multi-turn conversation mode with turn-by-turn evaluation#1054
Conversation
…tion Implements issue #1052: support for evaluating multi-turn conversations where the agent generates each assistant turn with per-turn grading. - Add ConversationTurn type, mode, turns, aggregation, on_turn_failure, window_size to EvalTest - Zod schema and YAML parser updates for new fields - Turn-by-turn loop in orchestrator: accumulate messages, call provider, grade, repeat - Conversation assertions run after all turns - Aggregation: mean (default), min (weakest-link), max - String shorthand in per-turn assertions works identically to top-level - Cross-field validation (turns requires mode:conversation, etc.) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Deploying agentv with
|
| Latest commit: |
8affcd0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9530562a.agentv.pages.dev |
| Branch Preview URL: | https://feat-1052-conversation-mode.agentv.pages.dev |
Adds examples/features/multi-turn-conversation-live/ with 5 test cases exercising conversation mode features: context retention, aggregation modes, on_turn_failure, mixed assertions, and conversation-level assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests for conversation-mode orchestrator, validation rules, and score aggregation (mean/min/max). Also fixes buildTurnAssertions to emit type: 'llm-grader' with rubrics instead of type: 'rubrics' (which is not registered in the builtin registry). The evaluator-parser uses the same pattern for YAML-sourced rubrics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- YAML loader: include `turns` in completeness gate so conversation-only cases (no top-level criteria/assertions) are not silently skipped - Orchestrator: stop falling back to evalCase.assertions per-turn — turns without own assertions score 1.0 instead of double-counting top-level - Orchestrator: pass full transcript as candidate for conversation-level grading instead of only the last assistant reply - Orchestrator: serialize structured message content with JSON.stringify instead of producing [object Object] in transcript strings - Validator: reject whitespace-only and empty-array turn inputs - Tests: add regression coverage for double-counting, transcript candidate, and whitespace input validation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1052
Summary
Adds
mode: conversationwithturnsarray for live turn-by-turn LLM evaluation with per-turn and conversation-level grading.Changes
Verification
bun run typecheck✅bun run build✅bun run test✅ (all 1944 tests pass)