AI Engineering
Learn LLMs, RAG, agents, secure tools, and production AI through practical insurance examples.
Hybrid RAG, reranking, and parent-child retrieval
Hybrid RAG uses lexical and semantic retrieval together. Reranking carefully orders the retrieved candidates. Parent-child retrieval searches smaller child chunks but supplies a larger parent section when the child is selected.
Multi-hop RAG and agentic RAG
Multi-hop RAG retrieves information in dependent steps: one finding determines the next search. Agentic RAG lets a bounded agent choose retrieval tools or decide whether another search is needed. A fixed two-step retrieval workflow can be multi-hop without…
Corrective RAG, self-reflective RAG, and context compression
Corrective RAG detects inadequate retrieval and applies a correction, such as reformulating search. Self-reflective RAG checks whether evidence or an answer is sufficient and supported. Context compression reduces retrieved text to the parts useful for the…
Graph RAG
Graph RAG retrieves through entities and relationships, such as customer → policy → endorsement → covered asset. It can combine graph traversal, document retrieval, and generated summaries. A graph represents connected facts; it is separate from LangGraph's…
RAG evaluation and comparison with alternatives
RAG evaluation measures retrieval quality and answer quality independently and together. Fine-tuning changes model behavior through training; long context supplies a large body of content directly; traditional search returns evidence without generating an…
Agents, chatbots, and workflows
An AI agent is software that uses a model to choose actions toward a goal, observes results, and decides what to do next within application limits. A chatbot describes a conversational interface; it may or may not contain an agent. A workflow defines the…
Agent loop, reasoning/action/observation, and ReAct
An agent loop alternates decision, action, and observation. ReAct is a pattern that combines deciding what information/action is needed with executing tools and observing results. “Reasoning” here means useful task planning and decision-making, not a…
Tools, planning, state, memory, and autonomous actions
Tools are approved external capabilities. Planning breaks a goal into steps; state records current execution facts; memory carries selected information across turns or tasks. Autonomous action means the system can perform some actions without a new user…
Human-in-the-loop
Human-in-the-loop means a workflow includes a person who supplies information, reviews a result, or authorizes an action. The system can pause durably while waiting. Human approval is a business event with identity and scope, not a sentence in the prompt.
Router pattern
A router chooses a specialized path based on the request. It can use deterministic rules, a classifier, or an LLM with a bounded enum output. Routing does not automatically require a full agent loop.
Planner/executor pattern
A planner proposes steps; an executor performs permitted steps and reports results. Splitting the roles separates deciding from acting. The executor still enforces constraints rather than blindly following the plan.
Supervisor and handoff patterns
A supervisor coordinates specialized workers and often combines their outputs. A handoff transfers responsibility for a conversation or task to another specialist. Coordination and transfer are different: the supervisor may retain ownership, while a handoff…
Reflection and critic patterns
Reflection revises an output after examining it. A critic is a separate checking role that evaluates an output against criteria. Either can be model-based, rule-based, or a combination.
Multi-agent and hierarchical agents
Multi-agent systems involve several model-driven roles cooperating. Hierarchical systems organize those roles into levels of coordinators and workers. Multiple ordinary functions in a workflow are not automatically multiple agents.
LangChain overview, models, prompts, and chains
LangChain is a framework ecosystem for assembling model-driven applications. Model wrappers, prompt templates, and composable operations make integration easier. A chain is a sequence of transformations or calls; it can be fixed and does not automatically…
LangChain tools, retrievers, retrieval, and structured output
A retriever returns candidate documents for a query. A tool exposes an action with a description and argument schema. Structured-output wrappers ask supported models for typed data and help parse the result; these are adapters around the concepts already…
LangChain agents versus simple code
LangChain agent construction combines models, tools, and runtime behavior into an agent interface. Simple code uses direct SDK calls and ordinary functions instead. Both can produce production applications if their reliability and security requirements are…
What LangGraph is and why it exists
LangGraph represents execution as a graph of steps sharing explicit state. Nodes do work and edges select the next step; the graph can contain both ordinary code and model decisions. It supports applications that need branching, repeated tool use, and…
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.