Log Pre-generated Responses
If you already have a dataset of requests and application responses, and you want to log and evaluate these on Galileo without re-generating the responses, you can do so via our custom loggers.
First, log in via pq.login()
Then, for each request/response in your eval set, construct a node row:
Finally, log your NodeRows to Galileo and specify the list of metrics you'd like to compute for this run:
Once that's complete, this step will display the link to access the run from your Galileo Console.
See below if you're logging a RAG workflow.
What is a NodeRow?
A NodeRow is a object representation of one step in your workflow. For example, in an Agent or RAG system:
Your retriever step would be represented by a NodeRow with the inputs that went into it and the output (chunks) that came out of it.
Your LLM step(s) would be represented by NodeRows with the prompt into the model as the input and the response from the model as the output.
An Agent or Chain node would be represented by a NodeRow, with the output of its children nodes being its output.
To recreate a simple RAG system like the one above, you'd log the following Nodes:
A NodeRow for your "Workflow" step. Because this node is the "root" of your tree, this node's ID will be the "chain_root_id" of every node in the tree.
A NodeRow for your "VectorStoreRetriver" step. because the "Workflow" node is its parent, this node's chain_id will be the ID of the "Workflow" node.
A NodeRow for the "CustomLLM" step. Again, because the "Workflow" node is its parent, this node's chain_id will be the ID of the "Workflow" node.
RAG workflows
If you're looking to recreate a RAG workflow, log your retriever step and your LLM step separately. This will allow you to compute RAG metrics and inspect the documents or chunks returned. Importantly, also add both of these nodes as children of a 'chain'
NodeRow.
We recommend you randomly generate node_id and chain_root_id (e.g. uuid()). Add the id of the 'parent' node as the chain_root_id of its children.
Last updated