vectorless 0.1.8

Hierarchical, reasoning-native document intelligence engine
Documentation

Vectorless

Crates.io Downloads Documentation License Rust

A hierarchical, reasoning-native document intelligence engine.

Why Vectorless?

Traditional RAG systems have a fundamental problem: they lose document structure.

When you chunk a document into vectors, you lose:

  • The hierarchical relationship between sections
  • The context of where information lives
  • The ability to navigate based on reasoning

Vectorless takes a different approach:

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.

Result: More accurate retrieval with zero infrastructure complexity.

How It Works

Architecture

Vectorless preserves your document's hierarchical structure and uses a multi-stage pipeline for intelligent retrieval:

Index Pipeline

Transforms documents into a navigable tree structure:

  1. Parse — Parse documents (Markdown, PDF, DOCX, HTML) into structured content
  2. Build — Construct document tree with metadata
  3. Enhance — Add table of contents and section detection
  4. Enrich — Generate AI summaries for tree nodes
  5. Optimize — Optimize tree structure for efficient retrieval

Retrieval Pipeline

Uses adaptive, multi-stage retrieval with backtracking:

  1. Analyze — Detect query complexity, extract keywords
  2. Plan — Select optimal strategy (keyword/semantic/LLM) and algorithm
  3. Search — Execute tree traversal (greedy/beam/MCTS)
  4. Judge — Evaluate sufficiency, trigger backtracking if needed

This mimics how humans navigate documentation: skim the TOC, drill into relevant sections, and backtrack when needed.

Comparison

Aspect Vectorless Traditional RAG
Infrastructure Zero Vector DB + Embedding Model
Setup Time Minutes Hours to Days
Reasoning Native navigation Similarity search only
Document Structure Preserved Lost in chunking
Incremental Updates Supported Full re-index required
Debugging Traceable navigation path Black box similarity scores
Best For Structured documents Unstructured text

Installation

Add to your Cargo.toml:

[dependencies]
vectorless = "0.1"

Quick Start

Create a configuration file vectorless.toml in your project root:

cp config.example.toml vectorless.toml

Basic usage:

use vectorless::client::{Engine, EngineBuilder};

#[tokio::main]
async fn main() -> vectorless::domain::Result<()> {
    // Create client
    let client = EngineBuilder::new()
        .with_workspace("./workspace")
        .build()?;

    // Index a document
    let doc_id = client.index("./document.md").await?;

    // Query
    let result = client.query(&doc_id, "What is this about?").await?;
    println!("{}", result.content);

    Ok(())
}

Examples

Document Q&A

use vectorless::client::{Engine, EngineBuilder};

#[tokio::main]
async fn main() -> vectorless::domain::Result<()> {
    let client = EngineBuilder::new()
        .with_workspace("./workspace")
        .build()?;

    // Index a technical manual
    let doc_id = client.index("./manual.md").await?;

    // Ask questions - LLM navigates the tree structure
    let answer = client.query(&doc_id, "How do I configure authentication?").await?;
    println!("Answer: {}", answer.content);

    Ok(())
}

Multi-Document Workspace

use vectorless::client::{Engine, EngineBuilder};

#[tokio::main]
async fn main() -> vectorless::domain::Result<()> {
    let client = EngineBuilder::new()
        .with_workspace("./docs_workspace")
        .build()?;

    // Index multiple documents
    let doc1 = client.index("./docs/api.md").await?;
    let doc2 = client.index("./docs/tutorial.md").await?;
    let doc3 = client.index("./docs/reference.md").await?;

    // List all indexed documents
    let docs = client.list_documents();
    for doc in docs {
        println!("{}: {} ({} pages)", doc.id, doc.name, doc.page_count);
    }

    Ok(())
}

Custom Configuration

use vectorless::client::{Engine, EngineBuilder};
use vectorless::config::Config;

#[tokio::main]
async fn main() -> vectorless::domain::Result<()> {
    // Load configuration from file
    let config = Config::load("./vectorless.toml")?;

    let client = EngineBuilder::new()
        .with_workspace("./workspace")
        .with_config(config)
        .build()?;

    // Use the client...

    Ok(())
}

Architecture

Architecture

Contributing

Contributions are welcome!

If you find this project useful, please consider giving it a star on GitHub — it helps others discover it and supports ongoing development.

Star History

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.