You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1b41ea4
Browse filesBrowse the repository at this point in the historyBrowse files
feat(AIC-3534): add a TypeSafe Jev judge handler (#149)
## Summary
- Add `launchdarkly-ai-typesafe`, a judge handler that sends a
variation's `classifiers` to Jev in one call.
- Each label becomes its own `judge_results` entry, tracked on that
label's `eventKey`, with the selected label as the reason.
- A score is the expected rubric index divided by one less than the
number of levels, then clamped to 0–1.
https://launchdarkly.atlassian.net/browse/AIC-3534
## Test plan
- [x] `pytest packages/typesafe/tests
packages/client/tests/test_judges.py
packages/client/tests/test_conversation.py
packages/client/tests/test_judge_scoring.py
packages/client/tests/test_schema.py`
- [ ] Run a TypeSafe judge variation and confirm one result per label,
with the label value in `response`
Made with [Cursor](https://cursor.com)
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: packages/client/README.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -348,6 +348,28 @@ async def main():
348
348
asyncio.run(main())
349
349
```
350
350
351
+
#### Deferred judges
352
+
353
+
With `skip_judges=True`, `invoke()` returns `judge_tasks` instead of running them. Run each with `run_judge(task, handlers)` on your own thread or process, then track the result. A judge that scores several labels in one call (a TypeSafe judge, for example) returns `metrics`: track each entry under its own `eventKey`, and do not also track `evaluation_metric_key`.
354
+
355
+
```python
356
+
from ldclient import Context
357
+
from launchdarkly_ai_server import get_client, run_judge
Runs a multi-agent workflow defined in a LaunchDarkly agent graph flag. The SDK uses a **model-driven router**: it starts at the root node, presents outgoing edges as handoff choices to the model, and follows whichever edge the model selects. The loop terminates when the model produces a final answer, a leaf is reached, a cycle is detected, or the step cap is hit.
0 commit comments