猪肚炖什么| 哆啦a梦大结局是什么| 谷丙转氨酶是检查什么的| 安宫丸什么时候吃| 一米阳光是什么意思| 垫脚石是什么意思| 恩五行属什么| lee是什么档次| 博字五行属什么| 乙肝病毒表面抗原阳性是什么意思| 糟老头是什么意思| 不带壳的蜗牛叫什么| 什么是条件反射| 10月是什么季节| 过期的维生素e有什么用途| 金刚是什么树的种子| 开网店卖什么好| 心率快吃什么药效果更佳| 排骨和什么菜搭配最好| 女生被操什么感觉| 水落石出是什么生肖| od值是什么| 钢铁锅含眼泪喊修瓢锅这是什么歌| 吃完饭就拉肚子是什么原因| 手淫过度会导致什么| 消化不良吃什么药最好| 机票什么时候买便宜| 早上5点多是什么时辰| c蛋白反应高是什么原因| 心肌缺血吃什么中成药| 肠炎用什么药好| 烟酒不沾的人什么性格| 虎毒不食子是什么意思| 众矢之地是什么意思| 筒骨炖什么好吃| 家有蝙蝠是什么兆头| 三点水一个半读什么| 长绒棉是什么面料| 母亲节送给妈妈什么礼物| 治骨质疏松打什么针| 岌岌可危是什么意思| 性生活有什么好处| 流浓黄鼻涕是什么原因| 吃苦瓜对身体有什么好处| 乳腺腺病是什么意思| 脚底疼是什么原因| 单纯性肥胖是什么意思| 蜻蜓点水是什么生肖| 什么叫丁克| 杜甫是什么主义诗人| 厌氧菌感染用什么药| 打擦边球是什么意思| 老是犯困想睡觉是什么原因| 不齿是什么意思| 玉米须加什么治痛风| 青春痘长什么样| 掉头发是什么原因男性| 芈月和秦始皇什么关系| 印尼用什么货币| 洋葱有什么功效| 梦到牙齿掉了是什么意思| 六十岁是什么之年| mirage轮胎什么牌子| 乳腺结节应该挂什么科| 运是什么意思| 金樱子配什么才壮阳| 苍蝇喜欢什么味道| 啤酒酵母是什么| 买盘和卖盘是什么意思| 孔雀开屏是什么行为| 邓字五行属什么| 手背发黄是什么原因| 男人手大代表什么| 脸红什么| 保安的职责是什么| johnny什么意思| 牙齿出血是什么病表现出来的症状| 白细胞偏高是什么原因| 股癣用什么药膏效果最好| 做胃镜有什么好处| 化作风化作雨是什么歌| 莲藕什么时候种植最佳| rx是什么意思| 免费查五行缺什么| 着床成功后有什么症状或感觉| 勾践属什么生肖| 尿常规白细胞高是什么原因| 黑天天的学名叫什么| 梦见生孩子是什么意思解梦| 月经后是什么期| 扑热息痛又叫什么名| 西洋参有什么功效| 长期吃避孕药有什么副作用| 省军区司令员是什么级别| 号什么意思| 打一个喷嚏代表什么| 胃溃疡a1期是什么意思| 梦见看房子是什么预兆| 牛字旁与什么有关| 笔记本电脑什么品牌好| 下贱是什么意思| 女人排卵期有什么反应| 尿酸高什么引起的| a型血和b型血生的孩子是什么血型| 三尖瓣反流什么意思| 大白片是什么药| 荷花五行属什么| 头痛眼睛痛什么原因引起的| 瘰疬是什么病| 抗核抗体弱阳性说明什么| 什么是文爱| 吃什么食物能长高| 堂食是什么意思| 克星是什么意思| 检察长什么级别| 银装素裹什么意思| 肺活量不足是什么症状| 海肠是什么东西| 海绵宝宝是什么生物| 为什么射出的精子里有淡红色| 中意你是什么意思| 安可是什么意思| 百香果什么时候成熟| 愚蠢是什么意思| 大祭司是什么意思| 胃酸胃胀反酸水吃什么药| 昱字五行属什么| 东南角风水代表什么| 乳腺点状强回声是什么意思| 为什么会面瘫| 骨裂吃什么药| 他乡遇故知什么意思| 医院查过敏源挂什么科| 白蛋白下降是什么原因| 股票套牢是什么意思| ea是什么单位| 奶油色是什么颜色| 血糖偏高吃什么水果好| 中性粒细胞高说明什么| 老花眼是什么原因引起的| 为什么有胎记| 妈妈的爸爸叫什么| 可见原始心管搏动是什么意思| 沙发适合什么发型| 85年什么命| 老放屁是什么情况| 摸摸唱是什么| 立是什么结构的字| 美国的国球是什么| 随喜是什么意思| 落花生为什么叫落花生| 什么叫消融术治疗| 胃炎是什么症状| cfmoto是什么牌子| 莫代尔是什么| 病原体是什么| 儿童鼻炎挂什么科| 乙肝通过什么传播| 吃什么药能让月经推迟| 什么水果是碱性的| 梦是什么| 什么星星| 十余载是什么意思| 女性黄体期是什么时候| 530是什么意思| 灿字五行属什么| 鸟儿为什么会飞| 老年人心慌是什么原因| 北京西单附近有什么好玩的| 曹操叫什么| 鳞状上皮乳头状瘤是什么| 鸡为什么吃自己下的蛋| 缺少雌激素的女性会有什么症状| 什么门比较好| 心肌酶是检查什么的| 什么水果对眼睛好| 辛是什么意思| tpo是什么| 鼻炎吃什么| 得艾滋病的人有什么症状| 和衣是什么意思| 酒酿蛋什么时候吃效果最好| 湿疹抹什么药| 什么越来越什么什么越来越什么| 怡的意思和含义是什么| 梦见洗手是什么意思| 什么是避孕套| 宫缩是什么意思| 什么是精神| 孕妇吃什么水果好对胎儿好| 私生子是什么意思| 菠萝蜜和什么不能一起吃| 嘴唇干裂是什么原因引起的| 左卵巢内囊性结构什么意思| 外阴白斑用什么药| 仗剑走天涯什么意思| 宝路华手表什么档次| 五液是指什么| 治霉菌性阴炎用什么药好得快| 小孩睡觉磨牙是什么原因| 下鼻甲肥大是什么意思| 河南属于什么平原| 黄芪喝多了有什么副作用| 肺气阴两虚吃什么中成药| 雨水是什么季节| 高血压吃什么盐比较好| 地中海贫血什么意思| 上嘴唇发黑是什么原因| 为什么手上会起小水泡| 什么是对偶句| 什么水适合婴儿冲奶粉| 幽门螺杆菌吃什么药最好| 手臂上长痣代表什么| 嫦娥奔月是什么节日| 腰痛吃什么好| 女人小肚子疼是什么原因| robinhood是什么牌子| 改善记忆力吃什么药好| hvp阳性是什么病| 胆固醇高吃什么可以降下来| 风云际会的意思是什么| 眼睛充血用什么眼药水好| 缺铁性贫血吃什么药好| 苏打水配什么好喝| 胃湿热吃什么药| 银行卡为什么会被冻结| 哺乳期感冒了能吃什么药| 高温丝假发是什么材质| 胎盘做成胶囊吃有什么好处| 金屋藏娇定富贵是什么生肖| 胆汁是由什么分泌的| 缺钾是什么症状| 阑尾在人体的什么位置| 眼泪多是什么原因| 孀居是什么意思| 咽炎吃什么药效果最好| 尿激酶的作用及功效是什么| 尿道疼吃什么药| 敬邀是什么意思| petct是什么| 人乳头瘤病毒56型阳性是什么意思| 痛风挂什么科| 灏字五行属什么| 毅五行属什么| 随餐服用是什么意思| 乳酸菌可以制作什么| 一垒二垒三垒全垒打是什么意思| 兰花什么时候开花| 味粉是什么调料| 美国是什么洲| 壁虎长什么样| 速度是70迈心情是自由自在什么歌| 308是什么意思| 乌龟吃什么蔬菜| 血糖高能吃什么蔬菜| 反式脂肪是什么意思| 梦见面包是什么意思| 9月19日是什么星座| 挖空细胞是什么意思啊| 什么的舞动| 梦见给别人剪头发是什么意思| 一什么所什么| 上午九点到十一点是什么时辰| 经期为什么不能拔牙| 百度
Skip to Content
0%

