tezvyn:

LLMs & Generative AI

Large language models, chatbots, agents, prompt engineering

324 bites

More in LLMs & Generative AI — page 12

Multi-Agent Systems: A Team of AIs, Not a Monolith
LLMs & Generative AI2 min read

Multi-Agent Systems: A Team of AIs, Not a Monolith

Instead of one giant AI, a Multi-Agent System is a team of specialized AIs that collaborate on a complex problem. This appears in LLM-powered coding assistants and complex simulations.

LLMs & Generative AI2 min read

Task Decomposition: Teaching LLMs to Plan

Task decomposition for an LLM agent is like writing a recipe: break a big goal into a checklist of small, executable steps. It's vital for complex requests like planning a trip, but a bad initial plan can cause cascading failures that doom the entire process.

LLMs & Generative AI2 min read

LLM Agents: Giving Models Tools and a Plan

An LLM Agent gives a model tools and a plan to solve complex problems. Instead of just answering a question, it breaks it down, uses APIs or code interpreters, and remembers past steps. The footgun is thinking RAG is an agent; agents need planning and.

Graph RAG: Answering Questions with Connected Facts
LLMs & Generative AI2 min read

Graph RAG: Answering Questions with Connected Facts

Graph RAG answers complex questions by exploring a map of connected facts (a knowledge graph) instead of just searching flat text. Use it for queries needing synthesis, like finding drugs for a disease made by companies in a specific country.

LLMs & Generative AI2 min read

HyDE: Find Documents by Embedding a Fake Answer

Instead of embedding a short query, HyDE uses an LLM to generate a full, hypothetical answer document. This vector, representing an ideal answer, is then used to find similar real documents, improving zero-shot retrieval. The generated document is fictional.

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.

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

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.

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.

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).

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.

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

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

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.

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.

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.

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.

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.

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.

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.