Before you start logging you will have to create a LogRepository on the Maxim dashboard. To create a log repository,click on Logs and the click on + icon on the sidebar. You can use the ID of that repository to push logs.
Getting started
Tracing single shot logs
Tracing multi-turn logs
Once session
object is created, you can add multiple Traces across the lifecycle of the conversation.
Using custom ids for Traces/Sessions
Using custom ids allows you to fetch a trace in any function using the same id. This can be useful in updating trace across your workflow.
Trace
Session
Elements of Traces
Once you have a Trace object, you can add
Span
A Span (short for timespan), groups a bunch of items (Events, Retrieval, Generation, Feedback).
Event
An Event is a point in time when something happened in the system.
Retrieval
A Retrieval is a special type of Span in Maxim, which represents a retrieval query to a knowledge base or vector database.
Generation
A Generation is a special type of Span in Maxim, which represents a call to an LLM.
generation.result expects result to be in OpenAI response format. Here is the reference to the OpenAI response format
Feedback
A Feedback is a special type of Event in Maxim, which is a point in time when feedback was given in the system.