Nothing will break if you don’t log retriever traces in the correct format and data will still be logged. However, the data will not be rendered in a way that is specific to retriever steps.
-
Annotate the retriever step with
run_type="retriever". -
Return a list of Python dictionaries or TypeScript objects from the retriever step. Each dictionary should contain the following keys:
page_content: The text of the document.type: This should always be “Document”.metadata: A python dictionary or TypeScript object containing metadata about the document. This metadata will be displayed in the trace.

Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

