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.
pip install vectorlessimport 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(())
}See examples for more and stay tuned.
Contributions welcome! If you find this useful, please ⭐ the repo — it helps others discover it.
Apache License 2.0
