Skip to main content
GenAI functions in APL help you analyze and process GenAI conversation data, including messages, token usage, costs, and conversation metadata. These functions are useful when working with logs or data from large language models (LLMs) and AI systems.

When to use GenAI functions

Use GenAI functions when you need to:
  • Extract specific information from AI conversation logs, such as user prompts, assistant responses, or system prompts
  • Calculate token costs and usage metrics for LLM API calls
  • Analyze conversation structure and flow, including turn counts and message roles
  • Process and filter conversation messages based on roles or content
  • Determine pricing information for different AI models
  • Detect truncation or tool calls in AI responses

Available GenAI functions