TAPIRUSDB

Practical guide for TAP

Use TAP without guessing.

TAP has three entry points. Start in the browser, run the native CLI, or train a local adapter with Model Forge.

Choose the right route

The browser route is for trying TAP. Native Rust is for integrating it. Model Forge is for training a separate LoRA adapter.

No install

TAP Lite in browser

Classify text or compare a premise and hypothesis in Studio Lite. It runs Rust WASM in the browser.

Developer path

Native TAP

Build the TapirusDB CLI or call TapEngine and Connection::tap() from Rust.

Training path

TAP Model Forge

Run the desktop Studio with a local Python backend, a base model cache and a labelled training dataset.

What it is not

Not a hosted AI service

Nothing in TAP Lite calls a cloud model. An optional teacher API in Model Forge is a separate, consent-based path.

Try TAP Lite in five minutes

This is the shortest path. There is no package or model installation.

Open Studio Lite

Go to tapirusdb.com/studio and wait for the Rust engine status to become ready.

Classify

Enter a sentence, then enter candidate labels separated by commas and press Classify with TAP.

Compare

Enter a premise and hypothesis, then press Check hypothesis.

Read the boundary

Treat the output as a heuristic signal. Keep a human or application rule for consequential decisions.

Example input
Text to classify:
Saya mahu refund barang rosak.

Candidate labels:
refund, support, akaun

Premise:
Data disimpan dalam peranti.

Hypothesis:
Data disimpan secara tempatan.
Browser storage

Browser copies use IndexedDB and are unencrypted. Export a .tapir backup and use native storage for encrypted files.

For offline use, download Studio Lite 1.0.2, extract it, and run Start-Tapirus-Lite.cmd on Windows or sh Start-Tapirus-Lite.sh on macOS/Linux. Do not open the HTML file with file://.

Run TAP from the native CLI

Use the source tree when you want a reproducible local build.

Build the CLI
cargo build --release --bin tapirus

# Windows
.\target\release\tapirus.exe --help

# macOS or Linux
./target/release/tapirus --help

Classification

Windows PowerShell
.\target\release\tapirus.exe bitnet "Saya mahu refund barang rosak" refund support akaun
macOS or Linux
./target/release/tapirus bitnet "Saya mahu refund barang rosak" refund support akaun

Premise and hypothesis

CLI command
tapirus bitnet verify "Data disimpan dalam peranti" "Data disimpan secara tempatan"

The bitnet command is a local decision demo. It does not train a model or establish factual truth.

Use TAP in Rust

The same decision helpers can be called directly from a Rust application.

src/main.rs
use tapirus::{Connection, Result};

fn main() -> Result<()> {
    let db = Connection::open("demo.tapir")?;
    let tap = db.tap();

    let result = tap.classify(
        "Saya mahu refund barang rosak",
        &["refund", "support", "akaun"],
    )?;
    println!("label: {}", result.top_choice);
    println!("score: {}", result.confidence);

    let check = tap.verify(
        "Data disimpan dalam peranti",
        "Data disimpan secara tempatan",
    )?;
    println!("match: {}", check.is_verified);

    db.close()?;
    Ok(())
}

For user-provided SQL values, use bound parameters. TAP output should not be the only authorization or safety control.

Set up TAP Model Forge

Model Forge is a separate desktop training flow. It is not required for TAP Lite or the native CLI demo.

What you need

Node.js 20+, npm, Python 3, training dependencies, a local base model and enough disk or GPU resources for that model.

Install the local Studio stack
cd studio
npm ci
python -m pip install -r requirements-training.txt
python server.py

In a second terminal, start the interface:

Studio interface
cd studio
npm run dev

Open the Vite URL, usually http://localhost:5173. On Windows, run_studio.bat can launch the built interface and backend after the dependencies are installed.

Dataset format

JSONL example
{"instruction":"Bagaimana buat backup?","output":"Gunakan snapshot .tapir dan uji restore."}

Accepted pairs are instruction/output, prompt/response or input/target. At least two valid examples are required.

Training flow

Import

Upload JSONL, NDJSON, JSON or CSV.

Cache

Download the selected base model into the local Studio cache.

Train

Run real local batches and inspect train and held-out loss.

Package

Export a verified .tap-model.zip adapter bundle.

Do not confuse the helpers

setup_models.bat and setup_models.sh install Ollama models. They do not replace requirements-training.txt or python server.py for real LoRA training.

Read the result correctly

These boundaries are part of using TAP responsibly.

OutputWhat it meansWhat it does not mean
Classification scoreRelative heuristic signal among the candidate labels.Calibrated probability or guaranteed intent detection.
Verification scoreText similarity and polarity signals for the supplied premise and hypothesis.Proof that a claim is true.
Model Forge lossTraining metrics observed for that dataset and run.Domain accuracy until a separate labelled evaluation is run.

For code-level details, see the TAP section in the technical docs. For the complete local guide, use the TapirusDB source repository.