ares.visualization package
Submodules
ares.visualization.html_header module
ares.visualization.response_visualizer module
Response Visualizer for ARES evaluation results.
Generates HTML visualizations of evaluation results in chat-like format, supporting both multi-turn conversations and single-turn responses.
Performance design
For large result sets (10k–50k items) inlining all conversation HTML into a single file produces files that are tens of megabytes and take many seconds to parse. Instead we:
Serialize the raw data items as a compact JSON blob in a
<script>tag.Write one empty
<div id="conv-N">placeholder per item — a few bytes each.A small vanilla-JS renderer fills the currently active card on demand when the user clicks a sidebar entry. All other cards remain empty DOM nodes.
This keeps the HTML file at O(N × ~200 bytes) for the skeleton regardless of response length, and renders each card in < 1 ms in the browser.
- class ares.visualization.response_visualizer.ResponseVisualizer[source]
Bases:
objectVisualizer for ARES evaluation results in chat format.
- detect_evaluation_type(results: list[dict[str, Any]]) str[source]
Detect the type of evaluation file.
- extract_conversations_from_goal(results: list[dict[str, Any]]) list[dict[str, Any]][source]
Extract conversation items from goal-level evaluation format.
- group_by_conversation(results: list[dict[str, Any]]) dict[str, list[dict[str, Any]]][source]
Group turn-level results by conversation_id.
Module contents
ARES Visualization Module for displaying evaluation results in chat-like format.
- class ares.visualization.ResponseVisualizer[source]
Bases:
objectVisualizer for ARES evaluation results in chat format.
- detect_evaluation_type(results: list[dict[str, Any]]) str[source]
Detect the type of evaluation file.
- extract_conversations_from_goal(results: list[dict[str, Any]]) list[dict[str, Any]][source]
Extract conversation items from goal-level evaluation format.
- group_by_conversation(results: list[dict[str, Any]]) dict[str, list[dict[str, Any]]][source]
Group turn-level results by conversation_id.