> ## Documentation Index
> Fetch the complete documentation index at: https://toradb.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> The retrieval database that shows its work

ToraDB is a **retrieval-focused database** for local workloads: on-disk tables, BM25 sparse search, dense ANN (HNSW / DiskANN), hybrid fusion, plus a Python SDK, CLI, and retrieval SQL.

**The defining feature:** ToraDB is the only retrieval database that shows its work. Every search can return a structured provenance trace — which documents were considered at each tier, why they were kept or dropped, and where time was spent. This turns RAG debugging from guesswork into a precise, auditable workflow.

## What you can do

* Store documents locally with Parquet segments and index sidecars
* Run **text**, **vector**, and **hybrid** search from Python or SQL
* Inspect **retrieval provenance**: per-tier candidate lists, drop reasons, latency
* Aggregate with `GROUP BY`, build indexes, and compact segments on disk

## Get started

<CardGroup cols={2}>
  <Card title="Install" icon="download" href="/install">
    `pip install toradb` from PyPI, or build from source.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Create a table, ingest docs, and run your first query.
  </Card>

  <Card title="Provenance" icon="magnifying-glass" href="/guides/provenance">
    See exactly why each document was returned — or why it wasn't.
  </Card>

  <Card title="API reference" icon="book" href="/api-reference/introduction">
    Python SDK, SQL grammar, and CLI commands.
  </Card>
</CardGroup>

## Example

```python theme={null}
import json
import toradb

db = toradb.local("./my_db")
docs = db.create_table("docs", mode="text")
docs.add([
    "Nikola Tesla invented the alternating current induction motor",
    "Marie Curie studied radioactivity",
])

# Search with provenance — see exactly what happened inside
results = docs.search("Tesla motor", top_k=3, explain=True)
print(results.to_pandas())

prov = json.loads(results.provenance)
print(f"BM25 found: {len(prov['tier1']['bm25_candidates'])} candidates")
print(f"Dropped:    {[d['reason'] for d in prov['tier2']['drops']]}")
print(f"Latency:    {prov['total_latency_ms']:.1f}ms")
```

## License

ToraDB is licensed under the [Apache License, Version 2.0](https://github.com/sophatvathana/toradb/blob/main/LICENSE).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.