ProjectTech4DevAI / ProjectTech4DevAI/kaapi-frontend
Evaluation: Update improve-prompt to v2
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1
- Forks
- 0
- Ø Merge
- 10 Std. 40 Min.
- Gemergte PRs (30 T.)
- 4
Beschreibung
Is your feature request related to a problem?
The improve-prompt currently uses v1, which relies on cosine scores. This limits the ability to provide users with a more comprehensive recommendation based on better metrics available in v2.
Describe the solution you'd like
- Redirect
app/api/evaluations/[id]/improve-prompt/route.tstoPOST /api/v2/evaluations/{evaluation_id}/improve-prompt - Maintain existing
callback_urlresolution and/api/webhooks/prompt-improvementreceiver with unchanged body shape - Implement handling for
PromptRecommendationJobPubliccallback:recommendation_type: "prompt" - Restrict action to judged runs; return
422 not_a_judge_runfor v1 runs
Original issue
Is your feature request related to a problem?
Improve-prompt proxies to v1, which drafts from cosine scores. v2 drafts from the three-metric judge trace (score + reasoning per metric) and returns a typed recommendation, so the console gets a better prompt and a reason for it.
Describe the solution you'd like
- Point
app/api/evaluations/[id]/improve-prompt/route.tsatPOST /api/v2/evaluations/{evaluation_id}/improve-prompt - Keep the existing
callback_urlresolution and/api/webhooks/prompt-improvementreceiver — the body shape is unchanged - Handle the
PromptRecommendationJobPubliccallback:recommendation_type: "prompt"(widening to a union later) - Only offer the action on judged runs; surface
422 not_a_judge_runif it's attempted on a v1 run
Parent: #265
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit app/api/evaluations/[id]/improve-prompt/route.ts und verfolge die Auflösung von callback_url. Untersuche anschließend /api/webhooks/prompt-improvement und die verfügbare PromptRecommendationJobPublic-Struktur. Überprüfe die Schutzbedingung für bewertete Läufe und die v2-Anfrage, bewahre die Struktur des Callback-Bodys, behandle recommendation_type: "prompt" und bestätige, dass v1-Läufe 422 not_a_judge_run zurückgeben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100