Skip to content
Discussion options

You must be logged in to vote

Hi @emmanouilvoitsidis! I'm Dosu and I’m helping the trulens team.

The OTEL error you’re seeing happens because, in OTEL mode which is on by default, TruLens only supports dictionary selectors (using the Selector class), not Lens objects. To define context relevance and answer faithfulness (groundedness) metrics that work with OTEL, you need to use Feedback objects with .on({...}) and Selector instances for each argument.

Here’s how you can define these metrics in a way that works with OTEL:

import numpy as np
from trulens.core import Feedback
from trulens.core.feedback.selector import Selector
from trulens.providers.openai import OpenAI

provider = OpenAI(model_engine="gpt-4.1-mini")

#…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sfc-gh-jreini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant