# Day 4 - Jan 24 2026

### 1. What is an LLM? (No Math)&#x20;

An LLM (Large Language Model) is not a "knowledge base" or a "search engine." It is a Next-Token Prediction Engine.

* The Mental Model: Imagine the world's best auto-complete. If you type "The capital of France is", the model doesn't "know" geography. It calculates that "Paris" is statistically the most likely next word.

### 2. The 3 Pillars of Control

* Tokens: The currency of LLMs. The model processes text in chunks (tokens), not words. Rough math: 1,000 tokens ≈ 750 words.
* Context Window: The "Short-Term Memory." It’s how much text the model can look at *right now* to answer you. If conversation exceeds this limit, the model "forgets" the beginning.
* Temperature: The "Creativity Knob."
  * `Temp = 0.0`: Precise, deterministic, factual (Use for coding/data extraction).
  * `Temp = 1.0`: Creative, random, diverse (Use for brainstorming/poetry).

### 3. Cloud vs. Local (Ollama)

* Cloud (OpenAI/Gemini): Smarter, but data leaves your device. Cost per token.
* Local (Ollama): Runs on *your* laptop. Private. Free. Works offline. Great for testing agents without burning money.

### Status:

* [x] Conceptual Script `day4_concept.py` Created
* [x] Ollama Installed (Local LLM Ready)
* [x] Mental Models Documented


---

# 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://shankar-lab.gitbook.io/mylearning/15-days-genai-learning-challenge/day-4-jan-24-2026.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.
