Add prompt improvement button in drawer

This commit is contained in:
Xin Wang
2026-08-26 12:18:18 +08:00
parent 239b9027ca
commit ab409ba9c0
13 changed files with 2067 additions and 39 deletions
+23
View File
@@ -636,3 +636,26 @@ class BatchRunSnapshotOut(CamelModel):
started_at: datetime
finished_at: datetime | None
stop_reason: StopReason | None
class PromptImprovementChange(CamelModel):
before: str = Field(max_length=100_000)
after: str = Field(min_length=1, max_length=100_000)
reason: str = Field(min_length=1, max_length=4_000)
evidence: list[str] = Field(default_factory=list, max_length=8)
class PromptImprovementManualRecommendation(CamelModel):
category: Literal["tool", "test_case", "other"]
title: str = Field(min_length=1, max_length=200)
detail: str = Field(min_length=1, max_length=4_000)
class PromptImprovementOut(CamelModel):
diagnosis: str = Field(min_length=1, max_length=4_000)
prompt_change: PromptImprovementChange | None = None
manual_recommendations: list[PromptImprovementManualRecommendation] = Field(
default_factory=list,
max_length=20,
)
evaluator_name: str = Field(min_length=1, max_length=128)