Retrieval Augmented Generation (RAG)
Logs a rag data with context for evaluation using Future Agi client.
Creating an Client
Supported Model Types:
β’ GENERATIVE_LLM: For text data.
Supported Environments:
β’ TRAINING: For models in the training phase.
β’ VALIDATION: For models in the validation phase.
β’ PRODUCTION: For models deployed in a production environment.
β’ CORPUS: For models dealing with a large collection of data or corpus.
Sending a data for Evaluation
To log an event, you must provide required parameters like model_id, model_type, environment, and conversation, with optional fields like model_version, prediction_timestamp, and tags. Itβs important to log each data entry sequentially, one by one.
Structure:
β’ conversation_id: The ID of the conversation. Must be a string.
β’ nodes: A list of nodes, each representing a message in the conversation graph.
β’ node_id: The ID of the node. Must be a string.
β’ parent_id: The ID of the parent node. Must be a string (or null for root nodes).
β’ timestamp: The timestamp of the node. Must be an integer.
β’ message: A dictionary with the message details.
β’ id: The ID of the message. Must be a string.
β’ author: Information about the message author.
β’ role: The role of the author (e.g., βuserβ, βassistantβ). Must be a string.
β’ metadata: Additional metadata about the author.
β’ content: The content of the message.
β’ content_type: The type of content (e.g., βtextβ).
β’ parts: A list of content parts (e.g., text segments).
β’ context: (Optional) The context of the message. Must be a list of pairs of strings in the format [["", ""]...].
Description:
β’ Conversation ID: Unique identifier for the conversation.
β’ Nodes: List of messages in the conversation, structured as nodes in a graph.
β’ Node ID: Unique identifier for each node.
β’ Parent ID: Indicates the parent node, establishing the hierarchy. Root nodes have null as the parent ID.
β’ Timestamp: Time when the message was created.
β’ Message: Contains details of the message, including the author, content, and optional context.
Last updated