Skip to main content

Constellations

dbt for unstructured data. Constellations — installed and invoked as stel — brings the dbt workflow of declarative models, a dependency DAG, ref(), tests, incremental builds, lineage, and a manifest artifact to folders of documents: PDFs, markdown, HTML, JSON, email, and free-form text.

dbt users will recognize the workflow: declare sources and models in YAML, build a DAG, materialize incrementally, test the results, and emit artifacts. stel is a standalone CLI rather than a dbt package or dbt adapter.

Shared enum vocabularies can use inline terms, CSV seeds, or existing warehouse relations. The vocabulary sources example runs offline and shows how label changes reach provider schemas and incremental plans. Classes, relation types and terms can also be imported from a SKOS/OWL ontology file through an IRI allow-list, keeping each IRI; see the ontology import example. Declared entity classes can also form a single-parent hierarchy used by relation validation, MCP class scopes, and concept-cloud descriptions.

The context assembly experiment compares deterministic evidence packing under a fixed token budget, offline. It keeps production serving unchanged and separates packing measurements from reviewed answer quality.

Status: active pure-Python preview. Shipped capabilities include DuckDB and BigQuery warehouses, local, GCS, and Google Drive sources, metadata-aware deterministic chunk models, record-scoped incremental state, bounded projected warehouse snapshots, an incremental local LanceDB search sink, classic text ML, and extraction backends. See docs/reference.md for the full reference.

Platform scope

The active platform roadmap is intentionally narrow:

  • Warehouses: DuckDB is the default and reference adapter, and MotherDuck (path: md:<database>) is shipped as its managed deployment — the same adapter and capability contract. BigQuery is shipped; Snowflake is planned.
  • Retrieval: LanceDB is the supported reference store. Additional hosted retrieval-store integrations are not currently planned.
  • Embedded dbt execution: dbt-duckdb only. BigQuery and future Snowflake support use the standalone CLI and dbt source handoff.

Existing inference providers and extraction backends remain supported; this scope governs new platform work rather than removing shipped functionality.

What a pipeline looks like

A project that turns a folder of invoice PDFs into a structured, queryable table — extract the text with pypdf, then use an LLM to pull typed fields:

flowchart LR
    src[("invoice_pdfs<br/><i>source: *.pdf</i>")]
    raw["raw_pdf_text<br/><i>pdf backend · incremental</i>"]
    extracted["extracted_invoices<br/><i>llm transform · cached</i>"]
    src --> raw --> extracted

Each node is a model declared in YAML. The source globs a folder; raw_pdf_text extracts text per document; extracted_invoices calls Claude to turn that text into typed columns — and caches the result so re-runs are free.

The source

# sources/invoices.yml
version: 2
sources:
  - name: invoice_pdfs
    path: "./data/invoices_pdf/"
    file_pattern: "*.pdf"

The extraction model

# models/raw_pdf_text.yml
version: 2
models:
  - name: raw_pdf_text
    source: ref('invoice_pdfs')
    extraction:
      backend: pdf
    materialization: incremental      # re-run only reprocesses changed PDFs
    tests:
      - not_null: [text]
      - unique: source_path

The transform model

# models/extracted_invoices.yml
version: 2
models:
  - name: extracted_invoices
    depends_on: [ref('raw_pdf_text')]
    transform:
      type: python
      module: transforms.llm_extract  # a Polars function you write
    tests:
      - not_null: [vendor, invoice_id, total]
      - unique: invoice_id

Run it

uv run stel init invoices --template pdf   # scaffold a project
# drop your PDFs into ./invoices/data/invoices_pdf/  (or `stel seed` synthetic ones)
cd invoices
uv run stel run                            # build the DAG into DuckDB
uv run stel test                           # run the schema tests
uv run stel show raw_pdf_text               # peek at the scaffolded result
model                 kind        mater.         processed   skipped  deleted    rows   time(s)
-----------------------------------------------------------------------------------------------
raw_pdf_text          extraction  incremental            5         0        0       5     0.31

Why stel

Imperative Python (LlamaIndex) Managed RAG (Cortex Search, Bedrock KB) stel
Declarative models + DAG ✗ partial ✓
Tests on extracted data ✗ ✗ ✓
Incremental / cached DIY ✓ ✓
Inspect & swap each stage ✓ ✗ ✓
Lineage / manifest artifact ✗ partial ✓
Reviewable like a dbt PR ✗ ✗ ✓
Composes with existing dbt ✗ partial ✓

stel isn't trying to win on time-to-first-demo (managed services do) or raw flexibility (LlamaIndex does). It wins on reproducibility, testability, and fitting the workflow analytics engineers already use.

