diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index cd60e2a..0000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: ''
-labels: ''
-assignees: ''
-
----
-
-Please describe your issue **in English**
-
-*Note: Small LLMs cannot perform well at prompt following, and are prone to hallucinations. Please make sure your LLM is cutting-edge, preferably a reasoning model, e.g. OpenAI o-series, DeepSeek R1, Claude 3.7 Sonnet etc.*
-
-**Describe the bug**
-A clear and concise description of what the bug is.
-
-**To Reproduce**
-Steps to reproduce the behavior:
-
-**Expected behavior**
-A clear and concise description of what you expected to happen.
-
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
-
-**Environment (please complete the following information):**
- - OS: [e.g. MacOS]
- - pip dependencies
- - Version [e.g. 0.0.1]
-
-**Additional context**
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index ec75cea..0000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-name: Feature request
-about: Suggest an idea for this project
-title: ''
-labels: ''
-assignees: ''
-
----
-
-Please describe your suggestion **in English**.
-
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
-
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features you've considered.
-
-**Additional context**
-Add any other context or screenshots about the feature request here.
diff --git a/.github/mergify.yml b/.github/mergify.yml
deleted file mode 100644
index d5f7cc8..0000000
--- a/.github/mergify.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-misc:
- - branch: &BRANCHES
- # In this pull request, the changes are based on the main branch
- - &MASTER_BRANCH base=main
-
- - name: Label bug fix PRs
- conditions:
- # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- - or: *BRANCHES
- - 'title~=^fix:'
- actions:
- label:
- add:
- - kind/bug
-
- - name: Label feature PRs
- conditions:
- # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- - or: *BRANCHES
- - 'title~=^feat:'
- actions:
- label:
- add:
- - kind/feature
-
- - name: Label enhancement PRs
- conditions:
- # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- - or: *BRANCHES
- - 'title~=^enhance:'
- actions:
- label:
- add:
- - kind/enhancement
diff --git a/.github/workflows/cd-docs.yml b/.github/workflows/cd-docs.yml
deleted file mode 100644
index 925c0d3..0000000
--- a/.github/workflows/cd-docs.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: "Run Docs CD with UV"
-
-on:
- push:
- branches:
- - "main"
- - "master"
- paths:
- - 'docs/**'
- - 'mkdocs.yml'
- - '.github/workflows/docs.yml'
-
-jobs:
- build-deploy-docs:
- if: github.repository == 'zilliztech/deep-searcher'
- uses: ./.github/workflows/docs.yml
- with:
- deploy: true
- permissions:
- contents: write
diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml
deleted file mode 100644
index 8676ffa..0000000
--- a/.github/workflows/ci-docs.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: "Run Docs CI with UV"
-
-on:
- pull_request:
- types: [opened, reopened, synchronize]
- paths:
- - 'docs/**'
- - 'mkdocs.yml'
- - '.github/workflows/docs.yml'
- push:
- branches:
- - "**"
- - "!gh-pages"
- paths:
- - 'docs/**'
- - 'mkdocs.yml'
- - '.github/workflows/docs.yml'
-
-jobs:
- build-docs:
- if: ${{ github.event_name == 'push' || (github.event.pull_request.head.repo.full_name != 'zilliztech/deep-searcher') }}
- uses: ./.github/workflows/docs.yml
- with:
- deploy: false
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
deleted file mode 100644
index 9d6a9f8..0000000
--- a/.github/workflows/docs.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-on:
- workflow_call:
- inputs:
- deploy:
- type: boolean
- description: "If true, the docs will be deployed."
- default: false
-
-jobs:
- run-docs:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Install uv
- uses: astral-sh/setup-uv@v5
- - name: Install dependencies
- run: |
- uv sync --all-extras --dev
- source .venv/bin/activate
-
- - name: Build docs
- run: uv run mkdocs build --verbose --clean
-
- - name: Build and push docs
- if: inputs.deploy
- run: uv run mkdocs gh-deploy --force
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index ab00425..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-#git tag v0.x.x # Must be same as the version in pyproject.toml
-#git push --tags
-
-name: Publish Python Package to PyPI
-
-on:
- push:
- tags:
- - "v*"
-
-jobs:
- publish:
- name: Publish to PyPI
- runs-on: ubuntu-latest
- environment: pypi
-
- permissions:
- id-token: write
- contents: read
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
-
- - name: Set up Python
- uses: actions/setup-python@v5
- with:
- python-version: "3.10"
-
- - name: Install build tools
- run: python -m pip install build
-
- - name: Build package
- run: python -m build
-
- - name: Publish to PyPI
- uses: pypa/gh-action-pypi-publish@release/v1
\ No newline at end of file
diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml
deleted file mode 100644
index 1a4541e..0000000
--- a/.github/workflows/ruff.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: Ruff
-on:
- push:
- branches: [ main, master ]
- pull_request:
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Install uv
- uses: astral-sh/setup-uv@v5
- - name: Install the project
- run: |
- uv sync --all-extras --dev
- source .venv/bin/activate
-
- - name: Run Ruff
- run: |
- uv run ruff format --diff
- uv run ruff check
-
- # - name: Run tests
- # run: uv run pytest tests
\ No newline at end of file
diff --git a/deepsearcher/agent/deep_search.py b/deepsearcher/agent/deep_search.py
index c1623d4..b11c81c 100644
--- a/deepsearcher/agent/deep_search.py
+++ b/deepsearcher/agent/deep_search.py
@@ -5,6 +5,7 @@ from deepsearcher.utils import log
from deepsearcher.vector_db import RetrievalResult
from deepsearcher.vector_db.base import BaseVectorDB, deduplicate
+
COLLECTION_ROUTE_PROMPT = """
I provide you with collection_name(s) and corresponding collection_description(s).
Please select the collection names that may be related to the question and return a python list of str.
@@ -17,6 +18,7 @@ When you return, you can ONLY return a json convertable python list of str, WITH
Your selected collection name list is:
"""
+
SUB_QUERY_PROMPT = """
To answer this question more comprehensively, please break down the original question into few numbers of sub-questions (more if necessary).
If this is a very simple question and no decomposition is necessary, then keep the only one original question.
@@ -41,6 +43,7 @@ Example output:
Provide your response in a python code list of str format:
"""
+
RERANK_PROMPT = """
Based on the query questions and the retrieved chunks, determine whether each chunk is helpful in answering any of the query questions.
For each chunk, you must return "YES" or "NO" without any other information.
@@ -107,7 +110,7 @@ class DeepSearch(BaseAgent):
embedding_model: BaseEmbedding,
vector_db: BaseVectorDB,
max_iter: int = 3,
- route_collection: bool = True,
+ route_collection: bool = False,
text_window_splitter: bool = True,
**kwargs,
):
@@ -398,5 +401,5 @@ class DeepSearch(BaseAgent):
def _format_chunk_texts(self, chunk_texts: list[str]) -> str:
chunk_str = ""
for i, chunk in enumerate(chunk_texts):
- chunk_str += f"""
欢迎使用 DeepSearcher 智能搜索系统!
-系统正在运行,但未找到前端模板文件。
-请确认文件是否存在: {template_path}
-您仍然可以通过以下 API 接口使用系统:
-POST /load-files/
- 加载本地文件POST /load-website/
- 加载网站内容GET /query/
- 执行查询有关 API 使用详情,请查看 API 文档
-