ProjectTech4DevAI / ProjectTech4DevAI/kaapi-frontend

Evaluation: Update improve-prompt to v2

Offen
#273 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement
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.ts to POST /api/v2/evaluations/{evaluation_id}/improve-prompt
  • Maintain existing callback_url resolution and /api/webhooks/prompt-improvement receiver with unchanged body shape
  • Implement handling for PromptRecommendationJobPublic callback: recommendation_type: "prompt"
  • Restrict action to judged runs; return 422 not_a_judge_run for 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.ts at POST /api/v2/evaluations/{evaluation_id}/improve-prompt
  • Keep the existing callback_url resolution and /api/webhooks/prompt-improvement receiver — the body shape is unchanged
  • Handle the PromptRecommendationJobPublic callback: recommendation_type: "prompt" (widening to a union later)
  • Only offer the action on judged runs; surface 422 not_a_judge_run if it's attempted on a v1 run

Parent: #265

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Ö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

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.