Complete your Databricks User Groups profile!

Fill out a few details about yourself so the community can get to know you.
Genie Community

Exploring Genie's Query Efficiency and also Safety on Personal Devices

Summary: Sandeep Bojanala shared their experience of conducting a session on Genie and raised questions about query efficiency and security on personal devices. philippe schmit valat commented on Genie's ability to generate more efficient queries compared to manual user inputs. Abdelhalim Dadouche emphasized the importance of context in Genie conversations and suggested focusing on security measures for mobile use, like encryption. Patricia Ferreiro added that Genie doesn't cache results except under specific conditions and detailed the techniques used for query efficiency. Simon Kuijpers mentioned that monitoring similar prompts can help in providing more efficient queries, while Lingeshwaran Kanniappan noted that Genie prioritizes correct and governed answers over perfect SQL efficiency.
AI Summary

Hi All,

I recently had the privilege of conducting a session with a selected group of approximately 100 employees in my organization to deliver an introductory overview of the functionalities offered by Genie.

During the session, several inquiries were raised that necessitate additional investigation and I need this group's help here.

  1. In scenarios where an identical query is posed repeatedly by the same individual or group, does Genie possess the capability to circumvent the execution of the SQL query anew and instead provide the previously obtained results?

  2. By what mechanisms does Genie manage to construct efficient queries in response to user requests without adversely impacting performance?

  3. Given that Genie can be accessed even on mobile devices, there is potential for sharing sensitive details via the generated PDF documentation. What precautions should be implemented in this regard?

Regards

Sandeep

7 comments

The question of the efficiancy of the query who creat Genie is beter or not en coparation to one humain user.

Imagine this wuestion #who is the best cusyomer?#

When an user generate an analyse generaly don't know is tables and relation of the table. For understand the data make select * fron table limit 100. And after ejecute variados querys fir obtain the result.

With Genie is not necesarybbecause generate the great result directly.

Then i make an reduction of the cost to prepare and give the best result with out necesary to generate more query befot.

When genie creat an query he know the best practice to make the query more than the user.

And the last is we know what's is the best query we can annd this query in the genie query exemple.

Whit this the query is better because all users use it and is not necesary to make learning and control for the supervision of user.

Then i think Genie is most better for generate Query efficiance / cost than user

I believe Genie has the potential to be more efficient than many end users, especially since users often spend extra time exploring tables, testing joins, and refining queries on their own. Genie can save a lot of that effort when the environment is well set up with good metadata and example SQL. Just a gentle reminder to keep in mind that Genie still benefits from review and tuning, and skilled users might sometimes craft even better queries.

Great to read that your company is investigating the adoption of Genie at Scale!

I understand you interrogations (as I got the same ones when starting using Genie in my day-to-day work).

  1. Reuse of previously generated result

In this scenario you have to consider that each Genie conversation is unique to to use having it. You dan’t want to “spill” this discussion to other users as they may contain sensitive informations.

Ultimately Genie will leverage the Unity Catalog to assess which data and asset the current user at the current execution time is allowed to access.

Therefore, reusing the same queries may not be relevant as the “context” between users will most likely be different.

  1. Efficient queries

From my perspective, I don’t expect Genie to write the most efficient queries. However, I expect Genie to build queries that can be understood generally speaking and ultimately provide the correct response.

Keep in mind that writing more efficient queries may require more time which you don’t want your users to wait for in the initial iterations.

  1. Genie on mobile

Giving access to Genie on Mobile should require the same level of security as you would have on your laptop like encryption, usage policies etc.

Sadly, many organisations don’t yet consider our mobile devices (phones or tables) as extensions of our working environment that requires the same level of security and governance as our laptops..

For example, as a Databricks employee, I can’t connect Genie One on my mobile unless it’s enrolled with our MobSec tools and that our VPN is activated.

In term of features, like sharing PDF, users could do exactly the same on their laptops (it might even be easier that on mobile device).

Maybe, Genie One should include more “privacy” features like disable the ability to save locally files or take screenshots.

Hope this helps.

Thanks Abdelhalim. It is helpful.

To briefly add to @Abdelhalim's response:

  1. We don't cache results in Genie aside from what DBSQL provides, i.e. if the exact SQL query has been cached. We do other forms of caching like context caching e.g. for certain context like column, comments, etc. or prompt caching for Genie Agents. See our April release notes.

  2. We use a mix of tight grounding, constrained context selection, and runtime guardrails. Following our best practices helps Genie write better queries.

Cheers,

Patricia

One thing to take in mind: if users run similar prompts, the Genie Space admin can identify this in the monitoring tab. Based on this information, they can provide the query in the configuration. This way you can provide the efficient query. This reduces tokens and DBSQL costs (as query is more efficient).

I broadly agree that Genie can save users a lot of trial and error, but I would avoid saying it always writes the most efficient query. Today, it is optimized more for correct and governed answers than perfect SQL efficiency, and the best results usually come from good metadata, curated example SQL, and the right warehouse setup.