防治污染 共迎挑战(美丽中国·和谐共生)

A group of developers discussing a problem
Our technologists used to spend dozens of hours a week working on custom queries for our users. Now users can self-serve answers from our text-to-SQL Slack agent in minutes. [Image credit: peopleimages.com / Adobe Stock]

Advancements in large language models have made AI data analysis and SQL generation easier for non-technical people. Here's how.

If you’ve worked with data products in the world before AI data analysis, you know the drill: a project manager or analyst has an important question, but getting the answer means using Structured Query Language (SQL), a language for querying databases. Without innovative tools like a text-to-SQL Slack agent, engineers and data scientists become gatekeepers to the data, since many teams don’t have the technical knowledge to work with SQL.

This creates a data access gap. Non-technical people have questions, but not answers, and decisions slow down due to a backlog of support requests. (Even worse, people start making decisions using old data or best guesses.) Engineers and data scientists spend their time writing queries and fetching data instead of building high-value features.

This gap prevented us from scaling.

Business Intelligence dashboards in products like Tableau can narrow this gap, but these dashboards take engineering time to build and they rarely cover every question a user might have.

Our team asked: What if our users could ask natural-language questions and get insights from the data immediately, without waiting for technologists?

That vision of democratized access to instant answers – combined with advancements in AI tools like large language models – led to a new relationship between our users and the data.

