Skip to content

Commit e40611a

Browse files
authored
Merge pull request #109 from vectorlessflow/dev
Dev
2 parents f550b7c + 4cc38f4 commit e40611a

271 files changed

Lines changed: 2960 additions & 7358 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CLAUDE.md

Lines changed: 58 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CLAUDE.md
22

3-
Vectorless is a reasoning-native document intelligence engine written in Rust.
3+
Vectorless is a Document Understanding Engine for AI written in Rust.
44

55
## Principles
66

@@ -10,32 +10,56 @@ Vectorless is a reasoning-native document intelligence engine written in Rust.
1010

1111
## Project Structure
1212

13-
- `rust/` - Rust core engine
14-
- `src/client/` - Client API (EngineBuilder, Engine) - facade layer, no business logic
15-
- `src/document/` - Document data structures (DocumentTree, NavigationIndex, ReasoningIndex)
16-
- `src/index/` - Compile pipeline (8-stage, checkpointing, incremental update)
17-
- `src/retrieval/` - Retrieval dispatch layer (preprocessing, dispatch, postprocessing, cache, streaming)
18-
- `src/query/` - Query understanding and planning (intent classification, rewrite, decomposition)
19-
- `src/agent/` - Retrieval execution (Worker: doc navigation, Orchestrator: supervisor loop + multi-doc fusion)
20-
- `src/rerank/` - Result reranking and answer synthesis (dedup, scoring, fusion, synthesis)
21-
- `src/scoring/` - Scoring and ranking strategies (BM25, relevance scoring, score combination)
22-
- `src/llm/` - LLM client (connection pool, memo/caching, throttle/rate-limiting, fallback)
23-
- `src/storage/` - Persistence (Workspace, LRU cache, backend abstraction file/memory)
24-
- `src/graph/` - Cross-document relationship graph
25-
- `src/metrics/` - Metrics collection and reporting
26-
- `src/events/` - Event system for progress monitoring
27-
- `src/config/` - Configuration types and validation
28-
- `src/error.rs` - Unified error types
29-
- `src/utils/` - Utility functions (token counting, fingerprinting, validation)
30-
- `examples/` - Rust examples (flow, indexing, pdf, batch, etc.)
31-
- `python/` - Python SDK (PyO3 bindings) + CLI
13+
Cargo workspace with 17 fine-grained Rust crates + pure Python SDK:
14+
15+
```
16+
vectorless-core/
17+
├── vectorless-error/ # Error types (Result, Error enum)
18+
├── vectorless-document/ # Document types (Document, Tree, NavigationIndex, ReasoningIndex)
19+
├── vectorless-config/ # Configuration hub (aggregates all config types)
20+
├── vectorless-utils/ # Utilities (fingerprinting, token counting, validation)
21+
├── vectorless-scoring/ # Scoring (BM25, keyword extraction)
22+
├── vectorless-graph/ # Cross-document relationship graph
23+
├── vectorless-events/ # Event system for progress monitoring
24+
├── vectorless-metrics/ # Metrics collection and reporting
25+
├── vectorless-llm/ # LLM client (pool, memo/cache, throttle, fallback)
26+
├── vectorless-storage/ # Persistence (Workspace, LRU cache, file/memory backends)
27+
├── vectorless-query/ # Query understanding (intent classification, rewrite)
28+
├── vectorless-index/ # Compile pipeline (10-stage, checkpointing, incremental update)
29+
├── vectorless-agent/ # Retrieval execution (Worker navigation + Orchestrator fusion)
30+
├── vectorless-retrieval/ # Retrieval dispatch layer (dispatcher, cache, streaming)
31+
├── vectorless-rerank/ # Result reranking (dedup, BM25 scoring, fusion)
32+
├── vectorless-engine/ # Facade (Engine, EngineBuilder) — re-exports public API
33+
└── vectorless-py/ # PyO3 bindings (compiled into Python native module)
34+
```
35+
36+
- `vectorless/` - Pure Python SDK (high-level wrappers, CLI, config loading, integrations)
37+
- `examples/` - Python examples (primary, for Python ecosystem)
3238
- `docs/` - Docusaurus documentation site
33-
- `samples/` - Sample files
39+
40+
### Dependency Layers
41+
42+
```
43+
Layer 0: error · document · utils · scoring (no workspace deps)
44+
Layer 1: graph · events · config · metrics (depends on Layer 0)
45+
Layer 2: llm · storage (depends on Layer 0–1)
46+
Layer 3: query (depends on Layer 0–2)
47+
Layer 4: index · agent (depends on Layer 0–3)
48+
Layer 5: retrieval · rerank (depends on Layer 0–4)
49+
Layer 6: engine (facade) · vectorless-py (bindings) (depends on all)
50+
```
51+
52+
### Compilation Isolation
53+
54+
改一个模块只重编译该 crate + 上游 facade:
55+
-`agent` → agent, retrieval, rerank, engine, py 重编译;index/llm/storage 不动
56+
-`llm` → llm 及其上层重编译;index/agent/stage 不重编译
57+
-`document` → 全部重编译(核心类型,预期行为)
3458

