Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion content/en/llm_observability/instrumentation/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ public class MyJavaClass {
LLMObsSpan taskSpan = LLMObs.startTaskSpan("preprocessDocument", null, "session-141");
... // preprocess document for data extraction
taskSpan.annotateIO(...); // record the input and output
taskSpan.finish();
taskSpan.finish();
}

public String extractData(String document) {
Expand Down Expand Up @@ -1899,6 +1899,14 @@ The `LLMObs.submit_evaluation_for()` method accepts the following arguments:
`tags`
: optional - _dictionary_
<br />A dictionary of string key-value pairs that users can add as tags regarding the evaluation. For more information about tags, see [Getting Started with Tags][2].

`assessment`
: optional - _string_
<br />An assessment of this evaluation. Accepted values are `pass` and `fail`.

`reasoning`
: optional - _string_
<br />A text explanation of the evaluation result.
{{% /collapse-content %}}

#### Example
Expand Down Expand Up @@ -1927,6 +1935,8 @@ def llm_call():
metric_type="score",
value=10,
tags={"evaluation_provider": "ragas"},
assessment="fail",
reasoning="Malicious intent was detected in the user instructions."
)

# joining an evaluation to a span via span ID and trace ID
Expand All @@ -1938,6 +1948,8 @@ def llm_call():
metric_type="score",
value=10,
tags={"evaluation_provider": "ragas"},
assessment="fail",
reasoning="Malicious intent was detected in the user instructions."
)
return completion
{{< /code-block >}}
Expand Down
Loading