Say hello to Data Cloud

Data Cloud, the hyperscale data platform built into Salesforce, unlocks and harmonizes data from any system — so you can better understand your customers and grow your business.

Closing the gap with AI data analysis

To close this gap, we needed to rethink how our users got insight from our data. SQL is incredible as a structured syntax for accessing data, but it’s not how most people think or express themselves. It’s literally like learning another language. Not everyone in our company should have to learn it to get their jobs done.

But advancements in Large Language Models have made it possible for machines to understand natural language questions and generate SQL with surprising accuracy. Users can simply ask, “How much did my service cost last month?” and an AI agent can look at the database tables and generate a SQL query that provides the answer.

This approach democratizes data: Non-technical users can ask their questions in plain English and get real-time insights without hopping over to a business intelligence tool and drilling through filters or waiting in a support channel for an engineer.

And here at Salesforce, our users live in Slack. They want to be able to ask questions about data without switching tools. In addition to supporting collaboration through threaded conversations and offering a searchable history for easy access to past insights, Slack also provides the interactive elements (buttons, list menus, etc) needed for a fully-featured application. As a result, choosing Slack as the medium for this natural-language experience was an easy decision. 

With the concept of AI data analysis clear, we set out to build our solution: an internal text-to-SQL Slack agent, which we call Horizon Agent. The goal? To make it easy for people to use Slack to ask data questions in everyday language and instantly get back the SQL, the answer, and the context they need to make confident decisions – right in the flow of their work.

Horizon Agent isn’t something we sell – it’s an internal tool we built to help our own teams move faster. If you’re looking for ways to close the data access gap in your organization, Salesforce offers external solutions like Agentforce and Data Cloud, which help teams turn natural language into action and unlock insights from data at scale.

Lessons from building a text-to-SQL Slack agent

Here’s a look at how we built Horizon Agent using Slack and a mix of internal Salesforce tech. We’ll also share what we learned along the way.

Tech stack and architecture

UX

We built the Slack app using Bolt, Slack’s Python framework for app development. This framework handles Slack API interactions and lets you focus on the real business value. When a user messages our Horizon Agent app in Slack, Slack makes a call to our Python microservice in AWS and Bolt lets us handle the call easily.

Business context

We loaded all our business context and SME knowledge into Fack, an open-source tool created by Salesforce. This gave us an encyclopedia of Salesforce terms, concepts, ideas, and business jargon, as well as instructions about how to construct valid SQL queries using the Trino dialect.

Dataset information

