cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Generative AI
Explore discussions on generative artificial intelligence techniques and applications within the Databricks Community. Share ideas, challenges, and breakthroughs in this cutting-edge field.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

AI Model to Generate Python Utilities

neeraj_borana
New Contributor III

Hi team,
I'm working on Databricks and need to choose a model from Foundation Model APIs / AI Playground to generate Python utilities for my infra team. For notebook Assistant (Ctrl+I in cells), which model would you recommend for reliable Python code generation, and why?

1 ACCEPTED SOLUTION

Accepted Solutions

emma_s
Databricks Employee
Databricks Employee

Hi, They are effectively the same assistant under the hood, it's more the context of where it's working from that's important. 

So the cell based one will assume you're asking about the specific cell you're in and because it's only a small prompt window it's great for trouble shooting or simple changes.

The notebook assistant will think you're chatting about all your code and it gives you a much more chat based interface. I tend to use it for planning through my code and longer thought processes where I may be sending multiple prompts.

I hope this helps!

Thanks,


Emma

View solution in original post

3 REPLIES 3

emma_s
Databricks Employee
Databricks Employee

Hi,

For the foundation model APIs part of your question, I would probably choose between one of the models is very strong at coding. This would either be Open AI Codex Family or Claude Opus. I would probably start by testing Open AI codex Max and Mini against each other and if I think I could get away with the Mini use this as it will be hopefully the best balance between cost and accuracy. If the accuracy isn't good enough then I would then look to compare  Open AI codex Max and then go to Claude Opus. Note though that the Open AI codex models aren't currently available in the AI playground but can be used via a responses API.


When it comes to the Assistant, you don't actually control which underlying model it uses. All you can control is whether you allow it to access partner powered models or not (in workspace settings) This controls whether it has access to some partner provided services: https://learn.microsoft.com/en-us/azure/databricks/databricks-ai/partner-powered.

What is more important on Assistant to get more accurate results is your workspace settings, this allows to set things like your coding standards etc, to give the assistant much more context about how it should be used.  Assistant Config

I hope this helps.

neeraj_borana
New Contributor III

Hi,

Iโ€™m trying to understand the difference between the Databricks Notebook Assistant and the Databricks Cell Assistant. From what I gather:

  • Notebook Assistant seems to provide guidance at the whole notebook level, like suggesting workflows, refactoring multiple cells, or giving high-level explanations.

  • Cell Assistant appears to focus on individual cells, helping generate, autocomplete, or explain code for that specific cell.

Could someone clarify:

  1. Are these two assistants separate tools, or are they different views of the same AI assistant?

  2. Are there any limitations or differences in functionality between the two?

  3. Any tips on best practices for when to use Notebook Assistant vs Cell Assistant?

Thanks in advance!

emma_s
Databricks Employee
Databricks Employee

Hi, They are effectively the same assistant under the hood, it's more the context of where it's working from that's important. 

So the cell based one will assume you're asking about the specific cell you're in and because it's only a small prompt window it's great for trouble shooting or simple changes.

The notebook assistant will think you're chatting about all your code and it gives you a much more chat based interface. I tend to use it for planning through my code and longer thought processes where I may be sending multiple prompts.

I hope this helps!

Thanks,


Emma