vectorless 0.1.21

Hierarchical, reasoning-native document intelligence engine
Documentation

PyPI Python PyPI Downloads Crates.io Crates.io Downloads Docs License Rust

Vectorless is an ultra-performant reasoning-native document intelligence engine for AI, with the core written in Rust. It transforms documents into rich semantic trees and uses LLMs to intelligently traverse the hierarchy — retrieving the most relevant content through structural reasoning and deep contextual understanding.

Quick Start

Install

pip install vectorless

Set your API key

export OPENAI_API_KEY="sk-..."

Index and Query

from vectorless import Engine, IndexContext

# Create engine with a workspace directory
engine = Engine(workspace="./data")

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

# Query
result = engine.query(doc_id, "What is the total revenue?")
print(result.content)
print(f"Score: {result.score}")
[dependencies]
vectorless = "0.1"
use vectorless::client::{EngineBuilder, IndexContext, QueryContext};

#[tokio::main]
async fn main() -> vectorless::Result<()> {
    let engine = EngineBuilder::new()
        .with_workspace("./data")
        .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

License

Apache License 2.0