wAIpoint
Italiano

Large language models

Level: Intermediate

What it is

A large language model (LLM) is a language model, almost always a transformer, with a very large number of parameters, trained on a huge amount of text. Size brings unexpected skills: with a few examples in the prompt it can do tasks it was never explicitly trained for. Chat assistants are LLMs that have been further trained to follow instructions.

What it is for

Writing and editing, summarising, translating, explaining, answering questions about a text you give it, writing and explaining code, and acting as the reasoning core of agents. It is a tool for drafts and exploration, not a source of truth: it can state false things with confidence.

How to do it

The process, step by step. Libraries and tools change; these steps stay.

  1. Pick how you will reach one: a chat app for exploring, an API for building into a product, or an open model you run yourself when privacy or cost demand it.
  2. Write the prompt as a brief: the role or goal, the context, the exact task, the format you want, and an example if the format matters.
  3. Give it the material instead of trusting its memory: paste the document or connect your sources (see Retrieval-augmented generation).
  4. Iterate: read the answer, say what was wrong, and ask again; split big jobs into steps.
  5. Verify anything important against a reliable source, and never paste secrets or personal data into a service you do not control.
  6. Measure, do not guess: for a real application, collect test cases and re-run them whenever you change the prompt or the model.

Lately

Timeline

  1. 2018BERT: pre-trained deep bidirectional transformers for language understanding (Devlin et al.). source
  2. 2020GPT-3: a 175-billion-parameter language model that learns tasks from a few examples (Brown et al.). source

Sources