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
Bug Description
groundedness_measure_with_cot_reasons is failing silently
To Reproduce
session = TruSession()
class RAG:
@instrument
def get_chunks(self, response_body: dict) -> list:
return [ s['doc'] for s in response_body['documents']
@instrument
def query(self, input: str) -> str:
response = requests.post('<<url>>', json={'query': input})
if response.status_code == 200:
chunks = self.get_chunks(response.json())
return response.json()['response']
rag = RAG()
provider = Bedrock(model_id='<<model_id>>', region_name='<<region name>>')
f_groundedness = (
Feedback(
provider.groundedness_measure_with_cot_reasons, name='Groundedness'
)
.on(Select.RecordCalls.get_chunks.rets.collect()
# this does not work with rets[:] or just rets either
.on_output()
)
# this works fine with answer and context relevance
tru_rag = TruCustomApp(
rag,
feedbacks=[f_groundedness
)
Expected behavior
I expect the metric to show up in my dashboard, since I'm following the sample code in the docs nearly to the letter
Relevant Logs/Tracebacks
When the dashboard is opened, "No feedbacks" is displayed, or groundedness is not shown. Besides that, it fails completely silently
Environment:
OS: Windows
Python Version: 3.12
TruLens version: 1.2.6
Versions of other relevant installed libraries
The text was updated successfully, but these errors were encountered:
Bug Description
groundedness_measure_with_cot_reasons is failing silently
To Reproduce
Expected behavior
I expect the metric to show up in my dashboard, since I'm following the sample code in the docs nearly to the letter
Relevant Logs/Tracebacks
When the dashboard is opened, "No feedbacks" is displayed, or groundedness is not shown. Besides that, it fails completely silently
Environment:
The text was updated successfully, but these errors were encountered: