<?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 Re: ai-query Execution in Generative AI</title>
    <link>https://community.databricks.com/t5/generative-ai/ai-query-execution/m-p/177489#M2295</link>
    <description>&lt;PRE&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/193958"&gt;@IM_01&lt;/a&gt;,

ai_query is built for batch inference, but the docs do not say that it runs one call per DataFrame partition, and they do not describe the internal batching. They say the platform manages it. The AI Functions page says: "AI Functions automatically manage parallelization, retries, and scaling. It is advised to submit your full dataset in a single query rather than manually splitting it into small batches."

The same page says "your query runs on the compute you submit it from, such as a SQL warehouse, notebook, cluster, or pipeline", and that "the model inference may run on separate Databricks-managed infrastructure". So the docs do not link the number of partitions to the number of parallel model calls, and I would not tune partitions for this.

For optimised batch inference, the best practices on the "Use ai_query" page are:
1) Use Databricks-hosted system.ai model services, not provisioned throughput endpoints.
2) Pick a model from the batch-optimised list on that page. A non-optimised model "can result in reduced throughput and longer job completion times."
3) Submit your full dataset in a single query. "Manually splitting data into small batches can reduce throughput."
4) Set failOnError to false for large workloads, so failed rows return an error message and you keep the successful results.
&lt;BR /&gt;[&lt;A href="https://docs.databricks.com/aws/en/large-language-models/ai-query]" target="_blank" rel="noopener"&gt;https://docs.databricks.com/aws/en/large-language-models/ai-query]&lt;/A&gt;&lt;BR /&gt;
To see what happened in a run, open the query profile in the SQL editor and click AI Query. It shows the completed and failed inferences and the total time.&lt;/PRE&gt;</description>
    <pubDate>Wed, 25 Nov 2026 02:33:07 GMT</pubDate>
    <dc:creator>sundar-sg</dc:creator>
    <dc:date>2026-11-25T02:33:07Z</dc:date>
    <item>
      <title>ai-query Execution</title>
      <link>https://community.databricks.com/t5/generative-ai/ai-query-execution/m-p/177469#M2293</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I see that ai-query supports parallelization. Is it executed in parallel across each partition of the dataframe.&lt;BR /&gt;could any one explain how it supports optimized batch inference&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2026 17:30:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/ai-query-execution/m-p/177469#M2293</guid>
      <dc:creator>IM_01</dc:creator>
      <dc:date>2026-11-24T17:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: ai-query Execution</title>
      <link>https://community.databricks.com/t5/generative-ai/ai-query-execution/m-p/177489#M2295</link>
      <description>&lt;PRE&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/193958"&gt;@IM_01&lt;/a&gt;,

ai_query is built for batch inference, but the docs do not say that it runs one call per DataFrame partition, and they do not describe the internal batching. They say the platform manages it. The AI Functions page says: "AI Functions automatically manage parallelization, retries, and scaling. It is advised to submit your full dataset in a single query rather than manually splitting it into small batches."

The same page says "your query runs on the compute you submit it from, such as a SQL warehouse, notebook, cluster, or pipeline", and that "the model inference may run on separate Databricks-managed infrastructure". So the docs do not link the number of partitions to the number of parallel model calls, and I would not tune partitions for this.

For optimised batch inference, the best practices on the "Use ai_query" page are:
1) Use Databricks-hosted system.ai model services, not provisioned throughput endpoints.
2) Pick a model from the batch-optimised list on that page. A non-optimised model "can result in reduced throughput and longer job completion times."
3) Submit your full dataset in a single query. "Manually splitting data into small batches can reduce throughput."
4) Set failOnError to false for large workloads, so failed rows return an error message and you keep the successful results.
&lt;BR /&gt;[&lt;A href="https://docs.databricks.com/aws/en/large-language-models/ai-query]" target="_blank" rel="noopener"&gt;https://docs.databricks.com/aws/en/large-language-models/ai-query]&lt;/A&gt;&lt;BR /&gt;
To see what happened in a run, open the query profile in the SQL editor and click AI Query. It shows the completed and failed inferences and the total time.&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Nov 2026 02:33:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/ai-query-execution/m-p/177489#M2295</guid>
      <dc:creator>sundar-sg</dc:creator>
      <dc:date>2026-11-25T02:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: ai-query Execution</title>
      <link>https://community.databricks.com/t5/generative-ai/ai-query-execution/m-p/177490#M2296</link>
      <description>&lt;PRE&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/193958"&gt;@IM_01&lt;/a&gt;,

ai_query is built for batch inference, but the docs do not say that it runs one call per DataFrame partition, and they do not describe the internal batching. They say the platform manages it. The AI Functions page says: "AI Functions automatically manage parallelization, retries, and scaling. It is advised to submit your full dataset in a single query rather than manually splitting it into small batches."

The same page says "your query runs on the compute you submit it from, such as a SQL warehouse, notebook, cluster, or pipeline", and that "the model inference may run on separate Databricks-managed infrastructure". So the docs do not link the number of partitions to the number of parallel model calls, and I would not tune partitions for this.

For optimised batch inference, the best practices on the "Use ai_query" page are:
1) Use Databricks-hosted system.ai model services, not provisioned throughput endpoints.
2) Pick a model from the batch-optimised list on that page. A non-optimised model "can result in reduced throughput and longer job completion times."
3) Submit your full dataset in a single query. "Manually splitting data into small batches can reduce throughput."
4) Set failOnError to false for large workloads, so failed rows return an error message and you keep the successful results.
&lt;BR /&gt;[&lt;A href="https://docs.databricks.com/aws/en/large-language-models/ai-query]" rel="noopener" target="_blank"&gt;https://docs.databricks.com/aws/en/large-language-models/ai-query]&lt;/A&gt;&lt;BR /&gt;
To see what happened in a run, open the query profile in the SQL editor and click AI Query. It shows the completed and failed inferences and the total time.&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Nov 2026 02:35:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/ai-query-execution/m-p/177490#M2296</guid>
      <dc:creator>Yougasundar</dc:creator>
      <dc:date>2026-11-25T02:35:34Z</dc:date>
    </item>
  </channel>
</rss>

