Glean 拾遗
Daily /2026-08-12 / What Can You Use LLMs For? Four Use Cases and a Rule of Thumb

What Can You Use LLMs For? Four Use Cases and a Rule of Thumb

Source www.aihero.dev Glean’d 2026-08-12 06:01 Read 8 min
AI summary

This article is a practical guide to where LLMs actually shine. It walks through four common use cases: converting unstructured data into structured tables, labeling and classification, question answering, and agents that take actions in the world. It also warns against shipping naive chatbots, pointing out that guardrails are never perfect and citing the infamous Gemini incident where the model told a user to 'please die'. The core argument is a simple rule of thumb: if a system can be built deterministically, it should be. LLMs are only worth the complexity for tasks that are either too expensive for humans to do at scale or too ill-defined for deterministic code to handle. Examples include 19th-century hawk migration logs, The Prompt Report's suicide-risk classification case, and the DeepResearch pattern.

Original · 8 min
www.aihero.dev ↗
§ 1

Before we dive into the world of LLMs, and how they work, we first need to know where we're going.

What are LLMs actually used for these days? What utility do they have? What can you build with them?

In this article, we'll explore the different applications of LLMs. We'll also look at things you shouldn't build with LLMs - things that are better suited to more deterministic tools.

在深入 LLM 的世界、了解它们的工作原理之前,我们首先需要知道我们要去哪里。

LLM 如今究竟被用来做什么?它们有什么实际用途?你能用它们构建什么?

在本文中,我们将探讨 LLM 的不同应用场景。我们也会看看那些不应该用 LLM 构建的东西——更适合用确定性工具解决的问题。

§ 2

Unstructured Data -> Structured Data

Most companies have access to a lot of unstructured data. These could be transcripts from support calls, customer emails, invoices, or even just notes from meetings.

This data is hard to work with. It's hard to search, hard to analyze, and hard to read.

For example, a friend of mine has started a PhD looking at historical hawk migration patterns. Data for how these hawks moved is recorded in ancient, unstructured logs from the 19th century. Despite being carefully archived and digitized, reading through these logs is an absurdly time-consuming task.

The solution? To use LLMs to convert these logs into tabular data. LLMs can read the logs, understand the patterns, and convert them into a structured format. This structured format can then be used for analysis, visualization, and further research.

This is perhaps the most common, powerful use case for LLMs. The world has collected vast amounts of data in the past few decades. LLMs are now making that data trawlable and accessible.

This is a common theme—LLMs are often used for data tasks that it would be impractical (or expensive) to hire humans for. This opens up new possibilities for working with previously inaccessible data.

非结构化数据 → 结构化数据

大多数公司都有大量非结构化数据,例如支持电话的录音转写、客户邮件、发票,甚至会议记录。

这些数据很难处理,难以搜索、难以分析,也难以阅读。

举个例子,我的一位朋友正在攻读博士学位,研究历史上鹰的迁徙模式。这些鹰的移动数据记录在 19 世纪古老的非结构化日志中。尽管这些日志已被仔细归档和数字化,但要通读一遍仍然是一项极其耗时的工作。

解决办法是什么?用 LLM 把这些日志转换为表格数据。LLM 可以阅读日志、理解其中的模式,并将其转换为结构化格式。这种结构化格式随后可用于分析、可视化以及进一步研究。

这或许是 LLM 最普遍也最强大的用例。过去几十年里,世界积累了海量数据,而 LLM 正在让这些数据变得可检索、可利用。

这是一个常见的主题——LLM 经常被用来处理那些雇人来做不现实(或成本过高)的数据任务。这为处理以前无法访问的数据开辟了新的可能。

§ 3

Labeling & Classification

Another common task for LLMs is classification. They can be fed an input and asked to attach labels to it, which helps in organizing and understanding the data more effectively.

One striking example comes from The Prompt Report. In their case study, they attempt to detect "signal that is predictive of crisis-level suicide risk in text written by a potentially suicidal individual". They used data from the subreddit r/SuicideWatch, and the LLM had to match up with an expert's analysis.

The LLM, when provided with the text, would have to classify whether or not it contained elements of either "frantic hopelessness" or "entrapment". It would reply with "positive" (i.e., that the text contained risk signals) or "negative".

Classification systems have been around in machine learning for a long time. They usually require significant amounts of data to train. LLMs make this process easier by only requiring a simple prompt to change their behavior to a classifier. Very useful.

