How to Reduce Hallucinations in LLM Applications
Proven ways to reduce LLM hallucinations: grounding with RAG, citations, structured output, abstention, verification checks, and evals that catch errors early.
WRITING / NOTES FROM THE FORGE
12 articles tagged AI.
Proven ways to reduce LLM hallucinations: grounding with RAG, citations, structured output, abstention, verification checks, and evals that catch errors early.
Fine-tuning vs RAG vs prompt engineering compared: what each changes, costs, and fixes, plus a simple decision framework for choosing the right LLM approach.
Prompt injection explained: direct vs indirect attacks, why no complete fix exists, and the layered defenses that limit damage in LLM apps and AI agents.
A practical guide to LLM evaluation: build a golden dataset, pick metrics, use LLM-as-judge carefully, and gate releases so AI features do not regress.
What is MCP? The Model Context Protocol explained with a real server example, message flow, tools vs resources vs prompts, transports, and security tips.
Learn how to build an AI agent step by step: the core loop, tool design, memory, and guardrails that keep an LLM agent useful, safe, and cheap in production.
Embeddings explained for developers: what embeddings are, how they capture meaning, how cosine similarity works, and how to use them for search and RAG.
How to choose a vector database: a practical comparison of dedicated vector DBs, pgvector, search engines, and libraries by scale, filtering, and cost.
RAG explained for developers: how retrieval-augmented generation works, how to chunk, embed, retrieve, and rerank, and how to evaluate a RAG pipeline.
Prompt engineering best practices for developers: clear instructions, examples, structured output, delimiters, evals, and patterns that make LLMs reliable.
Learn how to reduce LLM API costs with 12 proven techniques, from prompt caching and model routing to batching, semantic caching, and token monitoring.
What is a large language model? A plain-English guide for developers covering tokens, transformers, training, context windows, and how to use LLMs well.