<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Playground doesn't show tool results in Generative AI</title>
    <link>https://community.databricks.com/t5/generative-ai/playground-doesn-t-show-tool-results/m-p/136996#M1317</link>
    <description>&lt;P&gt;Hii,&lt;/P&gt;&lt;P&gt;I’ve created a model in Databricks that uses different tools. One of these tools generates a chart based on data read from Genie.&lt;/P&gt;&lt;P&gt;I’d like to visualize this chart (basically an image) in Playground, but so far I haven’t found a way to do it. At the moment, I can only see the base64 output instead of the actual chart.&lt;BR /&gt;&lt;BR /&gt;Is there a way to show the images on Playground?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Oct 2025 14:19:34 GMT</pubDate>
    <dc:creator>manoctch</dc:creator>
    <dc:date>2025-10-31T14:19:34Z</dc:date>
    <item>
      <title>Playground doesn't show tool results</title>
      <link>https://community.databricks.com/t5/generative-ai/playground-doesn-t-show-tool-results/m-p/136996#M1317</link>
      <description>&lt;P&gt;Hii,&lt;/P&gt;&lt;P&gt;I’ve created a model in Databricks that uses different tools. One of these tools generates a chart based on data read from Genie.&lt;/P&gt;&lt;P&gt;I’d like to visualize this chart (basically an image) in Playground, but so far I haven’t found a way to do it. At the moment, I can only see the base64 output instead of the actual chart.&lt;BR /&gt;&lt;BR /&gt;Is there a way to show the images on Playground?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 14:19:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/playground-doesn-t-show-tool-results/m-p/136996#M1317</guid>
      <dc:creator>manoctch</dc:creator>
      <dc:date>2025-10-31T14:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Playground doesn't show tool results</title>
      <link>https://community.databricks.com/t5/generative-ai/playground-doesn-t-show-tool-results/m-p/137420#M1325</link>
      <description>&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;The Issue:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;Databricks Playground typically has limited native support for rendering base64 images&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;directly in the chat interface. This is a known limitation in many AI playground&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;environments.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Potential Workarounds:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p4"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;1. &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Use Markdown Image Syntax&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;If your tool returns base64 data, try formatting it as a data URI with markdown:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p5"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;# In your tool's return value&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p6"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;image_b64 = &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;"your_base64_string_here"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p6"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;return&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;f"![Chart](data&amp;amp;colon;image/png;base64,{image_b64})"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p4"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;2. &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Return a Public URL Instead&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;Instead of returning base64, save the chart to a location accessible via HTTP:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p5"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;# Save to DBFS and return a displayable URL&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p6"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;dbutils.fs.put(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;f"/tmp/chart_{uuid.uuid4()}.png"&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;, image_bytes)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p5"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;# Return the URL or use display() in notebooks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p4"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;3. &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Use DisplayHTML in Notebooks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;If testing in a Databricks notebook (not Playground), you can use:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;from&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; IPython.display &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;import&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; HTML, display&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p6"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;display(HTML(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;f'&amp;lt;img src="data&amp;amp;colon;image/png;base64,{image_b64}" /&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p4"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;4. &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Structured Output with Content Type&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;Ensure your tool returns properly structured output with content type hints:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p6"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;"type"&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;: &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;"image"&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;"content"&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;: base64_string,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p6"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;"mime_type"&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;: &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;"image/png"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p4"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;5. &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;File Path Reference&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;Return a file path that can be accessed through Databricks:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p5"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;# Save to a volume or DBFS location&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p6"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;return&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;f"Image saved to: /Volumes/catalog/schema/volume/chart.png"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Recommended Approach:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;The &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;most reliable workaround&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; is to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;1. Save the generated chart to a Databricks volume or DBFS&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;2. Return the file path in the tool response&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;3. View the image separately in a notebook using &lt;/SPAN&gt;&lt;SPAN class="s6"&gt;display(Image(path))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;The Playground interface is primarily designed for text-based interactions, so rich&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;media rendering may require using notebooks or custom applications instead.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 15:58:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/playground-doesn-t-show-tool-results/m-p/137420#M1325</guid>
      <dc:creator>AbhaySingh</dc:creator>
      <dc:date>2025-11-03T15:58:08Z</dc:date>
    </item>
  </channel>
</rss>

