-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lievan
committed
Dec 30, 2024
1 parent
8c5a708
commit e2450d5
Showing
2 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletions
13
releasenotes/notes/submit-evaluation-for-01096d803d969e3e.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
--- | ||
features: | ||
- | | ||
LLM Observability: This introduces the ability to submit custom evaluations joined to a span by a tag key-value pair using the | ||
`LLMObs.submit_evaluation_for()` method. The tag key-value pair is expected to uniquely a span. | ||
Example usage: | ||
- Evaluation joined by tag: `LLMObs.submit_evaluation_for(span_with_tag_value=("message_id", "dummy-message-id"), label="rating", ...)`. | ||
LLM Observability: This introduces the `LLMObs.submit_evaluation_for` method, which provides the ability to join a custom evaluation | ||
to a span using a tag key-value pair on the span. The tag key-value pair is expected to uniquely identify a single span. | ||
Tag-based joining is an alternative to the existing method of joining evaluations to spans using trace and span IDs. | ||
Example usage: | ||
- Evaluation joined by tag: `LLMObs.submit_evaluation_for(span_with_tag_value={"tag_key": "message_id", "tag_value": "dummy_message_id"}, label="rating", ...)`. | ||
- Evaluation joined by trace/span ID: `LLMObs.submit_evaluation_for(span={"trace_id": "...", "span_id": "..."}, label="rating", ...)`. | ||
deprecations: | ||
- | | ||
LLM Observability: `LLMObs.submit_evaluation` is deprecated and will be removed in 3.0.0. | ||
LLM Observability: `LLMObs.submit_evaluation` is deprecated and will be removed in ddtrace 3.0.0. | ||
As an alternative to `LLMObs.submit_evaluation`, you can use `LLMObs.submit_evaluation_for` instead. | ||
To migrate, replace `LLMObs.submit_evaluation(span_context={"span_id": ..., "trace_id": ...}, ...)` with: | ||
`LLMObs.submit_evaluation_for(span={"span_id": ..., "trace_id": ...}, ...) | ||
You may also join an evaluation to a span using a tag key-value pair like so: | ||
`LLMObs.submit_evaluation_for(span_with_tag_value=("tag_key", "tag_val"), ...)` | ||
`LLMObs.submit_evaluation_for(span_with_tag_value={"tag_key": ..., "tag_val": ...}, ...)`. |