Enhancing Internet Search with RAG
We built an internet search tool based on Retrieval-Augmented Generation (RAG) to answer natural language questions by searching the internet for relevant information and generating responses using a large language model (LLM). This tool is designed for local deployment, utilizing smaller open LLMs and a local metasearch engine, thereby eliminating the need for external search API keys.
It addresses issues of outdated knowledge and hallucinations in LLMs by providing current and factual information directly from the internet. We implemented multiple pre-processing steps to extract and summarize the most relevant information from search results, enabling the tool to work effectively with smaller models that have limited context size and capabilities such as the Llama3-8B model.
The internet search tool is a component of the bot-with-plan project and is capable of functioning independently (instructions here) or within an agentic workflow as illustrated in the following notebook.
Related articles: