Skip to content

Commit

Permalink
feat(llmobs): submit langchain embedding spans (#9850)
Browse files Browse the repository at this point in the history
## Changes

This PR adds instrumentation to submit langchain embedding spans to LLM
Observability. The embedding spans sent to LLM Observability will
contain the following I/O data:

input.documents: when part of a workflow captures the embeddings as a
json list. when it is not a workflow but a single embedding operation
captures each embedding input as a Document dictionary containing a text
field
output.value: instead of unnecessarily storing very long vector values,
adds a placeholder text [X embeddings returned with size Y]

Ticket : https://datadoghq.atlassian.net/browse/MLOB-937

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Co-authored-by: Yun Kim <[email protected]>
Co-authored-by: Yun Kim <[email protected]>
  • Loading branch information
3 people authored Jul 31, 2024
1 parent 65240c1 commit e195512
Show file tree
Hide file tree
Showing 5 changed files with 326 additions and 1 deletion.
10 changes: 10 additions & 0 deletions ddtrace/contrib/langchain/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,11 +626,13 @@ def traced_embedding(langchain, pin, func, instance, args, kwargs):
span = integration.trace(
pin,
"%s.%s" % (instance.__module__, instance.__class__.__name__),
submit_to_llmobs=True,
interface_type="embedding",
provider=provider,
model=_extract_model_name(instance),
api_key=_extract_api_key(instance),
)
embeddings = None
try:
if isinstance(input_texts, str):
if integration.is_pc_sampled_span(span):
Expand All @@ -654,6 +656,14 @@ def traced_embedding(langchain, pin, func, instance, args, kwargs):
integration.metric(span, "incr", "request.error", 1)
raise
finally:
if integration.is_pc_sampled_llmobs(span):
integration.llmobs_set_tags(
"embedding",
span,
input_texts,
embeddings,
error=bool(span.error),
)
span.finish()
integration.metric(span, "dist", "request.duration", span.duration_ns)
if integration.is_pc_sampled_log(span):
Expand Down
68 changes: 67 additions & 1 deletion ddtrace/llmobs/_integrations/langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from ddtrace.constants import ERROR_TYPE
from ddtrace.internal.logger import get_logger
from ddtrace.llmobs import LLMObs
from ddtrace.llmobs._constants import INPUT_DOCUMENTS
from ddtrace.llmobs._constants import INPUT_MESSAGES
from ddtrace.llmobs._constants import INPUT_VALUE
from ddtrace.llmobs._constants import METADATA
Expand All @@ -20,6 +21,7 @@
from ddtrace.llmobs._constants import OUTPUT_VALUE
from ddtrace.llmobs._constants import SPAN_KIND

from ..utils import Document
from .base import BaseLLMIntegration


Expand All @@ -42,13 +44,15 @@
"system": "system",
}

SUPPORTED_OPERATIONS = ["llm", "chat", "chain", "embedding"]


class LangChainIntegration(BaseLLMIntegration):
_integration_name = "langchain"

