Programmatically fetch logged data

If you want to fetch your logged data and metrics programmatically, you can do so via our Python clients:

import promptquality as pq
pq.login({YOUR CONSOLE URL})
project = pq.get_project_from_name(project_name="YOUR PROJECT NAME")
run = pq.get_run_from_name(run_name='YOUR RUN NAME',
rows =  pq.get_rows(project_id =, run_id =

This will return traces (various nodes and node structure relationships) of a chain.

If you want to filter for the output from just the LLM 'chat' node, you can use the code snippet below:

rows = pq.get_rows()
for r in rows:
  if r.node_type=='chat':

Last updated