The Horizon Data Platform is our internal data platform product, similar to industry equivalents like Data Build Tool (dbt). Using HDP, we document the business use of a database table and sample SQL queries that demonstrate access patterns for the data. HDP enriches this metadata with sample records from the table so that a Large Language Model (LLM) can see examples of real data.

Einstein

The Einstein Gateway is Salesforce’s internal platform for accessing LLMs. When our microservice receives a user’s question, it uses Retrieval-Augmented Generation (RAG) to enrich the user’s question with business context from Fack and dataset information from Horizon Data Platform. All that knowledge is bundled together and passed to a LLM through the Einstein Gateway, and we get our response back.

Boost your productivity and ROI with LLMs

Large language models (LLMs) underpin the growth of generative AI. See how they work, how they’re being used, and why they matter for your business.

To put it all together, here’s an example interaction with Horizon Agent:

  1. The user asks a question in Slack. (e.g. “Hey @Horizon, what was the cost of my service in September?”)
  2. Our Bolt-based Python microservice receives the message and uses an LLM through Einstein to identify the message as a cost-related question.
  3. The app retrieves business context and dataset information from Fack and Horizon Data Platform to supplement the user’s question with everything an LLM needs to answer the question.
  4. The app uses the Einstein Gateway to submit the enriched user question to an LLM, which processes the question and returns a SQL query, as well as an explanation of the query that increases our users’ trust in the answer.
  5. The user receives the answer in Slack within a few seconds. The user can ask follow-up questions, like “Can you break the cost out by AWS service?” and Horizon Agent will continue the conversation with all of the context of previous messages.
  6. The user can also run the query, in which case our app executes the SQL query using Trino, retrieves the data from our Iceberg data lake, and posts that data back to Slack with an analysis of the major features of the data – summary, patterns, trends, anomalies, etc.

What we learned

Horizon Agent entered Early Access in August of 2024, and achieved a GA release in January of 2025. We’ve been iterating on it ever since. Here are some key things we learned.

AI = faster decisions and happier users

The time savings and agility of using AI data analysis is a clear win. Our technologists used to spend dozens of hours per week working on custom queries for our users, and our users spent the same amount of time waiting. Now our users can self-serve answers from our text-to-SQL Slack agent in minutes, and our technologists are freed up to build the high-value features of tomorrow.

Meet your customers where they live

An early prototype of Horizon Agent was a local-only experience using Streamlit. It was a great start, but since it wasn’t accessible where our users spend their time (Slack), it didn’t get adopted. When we shipped an MVP to Slack, people started using it – even though the responses weren’t perfect. Once users started trying it out, that led to feedback, and feedback leads to targeted investments. It was a virtuous cycle.

Transparency leads to trust

Initially, Horizon Agent didn’t explain what it was doing. We thought it would confuse users, since they didn’t know SQL. Often, it would just say “I don’t know how to answer that.” Conversation over. Later, we loosened up our guardrails and made the Agent more transparent. Instead of saying “no”, it asked clarifying questions. We also had it explain the SQL it generated. This transparency made the answers more trustworthy and less like a black box. It also helped our users learn a bit about SQL as they went, and get better at asking questions.

Solve for agility

Horizon Agent didn’t have perfect results from day one. At launch we only had the correct response ~50% of the time. Ambiguity in language is a major challenge – machines can be taught to think in human terms, but humans change. New terms and acronyms arise, and we needed Horizon Agent to keep pace with reality. We streamlined our process for updating the Agent’s knowledge base, so that if the Agent is confused by a user’s question we can have its knowledge base updated in ~15 minutes with automated regression testing to make sure our change isn’t making things worse. Our users appreciated  the continuous improvement.

Consistent accuracy is key

Another challenge was delivering consistently correct results. By nature, LLMs are non-deterministic – even with a perfect knowledge base, if you ask a question 10 times, you might get 8 correct answers and 2 wrong ones. We switched from giving the LLM one chance to generate a SQL query to 10 chances, and we use a sequence of algorithms (Cosine Similarity Modeling and Levenshtein Distance) to eliminate outliers and select the response that best represents the majority consensus. We also pre-check all SQL queries by running a simple EXPLAIN query, and feed errors back to the Agent so it can take another crack at generating a correct query.

