Skip to main content

Hierarchical document intelligence without vectors

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vectorless-0.1.6.tar.gz (389.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vectorless-0.1.6-cp310-cp310-manylinux_2_34_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file vectorless-0.1.6.tar.gz.

File metadata

  • Download URL: vectorless-0.1.6.tar.gz
  • Upload date:
  • Size: 389.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for vectorless-0.1.6.tar.gz
Algorithm Hash digest
SHA256 8e90894d5239dd719c2d4e853e1bfa3c061b76ee4c10d604d301b71ddad54d5d
MD5 cc2ad1331e71cb6701b11e3f4e1619fd
BLAKE2b-256 f6cd2f5e3002085ffa4e4f648087b125486ac8a39047c04ffa88d6b96a3f74a9

See more details on using hashes here.

File details

Details for the file vectorless-0.1.6-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for vectorless-0.1.6-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e465731d8b7c6892fd36e9ebd770d0827f1b3b0ac17f0cf1ec6f4495829a9638
MD5 55a6f9063b395adf55c6add71899b035
BLAKE2b-256 74abd7185eaeaa08b68a0615c39d9e238c068e9c789747fe4662e4c327bbc667

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page