def llmobs_set_tags(
self,
operation: str, # oneof "llm","chat","chain"
operation: str, # oneof "llm","chat","chain","embedding"
span: Span,
inputs: Any,
response: Any = None,
Expand All @@ -57,6 +61,10 @@ def llmobs_set_tags(
"""Sets meta tags and metrics for span events to be sent to LLMObs."""
if not self.llmobs_enabled:
return
if operation not in SUPPORTED_OPERATIONS:
log.warning("Unsupported operation : %s", operation)
return

model_provider = span.get_tag(PROVIDER)
self._llmobs_set_metadata(span, model_provider)

Expand All @@ -79,6 +87,8 @@ def llmobs_set_tags(
self._llmobs_set_meta_tags_from_chat_model(span, inputs, response, error, is_workflow=is_workflow)
elif operation == "chain":
self._llmobs_set_meta_tags_from_chain(span, inputs, response, error)
elif operation == "embedding":
self._llmobs_set_meta_tags_from_embedding(span, inputs, response, error, is_workflow=is_workflow)
span.set_tag_str(METRICS, json.dumps({}))

def _llmobs_set_metadata(self, span: Span, model_provider: Optional[str] = None) -> None:
Expand Down Expand Up @@ -194,6 +204,62 @@ def _llmobs_set_meta_tags_from_chain(
except TypeError:
log.warning("Failed to serialize chain output data to JSON")

def _llmobs_set_meta_tags_from_embedding(
self,
span: Span,
input_texts: Union[str, List[str]],
output_embedding: Union[List[float], List[List[float]], None],
error: bool = False,
is_workflow: bool = False,
) -> None:
span.set_tag_str(SPAN_KIND, "workflow" if is_workflow else "embedding")
span.set_tag_str(MODEL_NAME, span.get_tag(MODEL) or "")
span.set_tag_str(MODEL_PROVIDER, span.get_tag(PROVIDER) or "")

input_tag_key = INPUT_VALUE if is_workflow else INPUT_DOCUMENTS
output_tag_key = OUTPUT_VALUE

output_values: Any

try:
if isinstance(input_texts, str) or (
isinstance(input_texts, list) and all(isinstance(text, str) for text in input_texts)
):
if is_workflow:
formatted_inputs = self.format_io(input_texts)
formatted_str = (
formatted_inputs
if isinstance(formatted_inputs, str)
else json.dumps(self.format_io(input_texts))
)
span.set_tag_str(input_tag_key, formatted_str)
else:
if isinstance(input_texts, str):
input_texts = [input_texts]
input_documents = [Document(text=str(doc)) for doc in input_texts]
span.set_tag_str(input_tag_key, json.dumps(input_documents))
except TypeError:
log.warning("Failed to serialize embedding input data to JSON")
if error:
span.set_tag_str(output_tag_key, "")
elif output_embedding is not None:
try:
if isinstance(output_embedding[0], float):
# single embedding through embed_query
output_values = [output_embedding]
embeddings_count = 1
else:
# multiple embeddings through embed_documents
output_values = output_embedding
embeddings_count = len(output_embedding)
embedding_dim = len(output_values[0])
span.set_tag_str(
output_tag_key,
"[{} embedding(s) returned with size {}]".format(embeddings_count, embedding_dim),
)
except (TypeError, IndexError):
log.warning("Failed to write output vectors", output_embedding)

def _set_base_span_tags( # type: ignore[override]
self,
span: Span,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
features:
- |
LLM Observability: The Langchain integration now submits embedding spans to LLM Observability.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
interactions:
- request:
body: '{"input": "", "model": "text-embedding-ada-002", "encoding_format": "base64"}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '77'
content-type:
- application/json
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.30.3
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.30.3
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.10.5
method: POST
uri: https://api.openai.com/v1/embeddings
response:
content: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\":
\"embedding\",\n \"index\": 0,\n \"embedding\": \"WQDMOlodi7xZNqG6PBYyO3hTJDsxNGM8CtSkurERLjrioqY8zsyHugc8pjvwl7O6N0tKu73p+7uW7lK2eB1PvPZCcDxBq0S8nKCkO5PblLzNYF08Io7Bu99vPbzCT067ivZZvFXmeDqh/+E8M1EivdKQ2jyILxu9966auy21+juJFoW8BT+SO/XHsLsdLwS8+sFYOoFHdDslDSo8A6cTPFIJkDvENri8XZVeO4d+BjxJvz+8YC3dO6Dptzs+3fC8HOOEvCw6uzusfBs9F32yO1eeoryqX9y7LDo7PW3W6rvQ+Fs8NJ0hPGbfLrx0nua7eOd5vOXVj7x1CpG9v9DlPAZVPDwzUSK7QlxZPDBUjjt3NmU8yugJO90NlDz69y07xjPMO4X8MTzy4zK8MB65u4gvGzyVPb68pH7KvNAuMbulT4o8+UYZusOFIzt3og88jyZXPCsd/DuOq5e8UIc7PHS+ETtHXZa8oTU3vGxbK7xIRAA8XgGJu20MQLx01Ds9nbbOuvESczzUKFm7xABjvNaqrbqoYkg4FfvdvIrHGT3BaOS8Vu2NvBiTXDzENjg7odA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"\n
\ }\n ],\n \"model\": \"text-embedding-ada-002\",\n \"usage\": {\n \"prompt_tokens\":
1,\n \"total_tokens\": 1\n }\n}\n"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8ab773766b878298-IAD
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Tue, 30 Jul 2024 18:35:52 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=ggWVHFgioAT1pC5qtmqPKsAx5EYcmz03sJ14ffLSumE-1722364552-1.0.1.1-hQLT0WbxlShI3_4cRRp3AsHQfKlVmKcrGyAUki5OMG5ABAx3zlUdkqomhbmJtS9T8DH0T5fx8MKpn0kYv1nF.w;
path=/; expires=Tue, 30-Jul-24 19:05:52 GMT; domain=.api.openai.com; HttpOnly;
Secure; SameSite=None
- _cfuvid=65Hy9XC0Yv6_M0E8DlThaqw38AI.X7VeIW6BvODc3Ic-1722364552959-0.0.1.1-604800000;
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
access-control-allow-origin:
- '*'
alt-svc:
- h3=":443"; ma=86400
openai-model:
- text-embedding-ada-002
openai-organization:
- datadog-4
openai-processing-ms:
- '21'
openai-version:
- '2020-10-01'
strict-transport-security:
- max-age=15552000; includeSubDomains; preload
x-ratelimit-limit-requests:
- '10000'
x-ratelimit-remaining-requests:
- '9999'
x-ratelimit-reset-requests:
- 6ms
x-request-id:
- req_59eefe40e0302d1cd8eca8b6e780227c
http_version: HTTP/1.1
status_code: 200
version: 1
Loading

0 comments on commit e195512

Please sign in to comment.