# DeepSearcher

> Deep research over your own documents — search, evaluate and reason, then return a report

- Category: Retrieval & Knowledge (RAG) / RAG Frameworks & Platforms
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/zilliztech/deep-searcher
- Website: https://zilliztech.github.io/deep-searcher/
- Canonical page: https://ai-tldr.dev/tools/deep-searcher/

## In short

DeepSearcher is an Apache-2.0 Python library from Zilliz, the company behind the Milvus vector database. It combines a large language model with a vector database to perform search, evaluation and reasoning over private data, returning both an answer and a comprehensive report. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Apache-2.0.

## Overview

DeepSearcher is an Apache-2.0 Python library from Zilliz, the company behind the Milvus vector database. It combines a large language model with a vector database to perform search, evaluation and reasoning over private data, returning both an answer and a comprehensive report. The project positions itself for enterprise knowledge management, intelligent Q&A systems and information-retrieval scenarios.

The design is deliberately pluggable at every layer. LLMs can be OpenAI, DeepSeek, Anthropic Claude, XAI Grok, Google Gemini, Ollama, IBM watsonx.ai or one of several inference services (SiliconFlow, TogetherAI, SambaNova, PPIO, Novita AI, Jiekou.AI). Embeddings can come from open-source models, OpenAI, VoyageAI, Amazon Bedrock, FastEmbed and others. Storage is Milvus or Zilliz Cloud, or Qdrant. Documents arrive through a local-file loader (PDF, txt, md) or a web crawler backed by FireCrawl, Jina Reader or Crawl4AI.

It runs two ways. As a library you build a `Configuration`, register your providers, load documents and call `query()`. As a service you fill in `config.yaml` and run `main.py`, which starts a FastAPI app on `localhost:8000` with interactive docs at `/docs`. The project notes that small models tend to break the output-format parsing and recommends large reasoning models for the LLM slot.

## What it does

- Private-data search that keeps enterprise documents in your own vector store, with optional online content when needed
- Vector database support for Milvus and Zilliz Cloud plus Qdrant, with data partitioning for efficient retrieval
- Pluggable LLMs — OpenAI, DeepSeek, Anthropic, XAI, Gemini, Ollama, watsonx.ai and several inference services
- Flexible embedding options, from open-source models to OpenAI, VoyageAI, Amazon Bedrock and FastEmbed
- Document loaders for local PDF/txt/md files and web crawling via FireCrawl, Jina Reader or Crawl4AI
- A FastAPI service mode with interactive OpenAPI docs, alongside the Python library

## Getting started

DeepSearcher is a pip-installable Python package (Python 3.10 is the recommended version). The steps below follow the project README's quick start.

1. Create a virtual environment and install

   Install the published package from PyPI.

```bash
python -m venv .venv
source .venv/bin/activate
pip install deepsearcher
```

2. Add optional extras if you need them

   Extras pull in provider-specific dependencies, for example Ollama.

```bash
pip install "deepsearcher[ollama]"
```

3. Configure providers, load documents and query

   Export the API key for whichever LLM you configure — OPENAI_API_KEY in this example — then load local files and ask a question.

```python
from deepsearcher.configuration import Configuration, init_config
from deepsearcher.online_query import query

config = Configuration()
config.set_provider_config("llm", "OpenAI", {"model": "o1-mini"})
config.set_provider_config("embedding", "OpenAIEmbedding", {"model": "text-embedding-ada-002"})
init_config(config=config)

from deepsearcher.offline_loading import load_from_local_files
load_from_local_files(paths_or_directory=your_local_path)

result = query("Write a report about xxx.")
```

4. Or run it as a service

   Set your modules in config.yaml, then start the FastAPI app — it listens on localhost:8000, with interactive docs at http://localhost:8000/docs.

```bash
python main.py
```

5. Develop against the source

   The project recommends uv for a faster, more reliable development install.

```bash
git clone https://github.com/zilliztech/deep-searcher.git && cd deep-searcher
uv sync
source .venv/bin/activate
```

## When to use it

- Reach for it when a question needs a researched report over internal documents, not a single retrieved passage
- Reach for it for enterprise knowledge management where the corpus must stay in your own Milvus, Zilliz Cloud or Qdrant instance
- Reach for it when you want to swap LLM and embedding providers without rewriting the retrieval pipeline
- Reach for it to stand up a REST endpoint for private-data Q&A quickly, via the bundled FastAPI service
