发布

  • Add Trajectory Accuracy LLM-as-a-Judge Metric (#2529) (#2539)

    frostbyte_neo 发布于 2025-07-29 09:03:49 +00:00

    • Add trajectory accuracy metric for ReAct-style agent evaluation

    • Complete TrajectoryAccuracy integration: add docs and finalize implementation

    • Added comprehensive documentation following Opik patterns
    • Updated metrics overview with TrajectoryAccuracy entry
    • Created dedicated trajectory_accuracy.mdx documentation page
    • Added Python SDK documentation files
    • Removed unnecessary standalone demo files
    • All tests pass and implementation follows established patterns
    • Ready for review and merge
    • Refactor: Standardize TrajectoryAccuracy metric and clean up example

    • Refactor trajectory accuracy tests to eliminate private attribute access │
      │ │
      │ - Replace private method calls with public API equivalents: │
      │ * _parse_evaluation_response() -> parser.parse_evaluation_response() │
      │ * _format_trajectory_steps() -> templates.create_evaluation_prompt() │
      │ - Use dependency injection for mock model via constructor instead of setting private │
      │ _model attribute │
      │ - Test behavior through public interfaces rather than accessing private state │
      │ - Add proper mock specification with base_model.OpikBaseModel │
      │ - Update error handling test to match current MetricComputationError behavior │
      │ │
      │ Addresses code review feedback about private/protected attribute access violations. │
      │ All tests pass and follow proper encapsulation principles.

    • Resolve merge conflicts in evaluation metrics and add trajectory metrics

    下载附件