Skip to content

Commit f33b0de

Browse files
committed
docs(readme): update documentation with clearer explanations and new diagrams
- Replace verbose description with concise warning about early development - Change "Why Vectorless?" to "What is Vectorless?" with clearer value proposition - Update architecture explanation with step-by-step process - Add comparison table showing Traditional RAG vs Vectorless - Include example input/output demonstration - Restructure quick start with better code examples - Add feature matrix highlighting key capabilities - Create new comparison diagram (docs/design/comparison.svg) showing Traditional RAG vs Vectorless approaches - Redesign how-it-works diagram (docs/design/how-it-works.svg) with 4-step visual flow - Update installation and usage instructions - Revise contributing guidelines with simplified text
1 parent e0f3313 commit f33b0de

3 files changed

Lines changed: 301 additions & 123 deletions

File tree

README.md

Lines changed: 90 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -8,105 +8,102 @@
88
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
99
[![Rust](https://img.shields.io/badge/rust-1.85%2B-orange.svg)](https://www.rust-lang.org/)
1010

11-
1211
</div>
1312

14-
Ultra performant document intelligence engine for RAG, with written in **Rust**. Zero vector database, zero embedding model — just LLM-powered tree navigation. Incremental indexing and multi-format support out-of-box.
15-
16-
**Early Development**: This project is in active development. The API and features are likely to evolve, and breaking changes may occur.
17-
13+
> ⚠️ **Early Development** — API may change. Not recommended for production yet.
1814
19-
## Why Vectorless?
15+
## What is Vectorless?
2016

21-
Traditional RAG systems have a fundamental problem: **they lose document structure.**
17+
**Vectorless** is a Rust library for querying structured documents using natural language — without vector databases or embedding models.
2218

23-
When you chunk a document into vectors, you lose:
24-
- The hierarchical relationship between sections
25-
- The context of where information lives
26-
- The ability to navigate based on reasoning
19+
Instead of chunking documents into vectors, Vectorless preserves the document's tree structure and uses an LLM to navigate it — like how a human reads a table of contents.
2720

28-
**Vectorless takes a different approach:**
29-
30-
It preserves your document's tree structure and uses an LLM to navigate it — just like a human would skim a table of contents, then drill into relevant sections.
31-
32-
**Result:** More accurate retrieval with zero infrastructure complexity.
21+
**Analogy:** Traditional RAG is like searching every word in a book. Vectorless is like reading the table of contents, then going to the right chapter.
3322

3423
## How It Works
3524

36-
![Architecture](docs/design/how-it-works.svg)
25+
![How it works](docs/design/how-it-works.svg)
3726

38-
**Vectorless** preserves your document's hierarchical structure and uses a multi-stage pipeline for intelligent retrieval:
27+
### 1. Index: Build a Navigable Tree
3928

40-
### Index Pipeline
29+
```
30+
Technical Manual (root)
31+
├── Chapter 1: Introduction
32+
├── Chapter 2: Architecture
33+
│ ├── 2.1 System Design
34+
│ └── 2.2 Implementation
35+
└── Chapter 3: API Reference
36+
```
4137

42-
Transforms documents into a navigable tree structure:
38+
Each node gets an AI-generated summary, enabling fast navigation.
4339

44-
1. **Parse** — Parse documents (Markdown, PDF, DOCX, HTML) into structured content
45-
2. **Build** — Construct document tree with metadata
46-
3. **Enhance** — Add table of contents and section detection
47-
4. **Enrich** — Generate AI summaries for tree nodes
48-
5. **Optimize** — Optimize tree structure for efficient retrieval
40+
### 2. Query: Navigate with LLM
4941

50-
### Retrieval Pipeline
42+
When you ask "How do I reset the device?":
5143

52-
Uses adaptive, multi-stage retrieval with backtracking:
44+
1. **Analyze** — Understand query intent and complexity
45+
2. **Navigate** — LLM guides tree traversal (like reading a TOC)
46+
3. **Retrieve** — Return the exact section with context
47+
4. **Verify** — Check if more information is needed (backtracking)
5348

54-
1. **Analyze** — Detect query complexity, extract keywords
55-
2. **Plan** — Select optimal strategy (keyword/semantic/LLM) and algorithm
56-
3. **Search** — Execute tree traversal (greedy/beam/MCTS)
57-
4. **Judge** — Evaluate sufficiency, trigger backtracking if needed
49+
## Traditional RAG vs Vectorless
5850

59-
This mimics how humans navigate documentation: skim the TOC, drill into relevant sections, and backtrack when needed.
51+
![Traditional RAG vs Vectorless](docs/design/comparison.svg)
6052

61-
### Pilot: The Brain
53+
| Aspect | Traditional RAG | Vectorless |
54+
|--------|----------------|------------|
55+
| **Infrastructure** | Vector DB + Embedding Model | Just LLM API |
56+
| **Document Structure** | Lost in chunking | Preserved |
57+
| **Context** | Fragment only | Section + surrounding context |
58+
| **Setup Time** | Hours to Days | Minutes |
59+
| **Best For** | Unstructured text | Structured documents |
6260

63-
**Pilot** is the intelligence layer that guides retrieval:
61+
## Example
6462

65-
- **Intervention Points** — Pilot acts at key decision moments:
66-
- **START** — Analyze query intent, set initial direction
67-
- **FORK** — Rank candidates at branch points
68-
- **BACKTRACK** — Suggest alternatives when search fails
69-
- **EVALUATE** — Assess content sufficiency
63+
**Input:**
64+
```
65+
Document: 100-page technical manual (PDF)
66+
Query: "How do I reset the device?"
67+
```
7068

71-
- **Score Merging** — Combines algorithm scores with LLM reasoning:
72-
```
73-
final_score = α × algorithm_score + β × llm_score
74-
```
69+
**Output:**
70+
```
71+
Answer: "To reset the device, hold the power button for 10 seconds
72+
until the LED flashes blue, then release..."
7573
76-
- **Fallback Strategy** — 4-level degradation (Normal → Retry → Simplified → Algorithm-only)
74+
Source: Chapter 4 > Section 4.2 > Reset Procedure
75+
```
7776

78-
- **Budget Control** — Token and call limits with intelligent allocation
77+
## When to Use
7978

80-
## Comparison
79+
**Good fit:**
80+
- Technical documentation
81+
- Manuals and guides
82+
- Structured reports
83+
- Policy documents
84+
- Any document with clear hierarchy
8185

82-
| Aspect | Vectorless | Traditional RAG |
83-
|--------|-----------|-----------------|
84-
| **Infrastructure** | Zero | Vector DB + Embedding Model |
85-
| **Setup Time** | Minutes | Hours to Days |
86-
| **Reasoning** | Native navigation | Similarity search only |
87-
| **Document Structure** | Preserved | Lost in chunking |
88-
| **Incremental Updates** | Supported | Full re-index required |
89-
| **Debugging** | Traceable navigation path | Black box similarity scores |
90-
| **Best For** | Structured documents | Unstructured text |
86+
**Not ideal:**
87+
- Unstructured text (tweets, chat logs)
88+
- Very short documents (< 1 page)
89+
- Pure Q&A datasets without structure
9190

92-
## Installation
91+
## Quick Start
9392

94-
Add to your `Cargo.toml`:
93+
### Installation
9594

9695
```toml
9796
[dependencies]
9897
vectorless = "0.1"
9998
```
10099

101-
## Quick Start
102-
103-
Create a configuration file `vectorless.toml` in your project root:
100+
### Configuration
104101

105102
```bash
106103
cp vectorless.example.toml ./vectorless.toml
107104
```
108105

109-
Basic usage:
106+
### Usage
110107

111108
```rust
112109
use vectorless::Engine;
@@ -116,33 +113,52 @@ async fn main() -> vectorless::Result<()> {
116113
// Create client
117114
let client = Engine::builder()
118115
.with_workspace("./workspace")
119-
.build()
120-
.map_err(|e| vectorless::Error::Config(e.to_string()))?;
116+
.build()?;
117+
118+
// Index a document (PDF, Markdown, DOCX, HTML)
119+
let doc_id = client.index("./document.pdf").await?;
121120

122-
// Index a document
123-
let doc_id = client.index("./document.md").await?;
121+
// Query with natural language
122+
let result = client.query(&doc_id, "What are the system requirements?").await?;
124123

125-
// Query
126-
let result = client.query(&doc_id, "What is this about?").await?;
127-
println!("{}", result.content);
124+
println!("Answer: {}", result.content);
125+
println!("Source: {}", result.path); // e.g., "Chapter 2 > Section 2.1"
128126

129127
Ok(())
130128
}
131129
```
132130

133-
## Examples
131+
## Features
132+
133+
| Feature | Description |
134+
|---------|-------------|
135+
| **Zero Infrastructure** | No vector DB, no embedding model — just an LLM API |
136+
| **Multi-format Support** | PDF, Markdown, DOCX, HTML out of the box |
137+
| **Incremental Updates** | Add/remove documents without full re-index |
138+
| **Traceable Results** | See the exact navigation path taken |
139+
| **Feedback Learning** | Improves from user feedback over time |
140+
| **Multi-turn Queries** | Handles complex questions with decomposition |
134141

135-
See the [examples/](examples/) directory for complete working examples.
142+
---
136143

137144
## Architecture
145+
138146
![Architecture](docs/design/architecture.svg)
139147

148+
### Core Components
140149

141-
## Contributing
150+
- **Index Pipeline** — Parses documents, builds tree, generates summaries
151+
- **Retrieval Pipeline** — Analyzes query, navigates tree, returns results
152+
- **Pilot** — LLM-powered navigator that guides retrieval decisions
153+
- **Metrics Hub** — Unified observability for LLM calls, retrieval, and feedback
154+
155+
## Examples
142156

143-
Contributions are welcome!
157+
See the [examples/](examples/) directory.
158+
159+
## Contributing
144160

145-
If you find this project useful, please consider giving it a star on [GitHub](https://github.com/vectorlessflow/vectorless) — it helps others discover it and supports ongoing development.
161+
Contributions welcome! If you find this useful, please ⭐ the repo — it helps others discover it.
146162

147163
## Star History
148164

@@ -156,4 +172,4 @@ If you find this project useful, please consider giving it a star on [GitHub](ht
156172

157173
## License
158174

159-
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
175+
Apache License 2.0

docs/design/comparison.svg

Lines changed: 134 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)