Simplify custom prompt handling & re-organize#73
Simplify custom prompt handling & re-organize#73tisnik merged 2 commits intolightspeed-core:mainfrom
Conversation
WalkthroughAdds a custom metrics package initializer exporting key symbols, introduces a shared answer-correctness prompt template, and refactors CustomMetrics to use this template directly, removing the EvaluationPromptParams class and its prompt-construction method. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant E as Evaluator
participant CM as CustomMetrics
participant P as prompts.ANSWER_CORRECTNESS_PROMPT
participant L as LLM/Scorer
E->>CM: evaluate_answer_correctness(query, response, expected)
Note right of CM: Prompt now built via template (no EvaluationPromptParams)
CM->>P: Format template with {query, response, expected_response}
P-->>CM: Prompt string
CM->>L: Submit prompt
L-->>CM: Score + Reason
CM-->>E: Evaluation result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@VladimirKadlec @tisnik PTAL |
Simplify custom prompt handling & re-organize
Summary by CodeRabbit
New Features
Refactor