
How to Add Web Search to an AI Agent or RAG Pipeline
Two ways to give a language model live web search: search first and put the results in the prompt, or give the model a search tool. Python code for both, a TypeScript agent, and what we measured on accuracy, latency and cost.




