ava_artifact
Creates analysis reports from existing query results by binding columns to chart fields, then exports an HTML report and matching evidence JSON with questions, conclusions, charts, tables, and SQL.
Instructions
Create a report from existing queryIds. BEFORE calling, inspect each query result and bind its columns to native chart fields. Complete section example for query columns month,total_revenue: {question:"Monthly revenue?",conclusion:"...",queryId:"q_...",chartFields:{category:"month",value:"total_revenue"},chart:{chartType:"column",config:{axisYTitle:"Revenue (USD)"}}}. chartFields belongs beside chart at section level. Reuse the queryId; do not rerun SQL merely to rename columns. For histogram/dual-axes/liquid use chartConfigField instead. Invalid bindings return an error BEFORE creating files; fix the mapping and retry the same output path. Render one analysis HTML and matching evidence JSON with questions, conclusions, charts, tables, and exact SQL. Reference ava_query queryIds from this connection, including disposed datasets. Truncated results are not plotted; chartErrors preserves failures while tables and SQL remain available. Return paths are output and dataOutput. Sharing the HTML shares its query results. Bind query columns explicitly with chartFields (native field -> query column), or return native column aliases in SQL. This does not independently verify assistant conclusions or browser rendering. Keep each question with its queryId; retain earlier questions and evidence needed for follow-up reports. SQL and results are saved automatically; avoid duplicate exports unless requested. Deliver findings, units, scope, limitations and file links; preview charts before claiming visual checks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Report title | |
| output | Yes | Absolute path to a NEW .html file; parent directory must exist. A matching .json evidence file is also created; neither file may already exist | |
| metrics | No | ||
| summary | Yes | Main finding supported by the referenced query results | |
| sections | Yes | ||
| definitions | No | Confirmed metric definitions, scope and units applied in the queries | |
| limitations | No | Material data gaps and limits on the conclusions |