# When Are Large Language Models Useful?

*April 12, 2023* | #generative-ai, #large-language-models, #machine-learning

Large language models (LLMs) like [ChatGPT][chatgpt], [Bing Chat][bing], and
[Bard][lambda] have gained tremendous popularity in recent months. It feels
like a pivotal moment in the technology's growth as it becomes increasingly
integrated into people's workflows. But despite the excitement, some people
are already dismissing the technology after they asked it questions and
received nonsensical responses. I think they are mistaken. LLMs are incredibly
valuable tools, _if_ you know when to use them.

[chatgpt]: https://en.wikipedia.org/wiki/ChatGPT
[bing]: https://en.wikipedia.org/wiki/GPT-4#Microsoft_Bing
[lambda]: https://en.wikipedia.org/wiki/LaMDA

I gave an example in my last post of a good application for LLMs: [editing
prose][last_post]. But what specifically makes this problem ideal for solving
with a model? Succinctly, it is a problem **where solving it is hard, but
verifying the solution is easy**. I will go into more detail in the rest of
this post.

[last_post]: /blog/how-i-write-with-llms-revised/

## What Are They Good For?

In math, there are types of problems where finding a solution is difficult
or impossible, but confirming a solution is easy. A common strategy to solve
these problems is to guess the solution's form and then verify it, such as for
an integral where the solution can be checked by taking its derivative.

Large language models are particularly useful for exactly these types of
tasks: **where generating a solution is hard, but verifying it is easy**.
Editing a paragraph is a prime example of this kind of task since writing
multiple versions is time-consuming, whereas verifying the quality of a single
paragraph can be done quickly.

Other good use cases include [automating data cleaning
tasks][llm_data_cleaning] or [writing code][llm_coding], especially if you
have tests in place to verify the code's correctness.

[llm_data_cleaning]: /blog/large-language-models-for-data-cleaning/
[llm_coding]: /blog/how-i-write-code-with-llms/

## What Are They Bad For?

LLMs are **bad for problems where verification is hard** compared to the
generation of an answer.

Some people are using LLMs as a replacement for search engines.[^mea_culpa]
This is a perfect example of a **bad use** of the technology because verifying
the accuracy of the information provided by the model takes time and effort.
In fact, it often involves additional searches to confirm the validity of the
answer, which defeats the purpose of using an LLM in the first place.

[^mea_culpa]:
    **Author's Note**: This specific example didn't age well! When I wrote
    this in 2023, models relied on "frozen" training weights to mimic search,
    making them prone to confident hallucinations. But now, almost every model
    uses live search results to ground their responses. LLMs have become a
    fantastic way to search because they are now doing what they're best at:
    reading a lot more text than a human ever could and distilling it down to
    the key points.

## Related Posts
- [LLMs Make Python Scripts Free](/blog/llms-make-python-free/)
- [How I Code With LLMs](/blog/how-i-write-code-with-llms/)
- [How I Write with Large Language Models](/blog/how-i-write-with-llms-revised/)