Create a visualization artifact
Generate, validate, and save charts, tables, cards, HTML, or React artifacts in Prism.
Artifacts are durable research outputs that should live with the rest of the user's Prism library or writing workflow.
Workflow
Primary steps
- 1Ask the AI client to check Prism's artifact capabilities before generating.
- 2Use the chart/table preparation tool when the source is raw CSV, TSV, Markdown table, or JSON rows.
- 3Validate the artifact payload before saving it.
- 4Save the artifact to a library folder or draft, then open it in Prism.
Runtime choices
Use native chart, table, metric card, or markdown specs when the output fits those shapes.
Use sandboxed React or self-contained HTML only when the artifact needs a richer custom view.
Use Python only as a bounded generator that returns a validated Prism artifact. Prism stores the generated artifact, not Python as a live browser runtime.
Preflight habit
Ask the AI client to call Prism's artifact capabilities and validation tools before saving complex visualizations.
For raw chart or table data, have the client call prepare_chart_table_artifact, inspect warnings, validate the returned artifactType and spec, then save it with create_artifact.
When saving an artifact, include a concise description explaining what the artifact shows, the source basis, and why it matters so Prism can return it in artifact search and AI context.
For screenshots or rendered chart/table images, use upload_article_image and insert_article_visual_block with alt and caption text. Prism should not treat chart screenshots as structured data unless the user supplies the underlying data.
When the artifact belongs inside an article draft, place a stable visual marker in the draft first, save the artifact, then use insert_article_visual_block to replace the marker.