Dataset Viewer
The dataset viewer is not available for this subset.
Cannot get the split names for the config 'default' of the dataset.
Exception:    SplitsNotFoundError
Message:      The split names could not be parsed from the dataset config.
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 291, in _generate_tables
                  pa_table = paj.read_json(
                      io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
                  )
                File "pyarrow/_json.pyx", line 364, in pyarrow._json.read_json
                File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
                  raise convert_status(status)
              pyarrow.lib.ArrowInvalid: JSON parse error: Column() changed from object to string in row 0
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 286, in get_dataset_config_info
                  for split_generator in builder._split_generators(
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      StreamingDownloadManager(base_path=builder.base_path, download_config=download_config)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 101, in _split_generators
                  pa_table = next(iter(self._generate_tables(**splits[0].gen_kwargs, allow_full_read=False)))[1]
                             ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 306, in _generate_tables
                  batch = json_encode_fields_in_json_lines(original_batch, json_field_paths)
                File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 111, in json_encode_fields_in_json_lines
                  examples = [ujson_loads(line) for line in original_batch.splitlines()]
                              ~~~~~~~~~~~^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 20, in ujson_loads
                  return pd.io.json.ujson_loads(*args, **kwargs)
                         ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
              ValueError: Expected object or value
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/split_names.py", line 68, in compute_split_names_from_streaming_response
                  for split in get_dataset_split_names(
                               ~~~~~~~~~~~~~~~~~~~~~~~^
                      path=dataset,
                      ^^^^^^^^^^^^^
                      config_name=config,
                      ^^^^^^^^^^^^^^^^^^^
                      token=hf_token,
                      ^^^^^^^^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 340, in get_dataset_split_names
                  info = get_dataset_config_info(
                      path,
                  ...<6 lines>...
                      **config_kwargs,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 291, in get_dataset_config_info
                  raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err
              datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Causal Graph

This is a hand-written knowledge base of quantitative formulas, concepts, processes and rules, together with a small, dependency-free Python engine that answers practical numerical questions from it.

Nothing is trained. Every formula, concept, variable, rule and worked example was written by hand. Each answer shows the numbers it read from the question, the formulas it ran, the assumptions it made and the reasoning it used, so every result can be checked.

$ python3 -m symmix "What is the monthly payment on a 300000 loan at 5% over 20 years?"
Read from your question:
  - Principal (loan or deposit amount) = 300,000.00 (from '300000')
  - Annual interest or return rate = 5% (from '5%')
  - Time in years = 20 years (from '20 years')

Fixed-rate loan payment (amortisation):
  ...
  Result: Periodic payment (monthly by default) = 1,979.87, Total interest paid over the term = 175,168.13

Highlights

  • Explainable by construction. Every number is traced to a named variable, every formula shows its steps, and every answer lists its assumptions.
  • Fully inspectable. The knowledge base is plain JSON. The full graph is exported as one JSON file of typed nodes and edges.
  • No training, no dependencies. The engine uses only the Python standard library. It runs offline and is deterministic.
  • Abstains instead of guessing. Questions with no good match below a fixed threshold return no answer.
  • Checked. The knowledge base is validated by python3 -m symmix --check, and every formula carries worked examples that the test suite verifies.

Key numbers

Component Count
Formulas 401
Worked examples (checked by the tests) 1,003
Concepts 377
Variables 1,285
Processes 23
Rules 56
Lexicon feature atoms 335
Graph nodes 2,616
Graph edges 4,831
Vocabulary terms 54,107
Unit tests 206

Coverage

Formulas by domain (largest 17 of 44 domains):

Domain Formulas Domain Formulas
finance 34 chemistry 27
mechanics 30 electrical 22
physics 29 geometry 21
statistics 28 software 19
optics 14 fluids 14
thermal 13 construction 13
everyday 11 math 10
transport 9 ml 8
energy 8

Other domains include earth science, reliability, acoustics, project management, manufacturing, weather, ecology, queueing, inventory, genetics, logistics, growth, space and quality.

Quick start

Causal Graph needs Python 3 and nothing else. Clone or download this repository, then run from its root:

python3 -m symmix "How much will 2000 be worth after 8 years at 4%?"
python3 -m symmix --debug "..."        # retrieval scores for the question
python3 -m symmix --check              # validate the knowledge base
python3 -m symmix --export DIR         # write the graph, vocabulary and vectors to DIR
python3 -m symmix --kb PATH "..."      # use another knowledge-base folder
python3 -m symmix                      # interactive mode; a blank line quits
python3 -m unittest                    # run the test suite

From Python:

from symmix.model import Model

model = Model()
print(model.render(model.answer("How much will 2000 be worth after 8 years at 4%?")))

Output (abridged):

Future value with compound interest:
  future_value = principal * (1 + annual_rate / periods_per_year) ^ (periods_per_year * years)  ->  2000 * (1 + 0.04 / 1) ^ (1 * 8)  =  2737.14
  Result: Future value = 2,737.14, Interest earned = 737.14
  Assumes: fixed rate; equal compounding periods; no deposits, withdrawals or fees.

How an answer is produced

  1. Extract. Numbers in the question are linked to named variables by nearby labels and compatible units. Links are one-to-one. Explicit name=value pairs always take precedence, so they are the most reliable way to state inputs.
  2. Retrieve. Formulas, concepts and processes are scored on alias phrases, word and character n-grams, lexicon features, a two-hop graph spread and input availability. Weights live in kb/config.json.
  3. Choose. A formula is used only if it scores at least 0.8 of the best match. Anything below an absolute threshold of 0.12 is not shown, and the engine abstains.
  4. Re-read. Inputs are extracted again with the chosen formula in view. If an output is given and one input is missing, the formula is solved for that input and the answer says so.
  5. Compute. Formulas run through a whitelisted evaluator with guards. Producers run before consumers. Values that disagree by more than 1% with stated figures are flagged.
  6. Report. The answer lists what was read, each formula's steps and assumptions, plans for formulas that cannot run ("To use X, I still need ..."), applicable rules, and the matching concept with a pitfall.

Knowledge base format

All knowledge is JSON under kb/, loaded strictly: unknown keys and duplicate IDs are errors.

Folder Item Key fields
kb/variables/ Quantity id, name, kind, unit, base, aliases, weak, unit_only_ok, phrases
kb/formulas/ Formula id, name, domain, aliases, concepts, features, inputs, defaults, steps, outputs, guards, decisions, assumptions, examples
kb/concepts/ Concept id, name, domain, aliases, features, statements, pitfalls, actions, causes, uses, related, contrast
kb/processes.json Process id, name, domain, aliases, features, when, steps, checks
kb/rules.json Rule id, if_atoms, if_expr, then, text
kb/lexicon.json Feature atoms context, domain and intent cues used by retrieval
kb/config.json Settings retrieval weights, graph decay and hops, thresholds

A formula example, from kb/formulas/ (abridged):

{
  "id": "finance.future_value",
  "inputs": ["principal", "annual_rate", "years", "periods_per_year"],
  "steps": [["future_value", "principal * (1 + annual_rate / periods_per_year) ** (periods_per_year * years)"],
            ["interest_earned", "future_value - principal"]],
  "outputs": ["future_value", "interest_earned"],
  "examples": [{"inputs": {"principal": 1000, "annual_rate": 0.05, "periods_per_year": 12, "years": 10},
                "expect": {"future_value": 1647.0095}}]
}

Graph export

python3 -m symmix --export DIR writes four files, computed from the knowledge base alone. A pre-built export is in export/.

File Contents
graph.json The full typed graph: 2,616 nodes and 4,831 edges, pretty-printed JSON
vocabulary.json 54,107 n-gram terms (word, character and feature)
vectors.json Sparse TF-IDF vectors for 2,477 items in word, character and feature spaces
manifest.json Counts, retrieval settings and a statement of what the files are

graph.json has the shape {"format": "symmix-export/1", "nodes": [...], "edges": [...]}.

Node types: variable (1,285), atom (474), formula (401), concept (377), rule (56), process (23).

A variable node and an edge:

{"id": "var:hourly_wage", "type": "variable", "name": "Hourly wage", "kind": "money", "unit": "currency per hour"}
{"source": "chem.titration_endpoint", "target": "var:analyte_concentration", "relation": "input"}

Edge relations and counts: feature 2,001, input 1,084, output 523, explains 403, asserts 143, related 272, uses 122, requires 60, feeds 59, contrast 49, cites 47, suggests 35, causes 33.

The vectors are sparse lexical weights over written terms. They are not learned embeddings, and two items are similar only when they share words, character sequences or features. The graph is hand-built and has not been checked against an independent reference.

Adding knowledge

  1. Add or edit JSON in kb/. Every new formula needs worked examples.
  2. Run python3 -m symmix --check. It checks references, cycles, lexicon coverage, weight sums and formula examples.
  3. Run python3 -m unittest.
  4. Regenerate the export with python3 -m symmix --export export.

Repository layout

symmix/        engine: model.py (pipeline), extract.py (number linking), index.py, graph.py,
               formulas.py and safe_eval.py (formula engine), rules.py, units.py, kb.py, check.py, export.py, cli.py
kb/            the knowledge base (variables, formulas, concepts, processes, rules, lexicon, config)
export/        the pre-built graph, vocabulary, vectors and manifest
tests/         206 tests in 14 modules
evaluation/    question-set scripts used during development

License

Apache 2.0

Downloads last month
-