Skip to main content

goalroute

Deterministic DAG routing based on business goals, with qualitative-to-quantitative KPI conversion (economic and impact) captured from multiple PDF documents.

What it does

  1. Ingest business intent (text or plain-text extracted from PDFs).
  2. Convert qualitative language into quantitative KPIs using named, reproducible evaluation scales (economics + impact).
  3. Route through a deterministic Directed Acyclic Graph (DAG) of decisions/ actions, driven by the business goals and their quantified KPIs.

Everything is deterministic: the same inputs always yield the same route.

Install

pip install goalroute          # core (stdlib only)
pip install goalroute[pdf]     # adds PDF extraction via pypdf

Quick start

from goalroute import GoalRouteEngine, Goal, DocumentSource

goals = [
    Goal(name="reduce_cost", weight=0.6),
    Goal(name="customer_delight", weight=0.4),
]

engine = GoalRouteEngine(goals)

# Capture intent from a PDF (needs pypdf), or pass text directly.
pdf_text = DocumentSource.from_pdf("proposal.pdf")   # str or None if no pypdf

docs = [pdf_text, "Reduce operational cost while improving satisfaction."]

report = engine.run(docs)
print(report.route)      # list of decision nodes
print(report.scores)     # quantified KPI scores per goal

Core concepts

  • DocumentSource — reads text from PDFs and/or raw text.
  • Goal — a weighted business goal.
  • KpiConverter — maps qualitative phrases to quantitative KPIs (economic value and impact) using built-in deterministic scales.
  • DecisionDag — a DAG of decision nodes with deterministic path selection.
  • GoalRouteEngine — orchestrates capture → convert → route.
  • RouteReport — the deterministic result.

Determinism

The routing is fully deterministic given the same inputs:

  • KPI scales are closed-form lookup tables (no randomness).
  • Ties are broken by node order in the DAG, never by RNG.
  • No network calls or mutable global state.

Development

pip install -e ".[dev]"
pytest

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goalroute-0.1.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

goalroute-0.1.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file goalroute-0.1.0.tar.gz.

File metadata

  • Download URL: goalroute-0.1.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for goalroute-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5fe1dd9251935a39b410f5c0daacc270167732e9e7b2d137661586edaede31c5
MD5 c8d96c5d8e65cad45976a36bd475fe0e
BLAKE2b-256 42f75faa5de602fae38c4ec4e18a717bb5578478af5139fcb0a80b487c9b6199

See more details on using hashes here.

File details

Details for the file goalroute-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: goalroute-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for goalroute-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd9bd6888aedcb6763de0e0d1cdbd9c60374af1a76238b9f384709fbc4317912
MD5 b1ec834c745a709dda1769cdeebd7320
BLAKE2b-256 03ff285901defabf04a0fc92475d8bb8e8d11b3285343af53c8c92a247c3d2a7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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