3559
### Retrieval Call Flow
3660

3761
```
38-
Engine.query()
62+
Engine.ask()
3963
→ retrieval/dispatcher
4064
→ query/understand() → QueryPlan (LLM intent + concepts + strategy)
4165
→ Orchestrator (always, single or multi-doc)
@@ -49,16 +73,17 @@ Engine.query()
4973
## Build Commands
5074

5175
```bash
52-
# Rust core
53-
cd rust
54-
cargo build # Build
55-
cargo test # Run tests
76+
# Build (workspace)
77+
cargo build # Build all crates
78+
cargo test # Run tests (488 tests across all crates)
5679
cargo clippy # Lint
5780
cargo fmt # Format code
5881

82+
# Build specific crate (fast — only that crate + dependents)
83+
cargo build -p vectorless-agent
84+
5985
# Python SDK
60-
cd python
61-
pip install -e . # Install in editable mode
86+
pip install -e . # Install in editable mode (from project root, uses maturin)
6287

6388
# Docs site
6489
cd docs
@@ -145,7 +170,9 @@ When uncertain whether an operation is safe, **default to asking user confirmati
145170

146171
## Common Development Workflow
147172

148-
1. **Adding features**: Implement in appropriate `rust/src/` module, add tests
173+
1. **Adding features**: Implement in the appropriate `vectorless-core/vectorless-*/` crate, add tests
149174
2. **Fixing bugs**: Add failing test case first, fix and ensure tests pass
150-
3. **Python bindings**: Update `python/src/lib.rs` (PyO3) when Rust APIs change
151-
4. **Committing code**: Use semantic commit messages, format: `type(scope): description`
175+
3. **Adding crates**: New modules get their own crate under `vectorless-core/`, add to workspace Cargo.toml
176+
4. **Python bindings**: Update `vectorless-core/vectorless-py/src/lib.rs` (PyO3) when Rust APIs change
177+
5. **Python SDK**: Update `vectorless/` when API surface changes
178+
6. **Committing code**: Use semantic commit messages, format: `type(scope): description`

Cargo.toml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
[workspace]
2-
members = ["rust", "python"]
2+
members = [
3+
"vectorless-core/vectorless-error",
4+
"vectorless-core/vectorless-document",
5+
"vectorless-core/vectorless-config",
6+
"vectorless-core/vectorless-utils",
7+
"vectorless-core/vectorless-scoring",
8+
"vectorless-core/vectorless-graph",
9+
"vectorless-core/vectorless-events",
10+
"vectorless-core/vectorless-metrics",
11+
"vectorless-core/vectorless-llm",
12+
"vectorless-core/vectorless-storage",
13+
"vectorless-core/vectorless-query",
14+
"vectorless-core/vectorless-index",
15+
"vectorless-core/vectorless-agent",
16+
"vectorless-core/vectorless-retrieval",
17+
"vectorless-core/vectorless-rerank",
18+
"vectorless-core/vectorless-engine",
19+
"vectorless-core/vectorless-py",
20+
]
321
resolver = "2"
422

523
[workspace.package]
6-
version = "0.1.32"
7-
description = "Reasoning-based Document Engine"
24+
version = "0.1.12"
25+
description = "Document Understanding Engine for AI"
826
edition = "2024"
927
authors = ["zTgx <beautifularea@gmail.com>"]
1028
license = "Apache-2.0"

