Zero Labs
Industry News / AI

Giving Your AI Coworker Enterprise Context with Databricks Genie

Source · Towards AI By Praneeth Paikray

From the publisher’s feed, collected in the ZeroLabs newsroom.

From team rules to company definitions, across Genie One and Code.In shortDatabricks Genie gives an AI coworker four places to hold enterprise context: instructions for team rules, skills for repeatable tasks, memory for personal preferences and Genie Ontology for company definitions.In my test, Genie One and Genie Code read skills from the same personal folder, so a skill I made in one showed up in the other.What is enterprise context for an AI coworker?Enterprise context is the knowledge an AI coworker needs to do your work the way your company does it. It is what a new hire picks up in their first weeks: the team’s rules, how recurring jobs get done, how you like to work and what the company’s terms mean.Databricks has two AI coworkers that use this context. Genie One is the AI coworker for business users, who ask it questions about company data in plain language. Genie Code is the AI coworker for technical work, and it writes and runs code in your Databricks workspace.To see how the context works in practice, I set up both of them as one person, an analytics engineer at Lumora. Lumora is a made-up software company that sells subscriptions, and all the data in my setup is sample data. Each kind of context ended up in its own place in Genie.Where should each piece of context go?The rule I ended up with is short. If a fact is true for the whole company, it goes in Genie Ontology. If it is a rule for your team, it goes in instructions. If it is a task you repeat, it goes in a skill. If it is only about you, it goes in memory.This is how the rule sorted the facts from my Lumora setup:Genie Ontology: “An active customer is a paying customer who logged in within 30 days” and “Our fiscal year starts on February 1.”Instructions: “New tables go in the dev schema first” and “Ask before you drop a table.”Skills: “Review a table with these six checks before it ships” and “Every Monday, send me a one-page brief,” which a scheduled task can run.Memory: “When I say my region, I mean APJ” and “Show me numbers in a table first.”The sections below follow the order a new hire learns things in. Rules come on day one and playbooks in the first week. What they learn about you comes with time, and the company glossary sits underneath all of it.How do I tell Genie who I am and how my team works?A new hire’s first day starts with who they are working for and the house rules. In Genie, that is the instructions file. It is a Markdown file, which is plain text with simple formatting, and Genie reads it at the start of every conversation.Genie Code looks for two of them. Your own rules go in .assistant_instructions.md in your user folder, and rules for everyone go in .assistant_workspace_instructions.md at the root of the workspace. Genie Code generally gives the workspace file priority unless you tell it otherwise. It also reads any AGENTS.md or CLAUDE.md file in the folders you work in. Each file can hold up to 20,000 characters, and Genie Code ignores anything past that.My Lumora file was short. This is a shortened copy, where B2B SaaS means subscription software sold to businesses:# About meI am an analytics engineer on the RevOps data team at Lumora, a B2B SaaScompany. I build pipelines and metric views. # How I work- Write SQL first. Use Python only when SQL can't do it.- New tables go in the lumora_dev schema. Never write to lumora directly.- Every new table gets a table comment and a comment on each column. # Ask before you act- Ask before you drop, overwrite or rename a table.To check it, I opened a new chat and asked Genie Code, “What do you know about me and the rules I want you to follow?” It listed every rule from the file back to me.Genie One handles instructions differently. It has one instructions file per workspace, which an admin writes at /Workspace/.genie_workspace_instructions.md, and that file applies only to Genie One chat. There is no personal instructions file in Genie One, so your own preferences go in memory instead.How do I teach Genie a task it should repeat?Rules tell a new hire what to avoid. Playbooks show them how to do the jobs that come up every week. In Genie, a playbook is a skill: a folder with a SKILL.md file that starts with a name and a one-line description, followed by step-by-step instructions. Genie skills follow the open Agent Skills format.My first skill covered a job I do often, reviewing a table before it ships. A shortened copy:---name: pipeline-reviewdescription: Review a Lumora pipeline or table change before it ships. Use when asked to review, check or sign off a pipeline or a table.---Run these checks in order. Report each one as PASS or FAIL with one line of evidence.1. Comments. The table and every column have a comment.2. Schema. New tables are in lumora_dev, not lumora.3. Row count. Flag any change above 5 percent compared with the source.4. Nulls. List key columns where more than 1 percent of rows are null.5. Duplicates. Check that the primary key is unique.6. Definitions. If the table computes customers, MRR or churn, check the logic against Genie Ontology.End with one of these: ship, ship with fixes, or do not ship.Do not change any table during a review.I saved it in my personal skills folder, /Users//.assistant/skills/pipeline-review/, and typed "Please review the subscriptions table before we ship it." I never named the skill. Genie Code matched my request to the skill's description, loaded the skill and made a plan with one step per check. This is why the description matters most. If it does not say what the skill does and when to use it, Genie has no reason to load it.The review ended with “ship with fixes” because the table had no comments and sat in the wrong schema, which broke two rules from my instructions file.In Genie One you make a skill by asking for it, for example “Create a skill called monday-brief that gives me a one-page brief for my region,” and you run it by typing /monday-brief.That skill led to the most useful finding of my test. Genie One saved monday-brief in the same personal folder as my Genie Code skill. When I asked each product which skills it had, Genie One listed pipeline-review and Genie Code listed monday-brief. You can keep your personal skills in one folder and use them from both products.How does Genie remember things about me, and how do I check what it saved?Some things a new hire only learns by working with you, like what you mean by “my region” or how you like numbers shown. Genie keeps these as memories, which are short facts about you that it saves and uses in later conversations.You save one by starting a message with “Remember that.” When I told Genie One, “Remember that when I say my region I mean APJ at Lumora,” it showed a “Saving a memory” step in the chat. When a later answer uses a memory, Genie One adds a citation that shows which one.Genie Code also saves memories on its own when it learns something useful. When I asked it, “What do you remember about me?”, it listed my one saved preference and added, “Everything else I know comes from your .assistant_instructions.md, which I read fresh each session.” That line shows the difference between the two. Instructions apply to every conversation, and a memory comes up only when it fits the task.Memories go out of date, so check them about once a month. Ask each product what it remembers and tell it to forget anything stale. In my test, both products deleted the memory I named and confirmed what was left. Also make sure no memory holds a password or an API key, because Genie saves what you tell it.Why do company definitions belong in Genie Ontology instead of skills?The last piece is the company glossary, and it is the one that most needs to be shared. Genie Ontology is the shared layer of business context in Databricks. Genie One and Genie Code can both use it, and so can Genie Agents. It has two parts. The first is the metric views and pages you write in Unity Catalog, which is where Databricks keeps your tables and their descriptions. A metric view is a saved definition of a business number, such as MRR (monthly recurring revenue). The second is context that Databricks pulls from what you already have, such as dashboards, saved queries and Genie Agents.My test showed what goes wrong when a definition lives somewhere else. My test workspace is shared with other demos. When Genie One built the monday-brief skill, it searched the workspace for a definition of MRR, found a glossary page from a different demo and wrote that formula into the skill. The formula broke three Lumora rules:It added up subscription amounts as stored. Lumora stores the full yearly price on annual plans, so MRR has to divide those amounts by 12.It used the calendar quarter, but Lumora’s fiscal year starts on February 1.It counted every canceled subscription as churn, including customers who only moved to a bigger plan.Because the formula was written into the skill file, the skill would have repeated these mistakes every Monday. A better skill names the term and points to its Genie Ontology definition, for example “Use the Genie Ontology definition of MRR.” Then you fix a definition in one place instead of in every skill, and you can check the sources Genie cites in its answer.Memory is the wrong place for definitions too. Genie One memories are private to you, so your teammates would not get the same answer you do.This is how I wrote one Lumora term as a page:## Active customerAn active customer is a paying customer with at least one 'login' event inthe last 30 days. API calls, report runs and exports do not count, becauseintegrations can keep running when nobody uses the product.FAQDo I need Genie Ontology before I start?No. You can start on day one with an instructions file and one skill. Add Genie Ontology pages when your team needs the same answer to the same question, such as how many customers you have.Can my whole team use the same skill in Genie Code?Yes. Genie Code also reads skills from Workspace/.assistant/skills/, so a skill saved there works for everyone in the workspace, not only for you.SourcesCustomize Genie Code with instructionsChat in Genie OneGenie OntologyGiving Your AI Coworker Enterprise Context with Databricks Genie was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.