Skip to main content

Crate vectorless

Crate vectorless 

Source
Expand description

§Vectorless

A reasoning-native document engine for AI.

It will reason through any of your structured documents — PDFs, Markdown, reports, contracts — and retrieve only what’s relevant. Nothing more, nothing less.

§Quick Start

use vectorless::{EngineBuilder, IndexContext, QueryContext};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let engine = EngineBuilder::new()
        .with_key("sk-...")
        .with_model("gpt-4o")
        .with_endpoint("https://api.openai.com/v1")
        .build()
        .await?;

    let result = engine.index(IndexContext::from_path("./document.md")).await?;
    let doc_id = result.doc_id().unwrap();

    let result = engine.query(
        QueryContext::new("What is this about?")
            .with_doc_ids(vec![doc_id.to_string()]),
    ).await?;
    println!("{}", result.content);

    Ok(())
}

Structs§

Config
Main configuration for vectorless.
DocumentGraph
A workspace-scoped document relationship graph.
DocumentGraphNode
A document node in the graph.
DocumentInfo
Document info for listing.
DocumentStructure
Document structure for JSON export.
DocumentTree
A hierarchical document tree structure.
EdgeEvidence
Evidence for why two documents are connected.
Engine
The main Engine client.
EngineBuilder
Builder for creating a Engine client.
EventEmitter
Event emitter for client operations.
EvidenceItem
A single piece of evidence with source attribution.
FailedItem
A failed item in a batch operation.
GraphEdge
An edge connecting two documents.
IndexContext
Context for document indexing operations.
IndexItem
A single indexed document item.
IndexMetrics
Performance metrics for the indexing pipeline.
IndexOptions
Options for indexing a document.
IndexResult
Result of a document indexing operation.
LlmMetricsReport
LLM metrics report.
MetricsReport
Complete metrics report.
NodeId
Unique identifier for a node in the document tree.
QueryContext
Context for a query operation.
QueryMetrics
Query execution metrics.
QueryResult
Result of a document query.
QueryResultItem
A single document’s query result.
ReasoningIndexConfig
Configuration for building and using the reasoning index.
RetrievalMetricsReport
Retrieval metrics report.
StructureNode
A node in the document structure for JSON export.
TocConfig
Configuration for ToC generation.
TocEntry
A flat ToC entry.
TocNode
A node in the Table of Contents.
TocView
ToC view generator.
TreeNode
A node in the Vectorless document tree.
WeightedKeyword
A keyword with its aggregate weight across the document.

Enums§

BuildError
Error during client build.
DocumentFormat
Supported document formats.
Error
The main error type for vectorless operations.
IndexEvent
Indexing operation events.
IndexMode
Document indexing behavior mode.
QueryEvent
Query operation events.
WorkspaceEvent
Workspace operation events.

Type Aliases§

Confidence
Confidence score of the query result (0.0–1.0).
Result
A specialized result type for vectorless operations.