Skip to content

vectorlessflow/vectorless

Vectorless

Reasoning-native Document Intelligence Engine

PyPI PyPI Downloads Crates.io Crates.io Downloads Docs License

Vectorless is a reasoning-native document intelligence engine written in Rust — no vector database, no embeddings, no similarity search. It transforms documents into hierarchical semantic trees and uses LLMs to navigate the structure, retrieving the most relevant content through deep contextual understanding instead of vector math.

Quick Start

Install

pip install vectorless

Index and Query

import asyncio
from vectorless import Engine, IndexContext

async def main():
    # Create engine — api_key and model are required
    engine = Engine(
        workspace="./data",
        api_key="sk-...",
        model="gpt-4o",
    )

    # Index a document (PDF or Markdown)
    result = await engine.index(IndexContext.from_file("./report.pdf"))
    doc_id = result.doc_id

    # Query
    result = await engine.query(doc_id, "What is the total revenue?")
    print(result.single().content)

asyncio.run(main())
Rust
[dependencies]
vectorless = "0.1"
use vectorless::client::{EngineBuilder, IndexContext, QueryContext};

#[tokio::main]
async fn main() -> vectorless::Result<()> {
    let engine = EngineBuilder::new()
        .with_workspace("./data")
        .with_key("sk-...")
        .with_model("gpt-4o")
        .build()
        .await?;

    // Index
    let result = engine.index(IndexContext::from_path("./report.pdf")).await?;
    let doc_id = result.doc_id().unwrap();

    // Query
    let result = engine.query(
        QueryContext::new("What is the total revenue?").with_doc_id(doc_id)
    ).await?;
    println!("Answer: {}", result.content);

    Ok(())
}

Examples

See examples for more and stay tuned.

Contributing

Contributions welcome! If you find this useful, please ⭐ the repo — it helps others discover it.

Star History

Star History Chart

License

Apache License 2.0