What's in the box

  • Extraction backends — json, json_memory, markdown, pdf, html, email, and llm (Claude tool-use with response caching).
  • Built-in text/ML preprocessing — token counting, encoding repair, normalized spaCy token/entity child tables, deterministic entity linking to canonical IDs via alias tables, document-level aggregate features, language detection, text statistics, near-duplicate detection (MinHash), and PII redaction (Microsoft Presidio).
  • Warehouse and source adapters — DuckDB or BigQuery materialization, with local files, generation-pinned GCS objects, or a Google Drive folder of Docs and Slides as source documents.
  • RAG and classic ML primitives — deterministic recursive/token chunking; count, TF-IDF, and hashing features; and naive Bayes text classification.
  • Offline model evaluation — classification and canonical relation-triple metrics against gold relations, with per-label thresholds in stel build.
  • dbt-shaped everything — ref(), --select / --exclude selectors with tag: support, structural and deterministic quality tests, custom-Python tests, warn/error severities, source freshness, and profiles with --target.
  • Compile before I/O — strict per-backend and classic-ML contracts fail before source discovery or warehouse access, with file, line, column, and configuration-path diagnostics for invalid YAML.
  • Artifacts — manifest.json, run_results.json, a static docs site, and emit-dbt-sources to hand tables to a dbt project using the matching DuckDB or BigQuery adapter.
  • Composes with dbt — stel does the unstructured → structured "E"; dbt does the SQL "T", reading stel's tables as native sources.

Install

uv add stel
# Optional cloud integrations:
uv add 'stel[bigquery,gcs,gdrive]'

Quickstart

See the whole thing work first. The demo template scaffolds a complete project with its own documents: a made-up company's postmortems, runbooks, release notes, and support tickets. It needs no API keys and builds into one DuckDB file; the first build downloads DuckDB's vss and fts extensions, and after that it runs offline:

uvx stel init acme --template demo
cd acme
uvx stel build

That extracts the documents, chunks them by section, links every mention of a system to the vocabulary declared in stel_project.yml, answers a question in plain SQL, publishes a vector and full-text index inside the warehouse file, and tests all of it. The project's own README.md then walks through search, an incremental rebuild that reprocesses only the document you changed, the lineage site, a 3D map of what the corpus is about, and serving the index to an agent over MCP.

To run the repository's examples instead:

git clone https://github.com/C00ldudeNoonan/constellations
cd constellations
uv sync
uv run stel --project-dir examples/invoice_pipeline seed --count 5
uv run stel --project-dir examples/invoice_pipeline run
uv run stel --project-dir examples/invoice_pipeline test

Seventeen examples live in examples/, covering invoices, blog posts, support tickets, arXiv quality checks, PDF and direct LLM extraction, classic text ML, document clustering, RAG chunks, governed SQL chunks, dbt handoff and embedded execution, a metric-plus-evidence agent, Notion pages landed by an EL tool and rendered back into documents, and a Google Drive folder served as governed context over MCP.

Security model

Only run projects you trust: Python transforms and custom tests execute in the stel process. Project-controlled paths are confined to the project unless an explicit external: true boundary is supported; local source patterns cannot traverse parents or symlinks. Profiles select destinations and opaque credential references and must be reviewed as trusted configuration; credential values and reference names stay out of artifacts and diagnostics. The LLM backend sends document text to Anthropic using the configured environment variable, and the PII transform retains non-target input columns unless you explicitly project or drop them. stel clean removes known local artifacts without resetting a warehouse. See the full security notes before running third-party projects or sensitive documents.

Documentation

  • Full reference — every backend, command, config block, and the roadmap.
  • Contributing — how to add a backend, test, or command.
  • Semantic retrieval architecture — the search: resource and retrieval-store contract, including the shipped local LanceDB proof of concept and its fail-closed boundaries.
  • Provider abstraction — the inference/embedding provider contract, plus the accepted plugin discovery, provider-owned configuration, and failed-outcome accounting design (issue #71).
  • Warehouse-native SQL models — implemented transform.type: sql contract (compiled ref(), the SQL/Jinja trust boundary, and full/incremental adapter materialization).
  • SaaS context: land, then render — why there is no notion:// source: your EL tool lands the tables, stel reads them with warehouse:// and renders block rows back into documents.
  • Decision records — numbered, append-only records of decisions that had a real alternative, and the specific reason it lost.
  • Changelog

License

MIT

Metadata

Release files for stel 0.26.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stel 0.26.0
File Size Uploaded Provenance Actions
stel-0.26.0.tar.gz 3.0 MB Without provenance Details for stel-0.26.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stel 0.26.0
File Interpreter ABI Platform Actions
stel-0.26.0-py3-none-any.whl Python 3 none any Details for stel-0.26.0-py3-none-any.whl

Total release size: 4.5 MB

Release files / stel-0.26.0.tar.gz

Download URL stel-0.26.0.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
440dffeafb0f61bdc54378d6a8ecf2a3ebf94e8f3d2ab38bd4f7b905e248e48d
BLAKE2b-256 checksum
How to use checksums
15521f4fa6b3d38ab08e5483296df06396f902d5d4e910acaa12a3a1da93692b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stel-0.26.0-py3-none-any.whl

Download URL stel-0.26.0-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
195e542198b0159f825b26d04d827f67a2fc4e39c87af3a0d14a8ac3b107ef29
BLAKE2b-256 checksum
How to use checksums
8f82512f1696434db98ebab069243d64ae52a9beee93670faf185ffbe5fb5637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for stel 0.26.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page