Accelerate your team today with Agentforce in Slack

Agents become teammates with Agentforce in Slack. Powered by relevant conversations in Slack and your trusted enterprise data, Agentforce will suggest and take action right in the flow of work.

Shaping the future of data-driven work

Horizon Agent points to a future of AI data analysis that is conversational, not siloed in a BI tool or gated by having a deep knowledge of SQL. Getting insight can be as easy as pinging a text-to-SQL Slack agent. With AI, humans will be able to integrate data-driven questions into their moment-to-moment work – making decisions, brainstorming, etc.

Achieving this future is partly about technology (we couldn’t have built Horizon Agent a few years ago), but also the table-stakes of building good products: trust and expertise.

You may be very bullish about the AI-assisted future; users might be skeptical. That’s a healthy push-pull relationship. Getting everyone on the same page requires effort. We had to collect feedback, observe our users’ interaction with Horizon Agent, and prioritize quick iterations when we saw bad behaviors and mistakes. There’s still much to improve here, but by being open about the issues and demonstrating an urgency to improve, we got our users to come on that journey with us.

And even if Horizon Agent could perfectly answer every question a user has, there’s still going to be a need for engineers and data scientists, just in a different way. Instead of being the gatekeepers to data and trying to handle the ever-growing line of users waiting to get through the doors, engineers and data scientists become guides to a next generation of AI-powered tooling that needs their human expertise to assemble high-quality datasets and define the right guardrails.

Conclusion: From gatekeepers to guides

Horizon Agent was a huge shift for how we think about data access.

We started off with a bottlenecked system where engineers and data scientists were the gatekeepers, even if they didn’t want to be. Now, with conversational AI handling routine questions, those same technologists are freed up to be guides and enable a democratized access to insights from data. At the same time, non-technical users get to enjoy instant, conversational access to data.

Ultimately, Horizon Agent allowed us to turn a data access gap into an opportunity to move toward a new way of working. It demonstrated how AI is ready for prime time and integration into daily work. The next time someone needs an answer to a question, they can get what they need instantly, and we can accelerate the rate of our decision making to stay competitive in a difficult environment.

No “How to Learn SQL” courses, no waiting, no open support tickets. Just trusted answers, immediately, using AI data analysis.

Get the latest articles in your inbox.

trp是什么氨基酸 刘备和刘邦是什么关系 环磷酰胺是什么药 胳膊上的肌肉叫什么 生育登记服务单是什么
失独是什么意思 梦见狗死了是什么预兆 湾仔码头水饺为什么贵 俞是什么意思 胃湿热吃什么药
散光和近视有什么区别 脑白质稀疏什么意思 双鱼女和什么座最配对 德国什么东西值得买 什么空调最好
爱出者爱返福往者福来是什么意思 输卵管堵塞是什么原因 昀是什么意思 解脲支原体阳性是什么意思 睡眠不好总做梦是什么原因
西酞普兰为什么早晨吃jingluanji.com 这是什么树hcv8jop3ns5r.cn 磨牙是什么原因引起的如何治疗96micro.com 人参和什么泡酒壮阳hcv8jop0ns7r.cn 月子里能吃什么水果hcv8jop4ns7r.cn
月经推迟吃什么药hcv8jop7ns3r.cn 外阴溃烂用什么药hcv8jop4ns1r.cn 银鱼是什么鱼hcv7jop9ns3r.cn 七月份适合种什么菜hcv8jop1ns0r.cn 椎管狭窄吃什么药hcv7jop6ns9r.cn
胆管炎是什么原因引起的hcv7jop6ns7r.cn 初次见面说什么hcv8jop0ns3r.cn 世界上最大的岛是什么岛hcv8jop8ns9r.cn 符号叫什么hcv8jop7ns3r.cn 激光点痣后需要注意什么hcv9jop3ns0r.cn
alt是什么意思creativexi.com 大力念什么hcv7jop9ns3r.cn 小腿肚酸胀是什么原因cj623037.com 芸豆长什么样子hcv8jop4ns7r.cn 绞股蓝长什么样子hcv8jop4ns8r.cn
百度