Ollama Deep Researcher is a web research and summarization assistant that autonomously goes down the rabbit-hole of any user-defined topic. It uses a local LLM hosted by Ollama to generate a search query based on the user's topic, gets web search results, and uses an LLM to summarize the results. It then uses the same LLM to reflect on the summary, examine knowledge gaps, and generate a new search query to fill the gaps. This repeats for a user-defined number of cycles, iteratively updating and improving the summary with new information from web search and providing the user a final markdown summary with all sources used. It is configured to run with fully local any LLMs (via Ollama).
Pull a local LLM that you want to use from Ollama:
ollama pull llama3.2
ollama pull deepseek-r1:8b
For free web search (up to 1000 requests), you can use the Tavily API:
export TAVILY_API_KEY=<your_tavily_api_key>
Clone the repository and launch the assistant with the LangGraph server:
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/langchain-ai/ollama-deep-researcher.git
cd ollama-deep-researcher
uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev
You should see the following output and Studio will open in your browser:
Ready!
Docs: http://127.0.0.1:2024/docs
LangGraph Studio Web UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
Open LangGraph Studio Web UI
via the URL in the output above.
In the configuration
tab:
- You can set the name of your local LLM to use with Ollama (it will by default be
llama3.2
) - You can set the depth of the research iterations (it will by default be
3
)
Give the assistant a topic for research, and you can visualize its process!
Research Rabbit is a AI-powered research assistant that:
- Given a user-provided topic, uses a local LLM (via Ollama) to generate a web search query
- Uses a search engine (configured for Tavily) to find relevant sources
- Uses a local LLM to summarize the findings from web search related to the user-provided research topic
- Then, it uses the local LLM to reflect on the summary, identifying knowledge gaps
- It generates a new search query to address the knowledge gaps
- The process repeats, with the summary being iteratively updated with new information from web search
- It will repeat down the research rabbit hole
- Runs for a configurable number of iterations (see
configuration
tab)
This is inspired by IterDRAG, which handles complex queries by decomposing the query into simpler sub-queries. This follows a sequential, interleaved process where each sub-query depends on the answer retrieved from the previous one, enabling dynamic query decomposition and adaptive retrieval.
The output of the graph is a markdown file containing the research summary, with citations to the sources used.
All sources gathered during research are saved to the graph state.
You can visualize them in the graph state, which is visible in LangGraph Studio:
The final summary is saved to the graph state as well:
There are various ways to deploy this graph.
See Module 6 of LangChain Academy for a detailed walkthrough of deployment options with LangGraph.