Skip to content

Commit 879c17d

Browse files
authored
Merge pull request #23 from vectorlessflow/dev
Dev
2 parents 665ce4d + 62c7928 commit 879c17d

198 files changed

Lines changed: 1556 additions & 40 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.

.gitignore

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,32 @@ config.toml
5353
.vectorless.toml
5454

5555
# Test fixtures
56-
test_workspace/
56+
test_workspace/
57+
58+
# Python
59+
__pycache__/
60+
*.py[cod]
61+
*$py.class
62+
*.so
63+
.Python
64+
build/
65+
develop-eggs/
66+
dist/
67+
downloads/
68+
eggs/
69+
.eggs/
70+
lib/
71+
lib64/
72+
parts/
73+
sdist/
74+
var/
75+
wheels/
76+
*.egg-info/
77+
.installed.cfg
78+
*.egg
79+
.pytest_cache/
80+
.mypy_cache/
81+
.ruff_cache/
82+
.venv/
83+
venv/
84+
ENV/

Cargo.toml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
[package]
2-
name = "vectorless"
1+
[workspace]
2+
members = ["rust", "python"]
3+
resolver = "2"
4+
5+
[workspace.package]
36
version = "0.1.19"
47
edition = "2024"
58
authors = ["zTgx <beautifularea@gmail.com>"]
6-
description = "Hierarchical, reasoning-native document intelligence engine"
79
license = "Apache-2.0"
810
repository = "https://github.com/vectorlessflow/vectorless"
911
homepage = "https://vectorless.dev"
1012
documentation = "https://docs.rs/vectorless"
11-
keywords = ["rag", "document", "retrieval", "indexing", "llm"]
12-
categories = ["text-processing", "data-structures", "algorithms"]
13-
readme = "README.md"
14-
exclude = ["samples/", "docs/", ".*"]
1513

16-
[dependencies]
14+
[workspace.dependencies]
1715
# Async runtime
1816
tokio = { version = "1", features = ["full"] }
1917
async-trait = "0.1"
@@ -26,7 +24,7 @@ toml = "0.8"
2624

2725
# Error handling
2826
thiserror = "2"
29-
anyhow = { version = "1", optional = true }
27+
anyhow = "1"
3028

3129
# OpenAI-compatible API client
3230
async-openai = { version = "0.34", features = ["chat-completion"] }
@@ -62,18 +60,17 @@ lru = "0.12"
6260
# Checksum
6361
sha2 = "0.10"
6462

65-
# BLAKE2b hashing for fingerprints
63+
# BLAKE2b hashing
6664
blake2 = "0.10"
6765
base64 = "0.22"
6866

69-
# Synchronization primitives (for memo store)
67+
# Synchronization primitives
7068
parking_lot = "0.12"
7169

7270
# Compression
7371
flate2 = "1.0"
7472

7573
# File locking (Unix)
76-
[target.'cfg(unix)'.dependencies]
7774
libc = "0.2"
7875

7976
# PDF processing
@@ -84,7 +81,7 @@ lopdf = "0.34"
8481
zip = "2.2"
8582
roxmltree = "0.20"
8683

87-
# Random number generation (for sampling)
84+
# Random number generation
8885
rand = "0.8"
8986

9087
# BM25 scoring
@@ -93,11 +90,23 @@ bm25 = { version = "2.3.2", features = ["parallelism"] }
9390
# HTML parsing
9491
scraper = "0.22"
9592

96-
[dev-dependencies]
93+
# Python bindings
94+
pyo3 = { version = "0.22", features = ["extension-module"] }
95+
96+
# Dev dependencies
9797
tempfile = "3.10"
9898
tokio-test = "0.4"
9999
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
100100

101+
[workspace.lints.rust]
102+
missing_docs = "warn"
103+
unsafe_code = "warn"
104+
105+
[workspace.lints.clippy]
106+
all = "warn"
107+
pedantic = "warn"
108+
109+
# Profile settings (must be at root level, not under workspace)
101110
[profile.release]
102111
opt-level = 3
103112
lto = "thin"
@@ -115,11 +124,3 @@ debug = true
115124

116125
[profile.release.package."*"]
117126
opt-level = 3
118-
119-
[lints.rust]
120-
missing_docs = "warn"
121-
unsafe_code = "warn"
122-
123-
[lints.clippy]
124-
all = "warn"
125-
pedantic = "warn"

README.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<div align="center">
22

3-
![Vectorless](docs/design/logo-horizontal.svg)
3+
<img src="https://raw.githubusercontent.com/vectorlessflow/vectorless/main/docs/design/logo-horizontal.svg" alt="Vectorless">
44