Recent developments in LLMs also mean it's easier to retrieve structured data from them. Check out a classification example from the Vercel AI SDK tutorial.

标注与分类

LLM 的另一个常见任务是分类。你可以给 LLM 一个输入,让它附上标签,这有助于更有效地组织和理解数据。

一个引人注目的例子来自《The Prompt Report》。在他们的案例研究中,他们试图检测“可能自杀者文本中预示危机级自杀风险的那些信号”。他们使用了 r/SuicideWatch 子版块的数据,并且要求 LLM 的分析与专家判断保持一致。

LLM 在拿到文本后,需要判断其中是否包含“狂乱绝望”或“被困感”这两类元素,并回答“positive”(即文本含有风险信号)或“negative”。

分类系统在机器学习中早已存在,通常需要大量数据来训练。LLM 让这一过程变得更容易——只需一个简单提示,就能把模型变成分类器。非常有用。

LLM 的最新进展也让从中提取结构化数据变得更简单。可以看看 Vercel AI SDK 教程里的一个分类示例。

§ 4

Question Answering

Another common use case for LLMs is as a question answerer. You can feed an LLM a question, and it will give you a response based on its training data.

However, LLMs have several downsides when used as a knowledge base. Their training data has a cut-off point, so it doesn't have access to up-to-date information. They often can't cite sources for their answers, which makes it hard to verify their accuracy.

Therefore, connecting LLMs to external data sources is a common pattern.

This external data source could be a database, a search engine, or any API. LLMs can call external services (using tools) to get the most up-to-date information.

This is not foolproof—careful work is needed to make sure the LLM does not hallucinate or provide incorrect information. But question answerers, in the form of chatbots or search engines, are a common use case for LLMs.

DeepResearch, a now-common offering from Perplexity, Google, OpenAI, and others, is a good example of this. It's a pattern where an entire academic-style report is generated from a simple query.

问答

LLM 另一个常见用途是作为问答机器人。你可以向 LLM 提问,它会根据训练数据给出回答。

然而,把 LLM 当作知识库使用有几个缺点。训练数据有知识截止日期,因此它无法获取最新信息;而且它往往无法为答案注明来源,导致准确性很难核实。

因此,把 LLM 接入外部数据源是一种常见做法。

这个外部数据源可以是数据库、搜索引擎,或任何 API。LLM 可以调用外部服务(通过工具)来获取最新信息。

这并非万无一失——需要仔细设计,确保 LLM 不产生幻觉或提供错误信息。但以聊天机器人或搜索引擎形式出现的问答系统,确实是 LLM 的常见用例。

DeepResearch 是 Perplexity、Google、OpenAI 等提供的现已常见的服务,就是一个很好的例子。它的模式是从一个简单查询生成整份学术风格报告。

§ 5

Agents

The fact that LLMs can access external tools has a lot of folks very excited. It means that LLMs can be used to do things in the world, not just generate text.

This pattern is often called an "agent"—a system that can take actions in the world, respond to user inputs, and interact with other systems.

One can imagine a coding agent acting like a team member—contactable via Slack, able to write code, deploy it to production, and communicate with the user.

This is similar to the promise of agents like Devin.

However, agents have not yet had their breakout moment—certainly not in the way chatbots have. Agents are yet to find their final form in terms of user experience.

Agent

LLM 可以访问外部工具,这让很多人非常兴奋。这意味着 LLM 不仅生成文本,还能在真实世界中采取行动。

这种模式通常被称为“agent”——一个可以在世界中行动、回应用户输入并与其他系统交互的系统。

可以想象一个编码 agent 像团队成员一样工作:可以通过 Slack 联系,能写代码、部署到生产环境,并与用户沟通。

这与 Devin 等 agent 的承诺类似。

然而,agent 还没有迎来它们的突破时刻——至少不像聊天机器人那样。agent 在用户体验层面尚未找到最终形态。

§ 6

Naive Chatbots

It can feel very tempting to build chatbots with LLMs. It's very simple to set up. You feed the LLM a prompt, give it access to a conversation history, and you're good to go.

"Chat with our docs." "Chat with our support bot." "Chat with your search results." Naive chatbots are thin wrappers around LLMs, hastily thrown together to make a product seem more interactive.

简单聊天机器人

用 LLM 构建聊天机器人非常诱人,因为搭建起来很简单。你给 LLM 一个提示词,让它能访问对话历史,就可以开始了。