HISTORY.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# HISTORY
2+
3+
## 0.1.11 (2026-04-21)
4+
5+
- Project description updated to "reasoning-based document engine"
6+
- Core principles documentation (Reason don't vector, Model fails we fail, No thought no answer)
7+
- Updated homepage with three core principles and key features
8+
9+
## 0.1.10 (2026-04-21)
10+
11+
- Description generation enabled by default
12+
- `timeout_secs` option for Python indexing
13+
- Agent-based navigation documentation
14+
15+
## 0.1.9 (2026-04-20)
16+
17+
- **Agent-based retrieval architecture**: replaced pilot/search with Orchestrator + Workers
18+
- Navigation commands: `ls`, `cd`, `cat`, `grep`, `find`, `head`, `pwd`, `wc`
19+
- Orchestrator supervisor loop with dynamic re-planning
20+
- Query understanding pipeline with `QueryPlan`
21+
- Evidence evaluation and replanning modules
22+
- `NavigationIndex` with `DocCard` and `SectionCard`
23+
- LLM-based confidence scoring (replaced BM25)
24+
- Unified rerank pipeline (replaced synthesis/fusion)
25+
- `DocCard` catalog in workspace storage
26+
- Shared concurrency control for LLM clients
27+
- Memoization for LLM operations in retrieval pipeline
28+
- LLM request timeout configuration
29+
30+
## 0.1.8 (2026-04-16)
31+
32+
- GitHub Actions workflow for automated releases
33+
- Endpoint parameter support for API configuration
34+
- Custom config option in `EngineBuilder`
35+
- Enhanced error messages with detailed failure info
36+
- Endpoint validation in engine builder
37+
38+
## 0.1.7 (2026-04-15)
39+
40+
- Runtime metrics reports (LLM, Pilot, Retrieval)
41+
- Recursive option for `from_dir` method
42+
- Directory indexing support via `IndexContext`
43+
- Centralized `LlmPool` configuration system
44+
- Shared LLM client injected into pipeline context
45+
- Pipeline checkpoint for resumable indexing
46+
- `source_path` field and updated `QueryContext` API
47+
48+
## 0.1.6 (2026-04-15)
49+
50+
- `IndexMetrics` binding with detailed indexing statistics
51+
- `StrategyPreference` for controlling retrieval strategies
52+
- Pure Pilot search algorithm, beam search with backtracking
53+
- Per-step reasoning support in search algorithms
54+
- Binary pruning and pre-filtering for wide nodes
55+
- LLM-based query complexity detection
56+
- Cross-document strategy with graph-based boosting
57+
- Synonym expansion for improved query recall
58+
- Default summary strategy changed to Full
59+
60+
## 0.1.4 (2026-04-13)
61+
62+
- PDF parser: switch to `pdf-extract` for reliable text extraction
63+
- Concurrent LLM verification for TOC entries
64+
- PDF indexing example
65+
66+
## 0.1.3 (2026-04-13)
67+
68+
- Internal module naming cleanup (`_` prefix for private functions)
69+
70+
## 0.1.2 (2026-04-13)
71+
72+
- Search-from functionality and ToC-based navigation
73+
- Reasoning chain (replacing navigation trace)
74+
- Adaptive budget controller for pipeline token management
75+
- Structural path constraints and hints extraction
76+
- Reasoning index for fast retrieval path resolution
77+
- Document graph system for cross-document relationships
78+
- Streaming retrieval with `RetrieveEvent` support
79+
- Multi-document query support
80+
- Incremental indexing with content and logic fingerprinting
81+
- Parallel processing for multiple document sources
82+
- Pipeline checkpoint and content merging/splitting support
83+
84+
## 0.1.1 (2026-04-08)
85+
86+
- Workspace-managed dependencies and configuration
87+
- LLM pilot functionality and summary generation
88+
- Query decomposition support
89+
- LLM-first search with TOC-based location
90+
- Restructured Python examples
91+
92+
## 0.1.0 (2026-04-07)
93+
94+
Initial Python SDK release.
95+
96+
- PyO3 bindings for the Rust engine core
97+
- Basic `Engine` class with `index()` and `query()` methods
98+
- `pyproject.toml` with maturin build backend
99+
- Ruff formatting configuration

examples/batch_indexing/README.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)