5+
[![PyPI](https://img.shields.io/pypi/v/vectorless.svg)](https://pypi.org/project/vectorless/)
6+
[![Python](https://img.shields.io/pypi/pyversions/vectorless.svg)](https://pypi.org/project/vectorless/)
7+
[![PyPI Downloads](https://static.pepy.tech/badge/vectorless/month)](https://pepy.tech/projects/vectorless)
58
[![Crates.io](https://img.shields.io/crates/v/vectorless.svg)](https://crates.io/crates/vectorless)
6-
[![Downloads](https://img.shields.io/crates/d/vectorless.svg)](https://crates.io/crates/vectorless)
7-
[![Documentation](https://docs.rs/vectorless/badge.svg)](https://docs.rs/vectorless)
9+
[![Crates.io Downloads](https://img.shields.io/crates/d/vectorless.svg)](https://crates.io/crates/vectorless)
10+
[![Docs](https://docs.rs/vectorless/badge.svg)](https://docs.rs/vectorless)
811
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
912
[![Rust](https://img.shields.io/badge/rust-1.85%2B-orange.svg)](https://www.rust-lang.org/)
1013

1114
</div>
1215

1316
## What is Vectorless?
1417

15-
**Vectorless** is a Rust library for querying structured documents using natural language — without vector databases or embedding models.
18+
**Vectorless** is a library for querying structured documents using natural language — without vector databases or embedding models. Core engine written in Rust, with Python bindings.
1619

1720
Instead of chunking documents into vectors, Vectorless preserves the document's tree structure and uses a **hybrid algorithm + LLM approach** to navigate it — like how a human reads a table of contents:
1821

@@ -22,7 +25,7 @@ Instead of chunking documents into vectors, Vectorless preserves the document's
2225

2326
## How It Works
2427

25-
![How it works](docs/design/how-it-works.svg)
28+
<img src="https://raw.githubusercontent.com/vectorlessflow/vectorless/main/docs/design/how-it-works.svg" alt="How it works">
2629

2730
### 1. Index: Build a Navigable Tree
2831

@@ -48,7 +51,7 @@ When you ask "How do I reset the device?":
4851

4952
## Traditional RAG vs Vectorless
5053

51-
![Traditional RAG vs Vectorless](docs/design/comparison.svg)
54+
<img src="https://raw.githubusercontent.com/vectorlessflow/vectorless/main/docs/design/comparison.svg" alt="Traditional RAG vs Vectorless">
5255

5356
| Aspect | Traditional RAG | Vectorless |
5457
|--------|----------------|------------|
@@ -90,44 +93,65 @@ Source: Chapter 4 > Section 4.2 > Reset Procedure
9093

9194
## Quick Start
9295

93-
### Installation
96+
<details open>
97+
<summary><b>Python</b></summary>
98+
99+
```bash
100+
pip install vectorless
101+
```
102+
103+
```python
104+
from vectorless import Engine, IndexContext
105+
106+
# Create engine (uses OPENAI_API_KEY env var)
107+
engine = Engine(workspace="./data")
108+
109+
# Index a document
110+
ctx = IndexContext.from_file("./report.pdf")
111+
doc_id = engine.index(ctx)
112+
113+
# Query
114+
result = engine.query(doc_id, "What is the total revenue?")
115+
print(f"Answer: {result.content}")
116+
```
117+
118+
</details>
119+
120+
<details>
121+
<summary><b>Rust</b></summary>
94122

95123
```toml
96124
[dependencies]
97125
vectorless = "0.1"
98126
```
99127

100-
### Configuration
101-
102128
```bash
103129
cp vectorless.example.toml ./vectorless.toml
104130
```
105131

106-
### Usage
107-
108132
```rust
109133
use vectorless::Engine;
110134

111135
#[tokio::main]
112136
async fn main() -> vectorless::Result<()> {
113-
// Create client
114137
let client = Engine::builder()
115138
.with_workspace("./workspace")
116139
.build()?;
117140

118-
// Index a document (PDF, Markdown, DOCX, HTML)
119141
let doc_id = client.index("./document.pdf").await?;
120142

121-
// Query with natural language
122-
let result = client.query(&doc_id, "What are the system requirements?").await?;
143+
let result = client.query(&doc_id,
144+
"What are the system requirements?").await?;
123145

124146
println!("Answer: {}", result.content);
125-
println!("Source: {}", result.path); // e.g., "Chapter 2 > Section 2.1"
147+
println!("Source: {}", result.path);
126148

127149
Ok(())
128150
}
129151
```
130152

153+
</details>
154+
131155
## Features
132156

133157
| Feature | Description |
@@ -142,7 +166,7 @@ async fn main() -> vectorless::Result<()> {
142166

143167
## Architecture
144168

145-
![Architecture](docs/design/architecture.svg)
169+
<img src="https://raw.githubusercontent.com/vectorlessflow/vectorless/main/docs/design/architecture.svg" alt="Architecture">
146170

147171
### Core Components
148172

0 commit comments

Comments
 (0)