Prompt Template
Logs a chat data for evaluation using Future Agi client.
Creating an Client
Supported Model Types:
β’ GENERATIVE_LLM: For text data.
β’ GENERATIVE_IMAGE: For text and image 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 need to provide the required parameters such as model_id, model_type, environment, and optionally model_version, prediction_timestamp, conversation, and tags.
Structure:
1. chat_history:
β’ A list containing dictionaries, each representing a message in the conversation. Each dictionary can have several keys: role, content, variables, prompt_template, and context.
2. role:
β’ Type: String.
β’ Description: Represents the participant of the conversation (βuserβ or βassistantβ).
3. content:
β’ Type: String.
β’ Description: The text content of the message provided by the role.
4. variables (Optional):
β’ Type: Dictionary.
β’ Description: Contains key-value pairs where keys are variable names, and values are their corresponding values. Used for dynamically filling placeholders in prompt_template. This key is specific to messages from the βuserβ.
5. prompt_template (Optional):
β’ Type: String.
β’ Description: A template that defines the structure of the prompt and may include placeholders for variables. This key is specific to messages from the βuserβ.
6. context (Optional):
β’ Type: List of pairs of strings.
β’ Description: Provides additional context or supporting information for the message. Each element is a pair of strings in the format [["context_key", "context_value"], ...].
Description:
β’ chat_history: A list of dictionaries where each dictionary represents a message with its properties.
β’ role: Indicates the sender of the message, either βuserβ or βassistantβ.
β’ content: The message content provided by the user or assistant.
β’ variables: A dictionary where each key is a variable name, and each value is the corresponding value for that variable. This is used to dynamically fill placeholders in the prompt_template.
β’ prompt_template: A template string that defines the structure of the prompt, potentially with placeholders that correspond to the variables.
β’ context (Optional): A list of pairs, where each pair contains additional contextual information relevant to the message.
Last updated