Skip to content

Commit 23ea873

Browse files
authored
Merge pull request #98 from vectorlessflow/dev
Dev
2 parents 8e30a04 + 40829e2 commit 23ea873

5 files changed

Lines changed: 316 additions & 55 deletions

File tree

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Vectorless is a reasoning-native document intelligence engine written in Rust.
44

55
## Principles
66

7-
- **Reason, don't vector.** — Every retrieval decision is an LLM decision.
8-
- **Model fails, we fail.** No silent degradation. No heuristic fallbacks.
9-
- **No thought, no answer.** Only LLM-reasoned output counts as an answer.
7+
- **Reason, don't vector.** Retrieval is a reasoning act, not a similarity computation.
8+
- **Model fails, we fail.** No heuristic fallbacks, no silent degradation.
9+
- **No thought, no answer.** Only reasoned output counts as an answer.
1010

1111
## Project Structure
1212

README.md

Lines changed: 92 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<img src="https://vectorless.dev/img/with-title.png" alt="Vectorless" width="400">
44

55
<h1>Reasoning-based Document Engine</h1>
6+
<h5>Reason, don't vector · Structure, not chunks · Agents, not embeddings · Exact, not synthesized</h5>
67

78
[![PyPI](https://img.shields.io/pypi/v/vectorless.svg)](https://pypi.org/project/vectorless/)
89
[![PyPI Downloads](https://static.pepy.tech/badge/vectorless/month)](https://pepy.tech/projects/vectorless)
@@ -13,10 +14,79 @@
1314

1415
</div>
1516

16-
**Reason, don't vector.**
17+
**Vectorless** is a reasoning-native document engine written in Rust. It compiles documents into navigable trees, then dispatches **multiple agents** to find exactly what's relevant across your **PDFs, Markdown, reports, contracts**. No embeddings, no chunking, no approximate nearest neighbors. Every retrieval is a **reasoning** act.
1718

18-
**Vectorless** is a reasoning-based document engine with the core written in Rust. It will reason through any of your structured documents — **PDFs, Markdown, reports, contracts** — and retrieve only what's relevant. Nothing more, nothing less.
19+
Light up a star and shine with us! ⭐
1920

21+
## Three Rules
22+
- **Reason, don't vector.** Retrieval is a reasoning act, not a similarity computation.
23+
- **Model fails, we fail.** No heuristic fallbacks, no silent degradation.
24+
- **No thought, no answer.** Only reasoned output counts as an answer.
25+
26+
## Why Vectorless
27+
28+
Traditional RAG systems split documents into chunks, embed them into vectors, and retrieve by similarity. Vectorless takes a different approach: it preserves document structure as a navigable tree and lets agents reason through it.
29+
30+
| | Embedding-Based RAG | Vectorless |
31+
|---|---|---|
32+
| **Indexing** | Chunk → embed → vector store | Parse → compile → document tree |
33+
| **Retrieval** | Cosine similarity (approximate) | Multi-agent navigation (exact) |
34+
| **Structure** | Destroyed by chunking | Preserved as first-class tree |
35+
| **Query handling** | Keyword/similarity match | Intent classification + decomposition |
36+
| **Multi-hop reasoning** | Not supported | Orchestrator replans dynamically |
37+
| **Output** | Retrieved chunks | Original text passages, exact |
38+
| **Failure mode** | Silent degradation | Explicit — no reasoning, no answer |
39+
40+
## How It Works
41+
42+
### Four-Artifact Index Architecture
43+
44+
When a document is indexed, the compile pipeline builds four artifacts:
45+
46+
```
47+
Content Layer Navigation Layer Reasoning Index Document Card
48+
DocumentTree NavigationIndex ReasoningIndex DocCard
49+
(TreeNode) (NavEntry, ChildRoute) (topic_paths, hot_nodes) (title, overview,
50+
│ │ │ question hints)
51+
│ │ │ │
52+
Agent reads Agent reads every Agent's targeted Orchestrator reads
53+
only on cat decision round search tool (grep) for multi-doc routing
54+
```
55+
56+
- **Content Layer** — The raw document tree. The agent only accesses this when reading specific paragraphs (`cat`).
57+
- **Navigation Layer** — Each non-leaf node stores an overview, question hints, and child routes (title + description). The agent reads this every round to decide where to go next.
58+
- **Reasoning Index** — Keyword-topic mappings with weights. Provides the agent's `grep` tool with structured keyword data for targeted search within a document.
59+
- **DocCard** — A compact document-level summary. The Orchestrator reads DocCards to decide which documents to navigate in multi-document queries, without loading full documents.
60+
61+
This separation means the agent makes routing decisions from lightweight metadata, not by scanning full content.
62+
63+
### Agent-Based Retrieval
64+
65+
```
66+
Engine.query("What drove the revenue decline?")
67+
68+
├─ Query Understanding ── intent, concepts, strategy (LLM)
69+
70+
├─ Orchestrator ── analyzes query, dispatches Workers
71+
│ │
72+
│ ├─ Worker 1 ── ls → cd "Financials" → ls → cd "Revenue" → cat
73+
│ └─ Worker 2 ── ls → cd "Risk Factors" → grep "decline" → cat
74+
│ │
75+
│ └─ evaluate ── insufficient? → replan → dispatch new paths → loop
76+
77+
└─ Fusion ── dedup, LLM-scored relevance, return with source attribution
78+
```
79+
80+
Worker navigation commands:
81+
82+
| Command | Action | Reads |
83+
|---------|--------|-------|
84+
| `ls` | List child sections | Navigation Layer (ChildRoute) |
85+
| `cd` | Enter a child section | Navigation Layer |
86+
| `cat` | Read content at current node | Content Layer (DocumentTree) |
87+
| `grep` | Search by keyword | Reasoning Index (topic_paths) |
88+
89+
The Orchestrator evaluates Worker results after each round. If evidence is insufficient, it **replans** — adjusting strategy, dispatching new paths, or deepening exploration. This continues until enough evidence is collected.
2090

2191
## Quick Start
2292

@@ -44,19 +114,30 @@ async def main():
44114
asyncio.run(main())
45115
```
46116

47-
## What It's For
117+
## Key Features
118+
119+
- **Rust Core** — The entire engine (indexing, retrieval, agent, storage) is implemented in Rust for performance and reliability. Python SDK via PyO3 bindings and a CLI are also provided.
120+
- **Multi-Agent Retrieval** — Every query is handled by multiple cooperating agents: an Orchestrator plans and evaluates, Workers navigate documents. Each retrieval is a reasoning act — not a similarity score, but a sequence of LLM decisions about where to look, what to read, and when to stop.
121+
- **Zero Vectors** — No embedding model, no vector store, no similarity search. This eliminates a class of failure modes: wrong chunk boundaries, stale embeddings, and similarity-score false positives.
122+
- **Tree Navigation** — Documents are compiled into hierarchical trees that preserve the original structure — headings, sections, paragraphs, lists. Workers navigate this tree the way a human would: scan the table of contents, jump to the relevant section, read the passage.
123+
- **Document-Exact Output** — Returns original text passages from the source document. No synthesis, no rewriting, no hallucinated content. What you get is what was written.
124+
- **Multi-Document Orchestration** — Query across multiple documents with a single call. The Orchestrator dispatches Workers, evaluates evidence, and fuses results. When one document is insufficient, it replans and expands the search scope.
125+
- **Query Understanding** — Every query passes through LLM-based intent classification, concept extraction, and strategy selection. Complex queries are decomposed into sub-queries. The system adapts its navigation strategy based on whether the query is factual, analytical, comparative, or navigational.
126+
- **Checkpointable Pipeline** — The 8-stage compile pipeline writes checkpoints at each stage. If indexing is interrupted (LLM rate limit, network failure), it resumes from the last completed stage — no wasted work.
127+
- **Incremental Updates** — Content fingerprinting detects changes at the node level. Re-indexing a modified document only recompiles the changed sections and their dependents.
48128

49-
Vectorless is designed for applications that need **precise** document retrieval:
129+
## Supported Documents
50130

51-
- **Financial analysis** — Extract specific figures from reports, compare across filings
52-
- **Legal research** — Find relevant clauses, trace definitions across documents
53-
- **Technical documentation** — Navigate large manuals, locate specific procedures
54-
- **Academic research** — Cross-reference findings across papers
55-
- **Compliance** — Audit trails with source references for every answer
131+
- **PDF** — Full text extraction with page metadata
132+
- **Markdown** — Structure-aware parsing (headings, lists, code blocks)
56133

57-
## Examples
134+
## Resources
58135

59-
See [examples/](examples/) for complete usage patterns.
136+
- [Documentation](https://vectorless.dev) — Guides, architecture, API reference
137+
- [Rust API Docs](https://docs.rs/vectorless) — Auto-generated crate documentation
138+
- [PyPI](https://pypi.org/project/vectorless/) — Python package
139+
- [Crates.io](https://crates.io/crates/vectorless) — Rust crate
140+
- [Examples](examples/) — Complete usage patterns for Python and Rust
60141

61142
## Contributing
62143

docs/docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type * as Preset from '@docusaurus/preset-classic';
66

77
const config: Config = {
88
title: 'Vectorless',
9-
tagline: 'Reasoning-native Document Intelligence Engine',
9+
tagline: 'Reasoning-based Document Engine',
1010
favicon: 'img/favicon.ico',
1111

1212
future: {

docs/src/pages/index.module.css

Lines changed: 122 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,45 @@
7878
flex-wrap: wrap;
7979
}
8080

81+
/* ===== Three Rules ===== */
82+
.rulesRow {
83+
display: flex;
84+
gap: 1.5rem;
85+
justify-content: center;
86+
flex-wrap: wrap;
87+
max-width: 1000px;
88+
margin: 0 auto;
89+
}
90+
91+
.ruleCard {
92+
flex: 1;
93+
min-width: 240px;
94+
max-width: 320px;
95+
background: var(--card-bg);
96+
border: 1px solid var(--border);
97+
border-radius: 16px;
98+
padding: 2.25rem 2rem;
99+
text-align: center;
100+
}
101+
102+
.ruleTitle {
103+
font-size: 1.1rem;
104+
font-weight: 700;
105+
color: var(--primary-dark);
106+
margin-bottom: 0.75rem;
107+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
108+
}
109+
110+
[data-theme='dark'] .ruleTitle {
111+
color: var(--primary);
112+
}
113+
114+
.ruleDesc {
115+
font-size: 0.92rem;
116+
line-height: 1.65;
117+
color: var(--text-light);
118+
}
119+
81120
/* GitHub Star button */
82121
.githubStarButton {
83122
display: inline-flex;
@@ -392,10 +431,72 @@
392431
background: #D97706;
393432
}
394433

434+
/* ===== Format Pills ===== */
435+
.formatPills {
436+
display: flex;
437+
justify-content: center;
438+
gap: 0.75rem;
439+
margin-bottom: 2rem;
440+
}
441+
442+
.formatPill {
443+
display: inline-flex;
444+
align-items: center;
445+
padding: 0.35rem 1rem;
446+
border-radius: 20px;
447+
font-size: 0.8rem;
448+
font-weight: 600;
449+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
450+
letter-spacing: -0.2px;
451+
background: var(--primary-soft);
452+
color: var(--primary-dark);
453+
border: 1px solid var(--primary);
454+
}
455+
456+
[data-theme='dark'] .formatPill {
457+
color: var(--primary);
458+
}
459+
460+
/* ===== Key Features Grid ===== */
461+
.featureGrid {
462+
display: grid;
463+
grid-template-columns: repeat(3, 1fr);
464+
gap: 1.5rem;
465+
max-width: 1100px;
466+
margin: 0 auto;
467+
}
468+
469+
.featureCard {
470+
background: var(--card-bg);
471+
border: 1px solid var(--border);
472+
border-radius: 16px;
473+
padding: 2rem 1.75rem;
474+
transition: border-color 0.2s, box-shadow 0.2s;
475+
}
476+
477+
.featureCard:hover {
478+
border-color: var(--primary);
479+
box-shadow: 0 4px 20px rgba(245, 158, 11, 0.08);
480+
}
481+
482+
.featureTitle {
483+
font-size: 1.1rem;
484+
font-weight: 700;
485+
color: var(--text);
486+
margin: 0 0 0.75rem;
487+
}
488+
489+
.featureDesc {
490+
font-size: 0.92rem;
491+
line-height: 1.65;
492+
color: var(--text-light);
493+
margin: 0;
494+
}
495+
395496
/* ===== Navigation Theater ===== */
396497
.narrativeDemo {
397-
background: var(--code-bg);
398-
border: 1px solid var(--border);
498+
background: #161A1F;
499+
border: 1px solid #252A30;
399500
border-radius: 16px;
400501
padding: 2rem 2.5rem;
401502
max-width: 780px;
@@ -440,7 +541,7 @@
440541
top: 24px;
441542
bottom: 24px;
442543
width: 2px;
443-
background: #2A3040;
544+
background: #252A30;
444545
border-radius: 1px;
445546
}
446547

@@ -473,7 +574,7 @@
473574
height: 10px;
474575
border-radius: 50%;
475576
background: var(--primary);
476-
border: 2px solid var(--code-bg);
577+
border: 2px solid #161A1F;
477578
z-index: 1;
478579
}
479580

@@ -787,6 +888,10 @@
787888
.section {
788889
padding: 3.5rem 1.5rem;
789890
}
891+
892+
.featureGrid {
893+
grid-template-columns: repeat(2, 1fr);
894+
}
790895
}
791896

792897
@media screen and (max-width: 600px) {
@@ -826,4 +931,17 @@
826931
.sectionTitle {
827932
font-size: 1.5rem;
828933
}
934+
935+
.featureGrid {
936+
grid-template-columns: 1fr;
937+
}
938+
939+
.rulesRow {
940+
flex-direction: column;
941+
align-items: center;
942+
}
943+
944+
.ruleCard {
945+
max-width: 100%;
946+
}
829947
}

0 commit comments

Comments
 (0)