Home›Practice
Practice
Practice
Hands-on guides and first-hand notes on agent frameworks, skills and AI tools.
Total 217
Prompt engineering fundamentalsPrompt engineering designs and refines the text you send to a model. You will learn how models read prompts, why outputs vary, the three-layer structure of a good prompt, and eight best practices to apply right away.Prompt chainingPrompt chaining splits a large task into subtasks, feeding each prompt's output into the next. You will break a document-QA task into a two-link chain and learn when and how to split tasks into a chain.ReAct promptingReAct interleaves reasoning steps with tool actions, so the model can search external sources and reason over what it finds. You will read real ReAct trajectories, see where it wins and loses, and build a ReAct agent with LangChain.Chain-of-thought promptingChain-of-thought prompting makes the model write out intermediate reasoning steps before answering. You will write few-shot CoT demonstrations, use the one-sentence zero-shot variant, and generate demonstrations automatically with Auto-CoT.Few-shot promptingFew-shot prompting attaches worked examples to the prompt so the model follows them. You will write your first few-shot prompt, learn how to pick demonstrations, and know when to switch to chain-of-thought or fine-tuning.Qwen3 thinking mode explainedWhy can Qwen3 both think deeply and answer quickly? This guide explains its two mechanisms: a thinking budget that caps how long the model thinks, and the enable_thinking switch in the chat template that turns thinking on or off.LoRA fine-tuning Qwen3Want a general model to pick up a particular style or task? This guide walks through LoRA fine-tuning of Qwen3-8B: preparing data, encoding it, configuring LoRA, logging training with SwanLab, and running inference with the trained weights.Running Qwen3 on Windows with LM StudioPrefer a graphical interface and want to run Qwen3-8B offline on Windows? This guide uses LM Studio to download and chat with the model, then turns on its local server and calls it from Python with the OpenAI library.Serving Qwen3 with vLLMWant to run Qwen3-8B on your own GPU and call it through an OpenAI-style API? This guide covers what vLLM does, then walks through downloading the model, offline inference, starting an OpenAI-compatible server, and testing it with curl and Python.Downloading models from China: ModelScope and HF mirrorsHugging Face downloads are often slow from mainland China. This guide covers five ways to get model weights, including huggingface-cli with an HF mirror, ModelScope, git-lfs and OpenXLab, and shows how to point pip and conda at Chinese mirrors.Building a data analysis deep agent from scratchBuild a CSV data analysis agent with create_agent, adding a sandbox with filesystem tools, summarization, skills and a visualization subagent one middleware at a time.Interrupts in LangGraph: pause for human inputUse interrupt() to pause a LangGraph node, save state and wait for human input, then resume with Command; includes an approval example and the rules that follow from re-running nodes.Streaming in LangChain agentsUse stream_mode to push agent progress, token-by-token LLM output and custom updates to your app in real time, plus multi-mode streaming, reasoning tokens and turning streaming off.Human-in-the-loop approval for risky tool calls in LangChainAdd human approval to risky tool calls with LangChain's HumanInTheLoopMiddleware, covering the approve, edit, reject and respond decisions and how to resume after an interrupt.Short-term memory in LangChain agentsGive a LangChain agent thread-level memory with a checkpointer, persist it in a database for production, and control long histories by trimming, deleting or summarizing messages.A SQL agent with LangChainBuild an agent that answers questions about a SQLite database by writing SQL, then add human review before queries run.Building a knowledge base with LangChainBuild semantic search over a PDF: split pages, embed chunks, index them in a vector store, and wrap a retriever.Structured output in LangChainMake an agent return typed data with response_format, and understand the provider-native and tool-calling strategies.Tools in LangChainTurn ordinary Python or TypeScript functions into agent tools, covering names, schemas, return values and errors.LangChain quickstart: install and build a first agentInstall LangChain, set a model API key, and run a first agent that calls a weather tool, with optional LangSmith tracing.A document analysis agent with LangGraphThis guide builds a small document analysis agent in LangGraph. It reads text from an image with a vision model, calls a calculation tool, and loops between an assistant node and a tools node until it can answer.Agents and tools in LlamaIndexLlamaIndex agents are built from tools: functions, query engines and ToolSpecs. This guide shows how to make a first agent, give it memory, combine several agents and connect MCP tools.Multi-agent systems with smolagentsA single agent slows down and runs up token costs when one task holds many steps. This guide splits the work between a manager agent and a web agent in smolagents, then adds a check on the final answer.Custom tools in smolagentsIn smolagents, a tool is a function an agent can call. This guide compares the @tool decorator with the Tool class, then covers built-in tools and importing tools from the Hub, Spaces, LangChain and MCP servers.