RAG Explained: Giving a Model Access to Documents It Has Never Seen
A model cannot answer from documents it was never trained on. This post explains what RAG is, how its two paths work, and when fine-tuning is the wrong answer to it.
Latest articles, tutorials, and deep dives from ndlab tech blog.
A model cannot answer from documents it was never trained on. This post explains what RAG is, how its two paths work, and when fine-tuning is the wrong answer to it.
A straight line is the easy case. This post covers piping chains together, fanning out with RunnableParallel, wrapping your own functions, and drawing what you built.
A single pipe operator turns three objects into a pipeline that batches, streams and runs async for free. Here is how, plus the step that silently breaks streaming.
Free text is unusable in a pipeline. This post covers getting validated objects back with Pydantic, and the narrower cases where an output parser is still the right tool.
LangChain's first real abstraction is the input side: typed messages, reusable prompt templates, and few-shot examples that teach a model by showing instead of telling.
Before reaching for a framework, call the API directly. System, user and assistant roles, a sarcastic chatbot, and what temperature and streaming actually control.
Results