“和我们的文档聊天。”“和我们的支持机器人聊天。”“和你的搜索结果聊天。”这些简单聊天机器人只是 LLM 的薄封装,为了显得产品更有互动性而仓促拼凑出来。

§ 7

However, productionizing chatbots is an extremely difficult problem. If you're not careful, they will frustrate your users and damage your brand. It is notoriously difficult to make a chatbot only respond to relevant queries without veering off-topic.

The big model providers (OpenAI, Anthropic, Google, etc.) come with built-in guardrails to prevent their models from saying anything brand-damaging. But the surface area is so large—any potential conversation you can think of—that these guardrails will likely never be perfect. A famous example is Google's Gemini asking the user to die.

然而,把聊天机器人投入生产是一个极其困难的问题。如果不小心,它们会让用户感到沮丧,损害你的品牌。让聊天机器人只回应相关问题而不跑题,是出了名的难。

OpenAI、Anthropic、Google 等大型模型提供商都内置了防护栏,防止模型说出有损品牌形象的话。但交互面实在太大了——你能想象到的任何对话——这些防护栏很可能永远无法做到完美。一个著名的例子是 Google 的 Gemini 让用户去死。

§ 8

Gemini saying "please die, please."

Gemini saying "please die, please."

§ 9

It only takes one determined user to jailbreak your chatbot and make it say something inappropriate. Don't ship chatbots without proper safeguards.

只需要一个执着的用户,就能越狱你的聊天机器人,让它说出不当言论。没有适当的防护措施,就不要发布聊天机器人。

§ 10

Deterministic Systems

A good rule of thumb for AI systems is "if it can be built deterministically, it should be."

LLMs are probabilistic systems. They are designed to choose the next word in a piece of text, over and over again, from a choice of many possible options. Depending on how the next word is selected (their "sampling strategy"), they can produce different outputs from the same input.

However, this design also makes them prone to several failure modes:

Hallucinations: generating text that is not grounded in reality

Sycophancy: overly conforming to the user's point of view, instead of providing a balanced response

These failure modes can be worked around, but they require careful design and testing. This means that if you can build a system deterministically, you should.

确定性系统

对于 AI 系统,一个很好的经验法则是:“如果某个系统可以用确定性方式构建,那就应该这样做。”

LLM 是概率系统。它们的设计目标是从众多可能选项中,一次又一次地选择文本中的下一个词。根据选择下一个词的方式(即“采样策略”),同一个输入可能产生不同的输出。

然而,这种设计也让它们容易出现几种失败模式:

幻觉:生成不符合现实的文本

谄媚:过度迎合用户的观点,而不是给出均衡的回应

这些失败模式可以规避,但需要精心设计和测试。这意味着,如果你能用确定性方式构建一个系统,你就应该这么做。

§ 11

Deterministic systems are far easier to test, debug, and maintain. They are safer to put into production and are often faster and cheaper to run.

Deterministic systems are not going away. They are infinitely easier than AI apps to build, test, and maintain. In a world where folks are throwing LLMs at every problem, being able to sniff out when not to use them is a valuable skill.

Deterministic systems should be your default choice for any task, until you hit a barrier which can only be solved by an LLM.

确定性系统更容易测试、调试和维护,投入生产也更安全,而且通常运行更快、成本更低。

确定性系统不会消失。它们比 AI 应用更容易构建、测试和维护。在一个人们恨不得把所有问题都扔给 LLM 的世界里,能够看出何时不该用 LLM 是一项宝贵的技能。

对于任何任务,确定性系统都应该是你的默认选择,直到你遇到只有 LLM 才能解决的障碍。

§ 12

But LLMs do have their place. Let's take the LLM use cases we've seen so far and put them into two buckets.

First, there are the tasks that are too expensive to hire humans for:

Converting unstructured data into structured data

Labeling and classification

Then, there are the tasks that are too complex for deterministic systems:

Question answering

Text generation

Agents

So any task that falls into one of these buckets is a good candidate for an LLM.

但 LLM 确实有它们的用武之地。让我们把前面看到的 LLM 用例放进两个桶里。

第一类是雇人做太贵的任务:

将非结构化数据转换为结构化数据

标注与分类

第二类是对于确定性系统来说太复杂的任务:

问答

文本生成

Agent

因此,任何落入其中一个桶里的任务,都是 LLM 的合适候选。

Open source ↗