# LLMs Basics

### **Definition of LLMs (Large Language Models)**:

Large Language Models (LLMs) are AI systems trained on large amounts of text to understand and generate natural language. They can help with a wide range of tasks like answering questions, summarizing documents, translating text, etc.\
LLMs can be utilized in everything from chatbots and search to business automation and research.

#### **Difference Between LLM and R-LLM**:

* **LLM (Large Language Model)**

  LLMs are trained to understand and generate human-like text based on patterns in data. They're great at tasks like writing, translating, summarizing, and answering straightforward questions. However, they may fall short when tasks require deeper reasoning, step-by-step logic, or complex decision-making.
* **R-LLM (Reasoning-Enabled Language Model)**

  R-LLMs take things a step further. They’re designed not just to generate text, but to reason through problems. These models can handle more complex tasks like explaining decisions, solving multi-step problems, or making logical inferences by breaking down their thought process and offering more structured, explainable answers.

### How LLMs Work (Simply Explained)

When you send a message, the LLM breaks your text into small units called **tokens** (roughly one word or part of a word), processes them to understand context and meaning, then generates a response - token by token. The total amount of text the model can process at once (your prompt, conversation history, and its response combined) is called the **context window** - the larger it is, the more information the model can work with at once.

### What Are Tokens?

Tokens are the unit LLMs use to read and generate text. Users need to understand this because:

* It directly affects **Compute Block (CB) consumption**
* It explains why longer prompts or responses cost more
* It sets up the concept of **context windows**

> Example: *"The quick brown fox"* = \~4 tokens

### What Is a Context Window?

A **context window** is the total amount of text an LLM can hold in its "working memory" at once - including your instructions, the conversation history, any documents you've shared, and the model's response. Once the conversation exceeds this limit, the model starts to "forget" earlier parts of the exchange.

### What's next?

* Dive into the [Overview of LLMs](/for-users/all-about-llms/overview-of-llms.md) to find out which LLMs you can use in Blockbrain
* Figure out which one works for you best by reading [How to Choose the Right LLM](/for-users/all-about-llms/how-to-choose-the-right-llm.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blockbrain.ai/for-users/all-about-llms/llms-basics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
