AI Hints
Home›LangChain Tutorial›Getting Started
LangChain · Lesson 2 of 120

How LLM Apps Work

Text in, text out.

⏱ 2 min read▶ Video at 1:01🎓 Free
Watch this lesson in the LangChain courseWatch on YouTube ↗Full LangChain course

A large language model is, at heart, simple to use. You send it text, and it sends text back. Everything else in an LLM app is about what text you send, and what you do with the reply.

How LLM Apps Work
From the video: How LLM Apps Work
  • Send text
  • Get text back
  • Everything else is around that

A typical LLM app

Here's a typical app. A user asks a question. The app builds a prompt, adding instructions and useful information. It sends the prompt to the model. The model writes a reply. And the app checks or reshapes the reply, before showing it to the user.

  1. User question
  2. Build a prompt
  3. Call the model
  4. Model replies
  5. Check and show
A typical LLM app
From the video: A typical LLM app

What models are good and bad at

Models are great at writing, summarising, translating, and following instructions. But they don't know your private data, like your shop's stock. They can confidently make things up. And they can't take actions by themselves. LangChain's building blocks exist to fix exactly these gaps.

keyvalue
Great atwriting, summarising
Don't knowyour private data
Canmake things up
Can'tact on their own

Summary

An LLM app sends text to a model and works with the reply. LangChain helps add your data, tools, and checks around that core. Next, setting up.

Key takeaways
  • Text in, text out
  • Build the prompt
  • Check the reply
Next up: Setting Up — packages and a key