AI 智能体想访问你的数据?Oracle 的 Jeff Smith 谈安全开放数据库
原题Your AI Agent Wants Your Data. Here's How to Lock It Down - Jeff Smith, Oracle
推荐理由Oracle 的分享把数据库授权落实到工具入口与查询执行,帮助企业团队判断哪些权限应由系统强制执行,减少依赖提示词约束。
看前速览
Oracle 的 Jeff Smith 提出,用经过审核的报表工具、更安全的诊断环境、标注过的数据库结构和数据库层授权,支持智能体访问业务数据。
查询执行成功,也可能回答错了业务问题
Smith 提醒,生成的 SQL 可能返回看似合理但错误的业务数据,尤其当用户无法判断查询或连接关系是否正确时。
通过发现与执行工具开放已审核报表
描述现有参数化报表及输入,先发现相关子集,再执行获准的 SQL,而不是每次都让模型从头生成查询。
降低数据库诊断风险与上下文浪费
在更安全的只读环境中排查,保留人工修改权限,并提供结构标注,避免反复暴力探索数据库。
在结果到达智能体前执行用户的数据权限
组织登录、权限范围、角色与数据库策略共同决定哪些行或信息可以返回,仅靠工具层检查并不充分。
完整摘要
Jeff Smith 介绍 Oracle 如何向 AI 智能体开放数据库能力,同时避免将 SQL 成功执行误当作业务答案正确的证明。第一个场景是将企业现有报表转为有描述、带参数的工具:通过列表操作发现相关报表,再调用执行操作,避免暴露数百个独立工具。获得授权的会话还可查看报表 SQL,让智能体学习业务数据模型。在性能调优方面,Smith 更倾向于让智能体提供建议,而非自主修改,并介绍了在只读备用实例上排查问题的方式,避免给予不受限制的生产访问。他强调,只读权限仍需限制可以看到哪些数据。第三个场景通过组织文档和标注丰富数据库结构元数据,减少反复探索数据字典与消耗 token。安全部分将组织单点登录、权限范围与数据库策略连接起来,在结果返回智能体前移除未获授权的数据。结尾提到计划中的 MCP apps、通过工具提供的技能,以及文档转向量流程。演讲给出了具体接口与授权模式,但实现效果和路线图日期仍属厂商声明,未提供横向基准或对抗性安全测试。
章节
文字稿
简要描述Brief Description
Jeff Smith 讲解了 AI 代理的数据库访问、作为工具的经审核报告、性能调优、模式上下文,以及在数据库层强制实施的安全措施。Jeff Smith explains database access for AI agents, vetted reports as tools, performance tuning, schema context, and security enforced at the database.
目录Table of Contents
- 简介Intro
- 什么是 Oracle AI 数据库?What is the Oracle AI Database?
- 为什么智能体需要访问数据库Why agents need database access
- 用例 1:将报告用作工具Use case 1: Reports as tools
- 为什么自然语言转 SQL 存在风险Why natural language to SQL is risky
- 列出报告,执行报告List reports, execute reports
- 用例 2:性能调优Use case 2: Performance tuning
- 用例 3:面向智能体的架构文档Use case 3: Schema docs for agents
- 安全性:是谁在发起请求?Security: who's asking?
- 即将推出的是什麼?What's coming
简介Intro
我是 Jeff,来自 Oracle。我几乎和 Oracle 同岁。有人知道 Oracle 是哪一年成立的吗?就是《星球大战》上映的那一年。对。我做数据库工具大约有 25 年了。很早以前我就明白了一个事实:不管你做的工具有多好,到头来人们想要的还是 Excel 电子表格。现在还是这样吗?智能体已经干掉 Excel 了吗?他们不是发布了那个“反向工程任何东西”的工具吗?然后他们马上就对 Excel 做了反向工程。所以,Excel 可能还是有市场吧。I'm Jeff. I'm from Oracle. I'm almost the exact same age as Oracle. Does anyone know what year Oracle was founded? Same year Star Wars came out. Yeah. and I've been working with database tools for about 25 years. And I learned a truth very early on that no matter how good of a tool you build, at the end of the day what people want are Excel spreadsheets. Is that still true? Has the agent killed Excel yet? Well, they published the reverse engineer anything, right? And then they immediately reverse engineered Excel. So, maybe Excel's still a thing.
什么是 Oracle AI 数据库?What is the Oracle AI Database?
在我们的展位上,以及街上那些看到我穿着 Oracle 外套的陌生人,问得最多的问题——除了“能把你的外套给我吗?”之外——就是:“Oracle AI 数据库是什么?”那么,在座各位有谁以前用过、研究过或见过 Oracle 数据库?现在正在使用 Oracle 的又有谁?好。the biggest question we've got at our booth and from random people on the street that see my Oracle jacket, other than can I have your jacket, is like what is the Oracle AI database? So, who in here has worked with or studied or seen an Oracle database before? Who in here is currently using Oracle? Cool.
谢谢。那么,什么是 Oracle AI 数据库?嗯,如今回答这个问题的唯一可靠方式,就是去问 Claude。我的智能体训练得很好,也很守规矩。所以,它给出的答案其实相当不错。简单来说,数据库现在能够参与到你所有的 RAG 流水线中,因为我们原生支持在数据库内部存储向量。Thank you. so, what's an Oracle AI database? Well, the only real way to answer this question today is to ask Claude. my agent's very well trained and behaved. So, it actually had a pretty good answer. The nutshell is the database is now able to participate in all of your rag pipelines because we natively support vectors inside the database.
所以,如果你有财务数据、人力资源数据、ERP、航运、零售、政府、医疗保健等数据,想要在那个数据仓库、数据湖、数据下水道,或那个精心整理的数据库中查找信息。So, if you've got financial data, HR data, ERP, shipping, retail, government, healthcare, whatever, if you want to look for information in that data warehouse, that data lake, that data sewer, that beautifully curated database.
我们可以将你的信息与数据库中的数据一起向量化,并为这一切提供一个统一的 SQL 接口。所以,你不必仅仅为了你的……就在八九个不同的平台之间复制数据。你看到那个了吗?那简直像蜘蛛侠。所以,这意味着只需一个 MCP 服务器接入数据库,而我今天来这里是要谈谈 MCP。We can vectorize your information alongside the data inside the database, and we give you a single SQL interface across all of that. So, you don't have to replicate data across eight or nine different platforms just for your Did you see that? That was like Spider-Man. So, that means one MCP server into the database, and I'm here to talk about MCP.
所以,看看……哦,这次没赶上。我们添加到数据库里的不只是向量。除了关系型表和列之外,非常感谢。您想要一双免费的袜子吗?想。感觉你应该因此赢得一个奖品。So, just see Oh, missed it that time. It's not just vector that we've added to the database. So, in addition to your relational tables and columns, thank you so much. Would you like a complimentary pair of socks? Yeah. Feel like you should have won a prize for that.
是的,谢谢。30年来,我们一直在为数据库添加数据类型和数据工作负载。因此,这些我们都支持,也支持图功能。所以,如果你喜欢图 RAG,我们也可以在单个 Oracle 实例中实现。Yes, thank you. For 30 years, we've been adding data types and data workloads to the database. So, we support all of these things. also, graph. So, if you're a fan of graph rag, we can do that as well inside the single instance of Oracle.
所以,人们喜欢拿 Oracle 开涮,因为我们是老牌公司,但这并不意味着我们停止创新了。我的意思是,我们一直在发明、打造、发布新东西,每个月都有。我们必须这么做,因为人们给了我们很多钱,他们期待得到相应的价值。So, people like to dig on Oracle cuz we're old, that doesn't mean we've stopped innovating. I mean, we we're inventing, building, publishing new stuff every month. We have to because people are giving us lots of money, they expect value in return for that.
为什么智能体需要数据库访问权限Why agents need database access
好吧,今天我真正想聊的是 MCP。我们会介绍一些实际应用场景,因为我最常被问到的就是:智能体、大语言模型、MCP,听起来都不错,可数据库呢?这到底有什么意义?对我来说,答案显而易见。All right. So, what I want to actually talk about today MCP, we're going to cover some real-life use cases cuz that's the biggest question I get is like agents, LLMs, MCP great, who cares about databases? Like, what what's the point here? It And for me, it's very obvious.
我的意思是,你们所有的数据、信息和知识都在数据库里,而智能体依赖数据才能发挥作用。那么,我们怎样才能安全地把这些信息提供给它们,同时又不至于因为泄露个人身份信息(PII)或做出什么糟糕的事而让公司陷入困境,最后还得站在国会面前作证?我想谈谈我们正在推动的进展。你知道,MCP 是一种全新的协议,但他们几乎每三个月就会添加新内容。I mean, like all of your data, information, knowledge is inside a database, and the agents thrive on on data. So, how can we get that information to them safely without bringing the company down because we've leaked PII or done something horrible and end up in front of Congress testifying about it. I want to talk about the advancements that we're pushing. You know, MCP is brand new protocol, but they add stuff almost every 3 months.
所以,Oracle 正在与董事会进行这些讨论,而我们也在努力跟进不断推出的新功能。So, Oracle is there having these conversations with the board and we're trying to pick up the new features as they come out.
今天我们没时间做问答,不过我确实带了一些周边来。我想大部分都发完了。如果你想要包或者袜子,哦,我们后面还有一些 DB 毛绒玩具,可以扔给你们。我也会分享一些路线图相关的内容。这是场一小时的演讲,但有人告诉我我有 20 分钟——后来又说其实没有,只有 18 分钟。And we don't have time for Q&A today, but I do I did bring some swag. I think most of it's gone. If you want a bag or socks, oh, we have some DB stuffies in the back. We can throw those at you. I'll share some roadmap stuff as well. So, this is an hour talk and I was told I have 20 minutes and then not really just 18.
看看我们能讲多快吧,毕竟我已经在台上浪费了两分钟。好,我希望大家听完后能带走三点:我们构建了什么、自然语言转 SQL 存在哪些问题,以及我们正在尝试做些什么来提高这类转换的可信度。最后,我也会分享一些可能有助于优化 token 的内容。Let's see how fast we can go cuz I've wasted 2 minutes on the podium. All right. So, the three things I want you to be able to walk away with, what we've built, the problems with natural language to SQL, and some things that we're trying to make that more trustworthy, and then anything I can share with you folks that might help with token optimization.
用例 1:将报告用作工具Use case 1: Reports as tools
好,下面说说用例。我认为这是企业最终会采用的最后一个用例,但我也认为它最物有所值。通常,负责管理数据库周边基础设施的人,才有机会接入新技术。所以,当我说“嘿,想试试 MCP 服务器吗?”时,通常是数据库管理员、网络管理员、系统管理员或 DevOps 工程师最先有能力这么做。他们会用这些工具让自己的工作更轻松。All right, use cases. I think this is the last use case that businesses end up undertaking, but I also think it is the biggest return for your buck. generally the people managing the infrastructure around the database are the ones that get to hook up the new technology. So, when I say, "Hey, do you want to try an MCP server?" It's usually a database administrator, a network administrator, a sysadmin, a DevOps engineer that's going to have the ability to do that in the first place. So, they'll use these tools to make their lives easier.
但如果你看看一家公司,就会发现这类人多得多——他们会接到高级副总裁、执行副总裁,甚至是CXO提出的问题,比如:“我们上个月卖出了多少件产品?我们在这个地区的业绩如何?我们应该采用多大的折扣率,才能让更多人完成购物车结账?”But if you look in a company, there are way more of these types of people, the people that get the questions from the SVP, the EVP, God forbid the CXO saying, "How many widgets did we sell last month? How are we performing in this region? what discount rate should we run to maximize people closing out their carts?
“所有那些我假装懂的有趣玩意儿。”一般来说,事情通常是这样:他们打开 BI Publisher,进入数据集市,开始制作电子表格,得出答案,然后把答案带到某个会议上。接着,有人根据汇总整理出来的数据透视表和 Excel 电子表格,做出非常重要的决策。而这类问题多得没完没了。并不是说人们想不出问题来问,而是他们没有足够的时间和人手来回答这些问题。All all that fun stuff that I pretend to understand." And so, what generally what happens, they go into their BI Publisher, they go into their data marts, they start building their spreadsheets, they pop out the answer, and that ends up in a meeting somewhere, and someone makes very important decisions based on the pivot tables and Excel spreadsheets that have been compiled. And these questions are endless. Like it's not that people run out of questions to ask. They don't have enough time and people to answer those questions.
几乎每一秒都会有人说:“哦,要不试试这个?要不试试那个?”所以,生成式 AI 的妙处就在于,它能发挥力量倍增器的作用,对吧?现在我们有时间和资源,可以提出这些没完没了的问题。Like every second there's like, "Oh, there's What if we try this? What if we try that?" So, the beauty of generative AI is like it's a force multiplier, right? So, we had now have the time and the resources to ask these endless questions.
问题在于,数据在数据库里,而整理这些电子表格的人,The problem is the data's in the database, and the people putting together these spreadsheets,
他们不一定是 SQL 专家或数据模型架构师。他们了解业务,但可能看不出交叉连接在这种场景下并不合理。they're not necessarily SQL experts, data model architects. They understand the business, but they wouldn't recognize that a cross join doesn't make sense for this scenario.
为什么将自然语言转换为 SQL 存在风险Why natural language to SQL is risky
所以,自然语言转 SQL 很棒,但我觉得它很危险。你听说过“只要能编译,就发布”这句话吗?工程师们会拿这话开玩笑。我们也假装跟着笑。我写了条 SQL 查询,数据返回来了。太棒了,我写对了。并没有。你其实并没有问出自己以为问了的问题。So, natural language to SQL is amazing, but I think it's dangerous. Have you ever heard the phrase, "If it compiles, ship it?" Engineers laugh about this. We pretend to laugh along. I wrote a SQL query, data came back. Awesome, I got it right. No. You didn't actually ask what you thought you asked.
LLM 经常会运行一些看起来返回了正确数据、实际上却并非如此的查询。尽管 LLM 在这方面越来越出色,但它们仍会有各种不足之处。比如说,我不会仅凭一个提示词和返回结果,就相信 Codex、Claude、Gemini 或这些模型来决定我们要投资 XYZ 的哪个业务分支。而且让它们做这些事也很贵,因为它们会蛮力遍历你的词典和数据库,寻找回答这些问题所需的正确数据。The LLMs are going to frequently run queries that look like they're returning the right data, but they're not. And there are various reasons why the LLMs, although they're getting better and better at this, are still going to fall short. Like I would not trust Codex or Claude or Gemini or any of these two decide what business branch that we're going to invest in XYZ just based on a prompt and a thing that pops back. It's also expensive to ask them to do this stuff, too, cuz they're going to brute force your dictionary your database looking for the right data to answer these questions.
因此,这不仅会不可靠,而且使用这些工具的人未必了解代理和 MCP 代表我们在做什么;此外,获取这些数据还会消耗大量令牌和时间。因此,我们在 Oracle 做的一件事就是告诉大家:“嘿,作为一家企业、一个团队或一个小组,你们有 SharePoint、有网络驱动器,或者有其他存放着一层又一层文件夹、里面装满了你们多年来整理的报告的地方。而这些正是人们提出问题时你们会查看的资料。那么,为什么不想办法把它们通过数据管道导入数据库和/或 MCP 服务器,并把它们作为代理可以调用的工具或 API 呈现出来呢?”So, not only is going to be unreliable and the people using this these tools don't necessarily understand what the agents and MCPs are doing on our behalf, but it's going to take a lot of tokens and time to get that data. So, one of the things we've done at Oracle is said, "Hey, as a business, as a team, as a group, you've got a SharePoint, you've got a network drive, you've got something where there's folders and folders and folders of reports that you've compiled over the years. And these are the things that you look at when people ask these questions. So, why not find a way to pipeline them into the database and/or MCP server and present those almost as like tools or APIs that the agent can call.
所以,不是让智能体要求 LLM 生成查询,而是告诉它:“嘿,这些是你可以使用的报告。”So, instead of the agent tasking an LLM to generate a query, you say, "Hey, these are the reports available to you.
“这些里面你想看哪一个?”所以,这就是我们在 Oracle 做的事。我们允许你想用多少个就用多少个。不过,你确实需要为此投入一些时间。你需要描述这些报告,我还喜欢加上一句:“嘿,这里有一些示例问题。”你知道,智能体可以说:“嘿,如果你有关于这个的问题,这份报告很适合运行。”我会说明这份报告的含义。Which of these would you like to look at?" So, that's what we've done at Oracle. We allow you to take as many of these as you want. Now, you do have to put some time into this. You'll need to describe the reports and I like to include like, "Hey, here's sample questions." You know, the agent can say, "Hey, if you got a question about this, this is a good report to run." I describe what the report means.
我会描述所有输入,所以它们当然都是参数化的。不过,报告底层的代码基本上是硬编码的。因此,LLM 可能会选错报告,但不会因为生成了错误的 SQL 而出错。这样一来,它可能出错的地方就少了一个。I describe all the inputs, so of course they're parameterized. But, the code underneath the report is more or less hard-coded. So, the LLM might screw up by picking the wrong report, but the LLM's not going to screw up by generating the wrong SQL. So, it's just one less plus place it can mess up.
列出报表,运行报表List reports, execute reports
现在说到 MCP 工具,我介绍两个工具,分别叫 list reports 和 execute reports。比如,我可以有 500 份报告,但这不代表有 500 个工具。那会……那会撑爆上下文,接着智能体就会说:“这太多了。这……这没什么用。”所以,当我提出问题时,它可以说:“根据这个关键词,给我找出任何看起来像这样的报告。”我会收到一份报告列表,然后就可以执行其中一份报告来获取数据。Now, in terms of MCP tools, I present a tool called list reports and execute reports. So, I could have 500 reports, that's not 500 tools. That would That would blow out context and then agent would be like, "This is This is too much. This isn't useful." So, when I ask a question, it can say, "Using this key phrase, give me any report that looks like this." I'll get a report list back and then I can execute one of those reports to get the data back.
这是自然语言转 SQL 之外的一个选项。因此,我们的 MCP 服务器确实支持接收任意临时 SQL 存储过程代码,并即时在数据库上执行;但它们也支持关闭这一功能,将使用范围限制为自定义工具和报表。对于那些从事上下文工程的人来说,还有另一种模式。这些报表就像是业务运作方式和数据模型运作方式的蓝图。This is an option above natural language to SQL. So, our MCP servers definitely support taking arbitrary ad-hoc SQL stored procedure code and executing it on the fly against the database, but they also support turning that off and limiting you to custom tools and reports. And there's another mode for the context engineers out there. These reports represent like the blueprint for how the business works, for how the data model works.
所以,如果你在经过 OAuth 2 身份验证的会话中拥有适当的作用域或角色,这个工具还会提供选项,让代理查看报表背后的 SQL。这样它就能了解你的数据在系统中的组织方式,从而在生成查询时更有可能一次就生成正确的查询。基本上,你是在说:“这里有一些 Markdown,说明我们如何查出上个月卖出了多少个小部件。”当然,结果随后就返回来了,而我们的代理会把它格式化得很漂亮。在座的各位,有谁开始试用 MCP 应用了?So, if you have the proper scope or role in your OAuth 2 authenticated session, the tool will also offer to show the agent the SQL behind the report. So, it can learn how your data is organized in the system and then it's going to have a much better chance at one-shotting the right query when it goes to generate it. So, you're basically say, "Here's some markdown explaining how we find out the number of widgets we sold last month." And of course, here comes the results back and our agent nicely formats that. Who in here started playing with MCP apps?
是的。所以,我想这是在七月份的规范中引入的。我稍后会谈到这件事,大概讲五分钟,按这个小钟来算。嗯。Yeah. So, that was I think you're introduced in the spec in July. That's something I'm going to talk about later on, like 5 minutes based on this little clock. Um
用例 2:性能调优Use case 2: Performance tuning
好的,第二个用例。对于 DevOps 工程师和支持人员来说,我们的平台非常知名,已经存在很长时间了。相关文档、PDF、GitHub 项目、Stack Overflow 问题以及我的博客文章,都可以在网上找到。大语言模型已经用这些内容进行过训练。Okay. Use case number two. So, for DevOps engineers, support folks, our platform is very well known. It's been around for a long time. The docs, the PDFs, the GitHub projects, the Stack Overflow questions, my blog posts, they're all out there. The LLM's been trained on it.
如果查询速度很慢,他们知道该看哪里。不过,我不信任 LLM 会替我删除索引,甚至创建索引,或在数据库里执行任何操作。我希望它给我建议,然后由我来采取行动。而且说到底,只要不是非得如此,我根本不会让 LLM 或代理接触生产环境。They know what to look at if a query is slow. But, I don't trust an LLM to drop an index, to build an index even, to do anything in the database for me. I want it to give me advice and then I'll action that advice. And then if anything, I'm not going to let the LLM or the agent into production at all if I don't have to.
这听起来很疯狂吗?那么,生产系统运行缓慢时,我该如何借助智能体或 LLM 来寻求帮助?在座各位都有一个与生产环境相同的测试环境,对吧?没有?Oracle 有一项名为 Data Guard 的技术,可以让你拥有一个只读备用实例,将报表和只读查询等工作卸载到这个实例上。Does that sound crazy? So, how do I use an agent or LLM to get help with a production system that's running slow? Everyone here has a test environment that mirrors production, right? No? we have a technology at Oracle called Data Guard that allows you to have a read-only standby instance where you can offload like reports and read-only queries to.
所以,你的性能问题很有可能也会在那边复现。你可以让你的智能体去攻击——不,攻击不是个合适的词。其实有时候还真是。你可以让智能体去审问那个更安全的环境,调查问题并尝试各种性能优化技巧。So, there's a good chance your performance issue would replicate over there. You can have your agent go attack, not attack, that's not the right word. That's the right word actually sometimes. You can have your agent go interrogate that safer environment to investigate and try out different performance tricks.
所以,我想给 LLM 只读访问权限,但这还不够。我还需要限制它们进去之后能做什么,因为即使只能读取数据,它们也可能读到你不想让它们看到的数据。我们可以用几种不同的方式来实现,但对我来说,数据库安全始终应该在哪里实施?在数据库本身。如果你只在工具中构建安全机制,会发生什么?要是有个干劲十足的工程师决定换用另一个工具来连接你的数据库,他们就能直接访问,对吧?So, I am looking to give the LLM's read-only access, but that's not enough. I also need to lock down what they can do once they're in there cuz even if you can only read the data, you might be able to read the data you don't want them to see. we can do that a couple different ways, but for me, the best place to always implement security for the database is where? At the database. If you build security only into your tools, what happens when a zealous engineer decides to go pick up another tool and point it at your database, they just go straight in, right?
但如果你把安全措施放在数据库层,那么大多数情况下就不会有问题。智能体和大语言模型非常擅长发现并修复性能问题。这大概是我最容易演示的内容。我没时间做演示,不过我写了一个自定义工具。But if you put security at the database layer, more times than not you're going to be okay. The agents and LLMs are really, really good at finding and fixing performance issues. This is probably the easiest demo for me to do. I don't have time to do demo, but I've written a custom tool.
这个工具有六种不同的操作,我愿意让它代我执行。其中一种是收集统计信息,基本上就是分析数据的特征。我们有一种叫作基于成本的优化器的东西。因此,当你发起查询时,生成的执行计划并不是根据经验法则制定的。我们会查看数据的特征,比如这一列中有多少个唯一值。This tool has six different actions that I'm a cool with it to do on my behalf, and one of those is to collect statistics that basically profiles the data. We have something called a cost-based optimizer. So, when you ask queries, the plans that get generated, they don't get generated based on rules of thumb. We look at the profile of the data, like how many unique values are in this column.
等等等等。统计信息越新、越准确,它生成良好执行计划的可能性就越大,而且运行时性能表现也会更好。Yada yada yada. The fresher and the better the statistics are, the better chance it's going to generate a good execution plan and have a good performance profile runtime.
所以,我不会生成 15 个只能单次使用的工具。我会生成三四个跨类别的工具,而每个工具都有一些选项。这样,我的智能体就能看到:哦,这是一个性能调优工具,它可以做六件事。其中一项是生成性能分析报告。我们有一个叫 AWR 的功能,我会让它生成一份报告。我还会让它做的另一件事是生成统计信息。So, I'm not generating 15 tools that are single-use tools. I'll generate three or four tools that cross categories, and each of those tools have options. So, my agent can see, oh, here's a performance tuning tool. It can do six things. One of those is like generating a performance profile report. We have a feature called AWR. I'll let it generate a report. One of the other things I'll let it do is is generate statistics.
用例 3:面向智能体的架构文档Use case 3: Schema docs for agents
这与第一个用例——探索和记录 schema——密切相关。天哪,我快没时间了。自然语言转 SQL 确实很棒。AI 和数据库领域的大部分热度都集中在这上面,这也很合理,因为 SQL 是从数据库中获取数据最常用的方式。This ties in closely to the first use case, schema exploration and documentation. Man, I'm running out of time. So, natural language to SQL is really awesome. It's where most of the excitement around AI and databases lie, which makes sense cuz SQL's the most popular way to get stuff out of a database.
我们需要这些数据,但对很多这类系统来说,这简直是一场噩梦。过去 6 个月里有人入职吗?休息室里有没有什么地方,比如墙角贴着一张图表,把所有棘手的东西都解释清楚,列出所有代码词,把所有内部笑话都记录下来,还解释数据模型?嘿,我们的销售数据不在 sales 表里,而是在一个叫 XHR_123 的表里,因为 30 年前有个工程师觉得这样很酷。We need that data, but it's a nightmare for a lot of these systems. Has anyone started a job in the last 6 months? Is there like a place in the break room where they put on the corner like a a diagram where all of the hard stuff is defined, all of the code words are listed, all of the all of the inside jokes are documented, where the data model is explained. Hey, our sales aren't in a sales table, they're in a table called XHR_123 because an engineer 30 years ago thought that would be cool.
是的,这是一个很大的 Confluence 页面。我们现在有一些工具,可以让你读取这些 Confluence 页面,并在数据库中已有的元数据之上生成上下文和文档架构元数据。Yeah, it's a big Confluence page. We have tools now that will let you consume those Confluence pages and generate context and document schema metadata over top of the metadata that's already in your database.
所以,这又是一次上下文工程练习。我们希望能把你正在对话的数据库环境信息提供给 LLM,而不是指望它生成查询来逆向分析、入侵你的数据库以寻找数据。你让它找数据,它确实能找到,只是会花很长时间,而且会反复寻找;除非你们有跨所有人的智能体和 LLM 共享的团队企业级记忆,否则这纯粹就是巨大的浪费。所以,我们就像是……不知为何,让新员工加入组织时吃苦受罪,似乎并不是什么大问题。So, it's another context engineering exercise. We want to be able to deliver to the LLM the information about the database environment you're talking to instead of relying on it to generate queries to reverse engineer hack your database to look for data. It will find the data if you ask it, it'll just take a long time, and it'll look for it multiple times, and unless you have shared team enterprise memory across everyone's agents and LLMs, it's just a it's just just a huge waste. So, what we're like with for some reason it wasn't a big problem to let new employees suffer when they joined an org.
就好像30年前这个问题还不够严重,不值得去解决似的;但现在有了 AI,我们不能让可怜的机器人受苦。所以,我们得把它们需要的信息提供给它们,让它们更容易使用我们的数据库。Like it wasn't it wasn't a big enough problem to fix this issue 30 years ago, but now that AI is a thing, we can't let the poor bots suffer. So, we got to get them the information they need to make it easier to use our databases.
这个功能的好处是,所有内容都是通俗易懂的英语,而且都存储在数据库里,也能帮助人类。所以,当你去查看我们的工具时,会发现有个叫“架构信息”的东西。我会说:“嘿,Codex、Claude,或者其他什么工具,我有了一个新环境。你们去看看里面是怎么布局的,找到这个,然后我们来总结一下这些信息。”The nice thing about this feature is it's all in plain English, it's in the database, it it's going to help the humans, too. So, when you go look at our tools, we have something called schema information. So, I'll say, "Hey, Codex, Claude, whatever, I've got a new environment. I need you to go look into it and see how laid out, find this, and let's go summarize the information.
安全性:是谁在询问?Security: who's asking?
它会发现自己有一个架构信息工具,然后就会开始使用它。这个工具返回的是一组压缩后的属性字典,以 JSON 格式呈现,而不是让它去运行查询。比如:“给我看看所有表、所有列和所有注释。我们从每张表里读五行,看看数据是不是我们想的那样。”你知道,我们就是把这些功能集成到了工具里,并对它进行了优化;它总是返回相同的数据,而且有多种模式。你可以选择详细、精简或中等模式,就像我裤子的尺码一样,而且它还支持筛选。你可以给它关键词,它就会在数据中查找特定内容。It'll see that it has a schema info tool, and it'll start using that, and that returns back a compressed dictionary a set of attributes in JSON versus it running queries. Hey, show me all the tables, show me all the columns, show me all of the comments. Let's go read five rows out of each table to see if the data has what we looks like. You know, we just kind of built that into the tool, optimized it, and it always returns the same data, and it has multiple modes. You can go verbose, slim, medium, just like my pants, and it's got filtering. So, you can give it keywords, and it just looks for specific things in the data.
然后,我可以用另一个名为 retrieve context 的工具把这些内容提取出来,利用这些信息进行 AI 向量搜索;不过我还有一个新工具,叫 generate annotations。我可以让它连接到你们的 SharePoint 站点,扫描其中的 PDF、PowerPoint、Excel 和 Word 文档,提取文本、整理内容,再存回数据库。有了自然语言转 SQL 练习,这样一次性生成 SQL 查询也会更容易。这就是我对表进行适当注释后,数据库中的数据样子。And then I can pull that back out with another tool called retrieve context, where I can use that information to do AI vector search, but I have another new tool called generate annotations. So, I can point it to that SharePoint site that you have, scan in your PDFs, your PowerPoints, your Excel, your Word docs, and store those in or pull the text out, organize it, and and put it back into the database. This is also it's easier to one-shot SQL queries when you have natural language to SQL exercises. This is what the data looks like in the database after I've properly annotated a table.
所以,每次我去跑步、骑车之类的,数据都会同步到我的 Strava 账户。我是个技术宅,所以我有这些数据的 API 接口,还把数据存进了自己的数据库。他们的架构文档写得还算清楚,但度量单位和时间表示方式经常来回切换,而且有些列里的内容跟你以为的并不一样。So, anytime I do a run or a bike ride or whatever, it goes into my Strava account. I'm a nerd, so I have an API on that data, and I store it in my database. And their schema is fairly well described, but it jumps between like units of measure and time, and some of the columns don't have what you think they do.
所以,我已经把所有内容都标注好了。这样一来,当我开始问“嘿,我下周应该做什么样的锻炼?”这类问题时,它就能查看我的个人锻炼记录,有了这些信息,处理起来会容易得多。MCP 的一个好处是,它不依赖特定的 AI 或 LLM。只要 MCP 服务器和工具都在,就能适用于各种情况。好了,接下来我要讲的可能是最重要的一点:安全性。So, I just have that all annotated, and so when I start asking questions about, "Hey, what kind of workout should I do next week?" and it looks at my personal workout history, it it gets to that much easier with this info. And the nice thing about this with MCP is AI and LLM agnostic. It's going to work for everything as long as the MCP server and the tools are there. Okay, so this might be the most important thing I talk about, security.
所以,我只有40秒了。我们就以这个收尾。返回任何数据之前,我们需要知道是谁在查看数据库中的信息。我获准查看的信息,会和我的同事Tara能够查看的数据大不相同。而且,当我使用Claude、Codex、Gemini或自己搭建的LangChain框架访问数据库时,我们不会使用数据库身份验证来让代理连接进去执行操作。So, I got 40 seconds. We'll just end on this. we need to know who is looking at the information in the database before we return any data back to them. The information I'm allowed to see is going to be much different than what the data my colleague Tara is going to be able to see. And when I'm in the database using Claude or Codex or Gemini or my own homegrown LangChain framework, we don't use database authentication to let the agent go in and do stuff.
我们会通过你所在组织的单点登录来验证你的身份。比如 Azure AD 会返回一组作用域,以及一组描述你在组织中角色的角色信息。数据库可以据此设置规则,例如:“哦,Jeff 是人力资源经理,他可以查看所有人的薪资。”但组织外的其他人都不行。因此,当自然语言问题被转换成 SQL,并在数据库中执行时,数据库会在结果集返回给代理之前,动态地从中剔除数据。我们称之为深度数据安全。时间不多了,我已经讲完了重点内容。We pipe you through your organization single sign-on. So, like Azure AD, which is going to return a list of scopes, which is going to return a list of roles that describe your role in the organization, and the database can be coded to say, "Oh, Jeff is an HR manager. He's allowed to see everyone's salary." But no one else outside that org can. So, when we the natural language questions get generated to SQL, when that SQL runs against the database, the database dynamically strips data from the result set before it comes back down to the agent. We call that deep data security. I'm out of time. I covered the big stuff.
即将推出What's coming
我们在 Oracle 非常重视安全。我们希望这些东西易于使用,同时也安全可靠。我们正在开发 MCP 应用,这样你就能直接在智能体中使用数据库界面 GUI。这项功能预计将在今年晚些时候推出。We thought a lot about security at Oracle. We want this stuff to be easy, but we want it to be safe. We are building MCP apps, so you can have the database interface GUI directly in your agent. That's coming later this year.
我们拥有技能。这些技能可以通过工具提供。我们支持自动化 RAG 流水线。你可以用命令行导入文档,然后通过 MCP 工具把向量和文档片段传回你的智能体。如果你想进一步了解这些内容,最简单的方式就是访问 oracle.com/mcp。我要去赶飞机,飞回北卡罗来纳州的罗利了。如果你在 LinkedIn 上找到我,我就是 Jeff Smith。我的同事们还在 Oracle 展位上,他们那里有更多周边礼品。如果你没拿到毛绒玩具,我们还有更多。谢谢大家。We have skills. The skills can be delivered via tools. We support automated rag pipelines. You can use a command line to suck documents in and then an MCP tool pipe the vectors and the snippets of the documents back to your agents. And when you want to learn more about any of this stuff, we have the easiest URL oracle.com/mcp. I'm leaving to get on a plane to fly back to Raleigh, North Carolina, but if you find me on LinkedIn, I'm that Jeff Smith and my colleagues are down at the Oracle booth and they have more swags. If you missed out on the plushy, we have more. Thanks, everyone.