Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

4247 bites

Page 44

LLMs & Generative AI2 min read

Few-Shot Prompting

Few-shot prompting embeds task examples directly in the prompt to guide output format without retraining. It excels at niche tasks and consistent formatting, but mismatched examples degrade performance more than no examples at all.

LLMs & Generative AI2 min read

Chain-of-Thought Prompting: Making LLMs 'Show Their Work'

Chain-of-Thought (CoT) prompting gets better answers from LLMs by asking them to 'show their work.' It's best for complex reasoning like math problems or logic puzzles where breaking the problem down helps.

LLMs & Generative AI2 min read

Least-to-Most Prompting: Solving Hard Problems Incrementally

Least-to-most prompting guides an LLM by breaking a hard problem into a sequence of simpler steps. It excels at complex math or logic where chain-of-thought fails, solving each subproblem using the answer to the previous one.

LLMs & Generative AI2 min read

Self-Consistency: Majority Rules for LLM Reasoning

Self-consistency makes an LLM solve a problem multiple ways, then picks the most common answer. It's like asking a committee of experts for their reasoning and taking a vote. This boosts accuracy on complex math and logic puzzles.

LLMs & Generative AI2 min read

Tree of Thoughts: LLM Reasoning Beyond a Single Path

Tree of Thoughts (ToT) lets an LLM explore multiple reasoning paths at once, like a human brainstorming. It generates several 'thoughts' and pursues the most promising ones. This is crucial for planning tasks where one wrong turn fails.

ReAct: Teaching LLMs to Think, Act, and Observe
LLMs & Generative AI2 min read

ReAct: Teaching LLMs to Think, Act, and Observe

ReAct teaches an LLM to solve problems by interleaving thought, action, and observation. This is key for agents that search the web or query APIs to answer questions with external data.

Supervised Fine-Tuning (SFT): Teaching a Model to Chat
LLMs & Generative AI2 min read

Supervised Fine-Tuning (SFT): Teaching a Model to Chat

Supervised Fine-Tuning (SFT) teaches a general LLM to be a helpful assistant by training it on high-quality conversations. This turns a base model into an instruction-following chatbot.

LLMs & Generative AI2 min read

Catastrophic Forgetting: The AI's Amnesia Problem

Catastrophic forgetting is when an AI, trained on new information, abruptly forgets what it previously knew. It's like overwriting a file instead of appending to it. This happens when fine-tuning a model on a narrow dataset, erasing its general knowledge.

PEFT: Fine-Tune Large Models on a Budget
LLMs & Generative AI2 min read

PEFT: Fine-Tune Large Models on a Budget

Parameter-Efficient Fine-Tuning (PEFT) adapts huge models without retraining everything. It's like adding a task-specific cheat sheet to a genius brain. Use it to specialize LLMs on consumer GPUs.

Instruction Fine-Tuning: Teaching LLMs to Follow Orders
LLMs & Generative AI2 min read

Instruction Fine-Tuning: Teaching LLMs to Follow Orders

Instruction fine-tuning teaches a base LLM to follow commands, not just predict the next word. It turns a raw text-completion engine into a helpful assistant, enabling it to answer questions or summarize text. The footgun: it learns style, not facts.

Reward Modeling: Teaching an LLM What 'Good' Means
LLMs & Generative AI2 min read

Reward Modeling: Teaching an LLM What 'Good' Means

A reward model is a judge that scores an LLM's outputs based on human preferences. It learns to assign a numerical 'goodness' score to text, turning subjective quality into an optimizable signal for training models like ChatGPT.

LLMs & Generative AI2 min read

Adapter Modules: Efficient LLM Fine-Tuning

Adapters are small modules plugged into a frozen LLM to avoid costly full fine-tuning. This lets you specialize a base model for many tasks by training tiny, swappable plugins instead of duplicating the entire model for each task.

LLMs & Generative AI2 min read

Proximal Policy Optimization (PPO): Stable RL Updates

PPO prevents destructive updates in reinforcement learning by "clipping" how much a policy can change at once, like a governor on an engine. It's a default for training LLMs with RLHF or robotics agents where stability is key.

LLMs & Generative AI2 min read

QLoRA: Finetune Huge LLMs on a Single GPU

QLoRA lets you finetune massive LLMs on one GPU by freezing the model in a 4-bit state and only training tiny adapter layers. Use it to adapt a 65B model with limited hardware. The footgun: performance hinges on high-quality data, not just the technique.

LLMs & Generative AI2 min read

Embedding Models: The 'Retrieval' in RAG

An embedding model acts like a librarian for your data, converting text into numerical vectors so similar concepts are grouped together. In RAG, it finds relevant documents to feed an LLM, but using the wrong model type will yield poor retrieval results.

Dense Passage Retrieval (DPR): Semantic Search for QA
LLMs & Generative AI2 min read

Dense Passage Retrieval (DPR): Semantic Search for QA

DPR finds answers by meaning, not just keywords. It converts questions and documents into vectors and finds the closest matches, forming the core of Retrieval-Augmented Generation (RAG).

Hybrid Search: Combining Keyword and Vector Search
LLMs & Generative AI2 min read

Hybrid Search: Combining Keyword and Vector Search

Hybrid search combines keyword precision with vector search's conceptual understanding in one query. It excels at retrieving relevant documents for RAG by finding both exact matches (like names) and similar ideas.

LLMs & Generative AI2 min read

Context Stuffing: Giving LLMs Short-Term Memory

Context stuffing adds external documents to an LLM's prompt, giving it temporary, task-specific knowledge. Use it for one-off questions on specific docs, but beware: it fails when documents exceed the model's context window limit, causing truncated data.

LLMs Get 'Lost in the Middle' of Long Contexts
LLMs & Generative AI2 min read

LLMs Get 'Lost in the Middle' of Long Contexts

LLMs struggle to find information buried in the middle of long prompts. Performance is highest when key facts are at the beginning or end of the context. This impacts multi-document QA and RAG.

LLMs & Generative AI2 min read

Self-Querying Retriever: Let an LLM Write Its Own Filters

A self-querying retriever uses an LLM to turn a natural language question into a structured query with metadata filters. It lets users ask things like "Find documents about Python from before 2020," which a simple vector search can't do.