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

# Artifacts

> The verticals and artifacts Khaos provides.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia odio
vitae vestibulum vestibulum.

| Vertical | Extra | Capabilities | Artifacts |
| - | - | - | - |
| Finance | `finance` | Entity and risk extraction from SEC EDGAR filings | `sec_10k_core`, `sec_8k_events`, `sec_form4_insider`, `sec_s1_ipo` |
| 3D geometry | `3d` | Part classification, segmentation, similarity search | `geo_part_classifier`, `geo_mesh_embedding`, `geo_pointcloud_embedding` |
| Tabular | `tabular` | Column typing, key matching, deduplication, anomaly scoring | `tab_column_types`, `tab_key_matching`, `tab_entity_dedupe`, `tab_anomaly_scoring` |
| Telemetry | `telemetry` | Zero-shot fault detection, motif discovery, regime shifts | `tele_sensor_vibration`, `tele_bio_ecg`, `tele_regime_shift` |
| Graph | `graph` | Node embeddings, fraud rings, link prediction | `graph_node_embedding`, `graph_subgraph_embedding`, `graph_fraud_rings`, `graph_link_prediction` |
| Chemistry | `chem` | Molecular embeddings, property prediction | `chem_mol_embedding`, `chem_logp`, `chem_solubility`, `chem_toxicity` |
| Physics | core | Fourier Neural Operator surrogates for PDEs | `pde_darcy_flow_2d`, `pde_navier_stokes_steady_2d`, `pde_heat_diffusion_2d`, `pde_wave_evolution_2d` |
| Robotics | core | Trajectory embeddings, skill segmentation, failure detection | `robo_kinematics_sm`, `robo_skill_segmentation`, `robo_failure_detection` |

> [!NOTE]
>
> Only artifacts registered in `khaos/registry.py` can be loaded. Run `khaos info` to
> list them. All 29 have published weights on the Hugging Face Hub under
> [`fletxcher`](https://huggingface.co/fletxcher) as `khaos-<artifact>`, and `khaos.load("<artifact>")`
> downloads one on first use. The [API reference](https://khaos-ml.mintlify.site/api/core.md#input-and-result-for-each-artifact) lists
> what each one takes and returns.

> [!NOTE]
>
> Physics artifacts carry their grid dimensionality in the name. Only 2D (`_2d`)
> artifacts exist today; 3D (`_3d`) variants are planned.

## Usage by domain

> [tab] Finance
>
> Lorem ipsum dolor sit amet, consectetur adipiscing elit.
>
> **Annual report (10-K)**
>
> ```python theme={null}
> nlp = khaos.load("sec_10k_core")
> doc = nlp("path/to/10k_filing.html")
> for ent in doc.ents:
>     print(ent)          # metrics, debt tranches, maturity dates
> # Entity(label="Revenue", value="$12.4B", period="FY2025")
> # Entity(label="DebtTranche", value="$2.0B", maturity="2029-06-15")
> ```
>
> **Current report (8-K events)**
>
> ```python theme={null}
> nlp = khaos.load("sec_8k_events")
> doc = nlp("path/to/8k_filing.html")
> print(doc.ents)         # event triggers, deal terms, departures
> # [Event(type='ExecutiveDeparture', who='CFO'), Event(type='MergerAgreement', value='$1.2B')]
> ```
>
> **Insider trading (Form 4)**
>
> ```python theme={null}
> nlp = khaos.load("sec_form4_insider")
> doc = nlp("path/to/form4.xml")
> print(doc.ents)         # roles, derivative vs. common, net share change
> # [Trade(role='Director', kind='common', net_shares=-5000)]
> ```
>
> **IPO registration (S-1)**
>
> ```python theme={null}
> nlp = khaos.load("sec_s1_ipo")
> doc = nlp("path/to/s1_filing.html")
> print(doc.ents)         # use of proceeds, lock-ups, dilution
> # [UseOfProceeds('debt repayment', 0.40), LockUp(days=180)]
> ```

> [tab] Physics
>
> Donec ullamcorper nulla non metus auctor fringilla.
>
> **Steady-state flow (Darcy)**
>
> ```python theme={null}
> flow = khaos.load("pde_darcy_flow_2d")(boundary_grid)
> print(flow.prediction.shape)   # pressure / velocity grid
> # (128, 128)
> ```
>
> **Steady-state flow (Navier-Stokes)**
>
> ```python theme={null}
> flow = khaos.load("pde_navier_stokes_steady_2d")(boundary_grid)
> print(flow.prediction.shape)
> # (128, 128, 2)
> ```
>
> **Heat diffusion**
>
> ```python theme={null}
> heat = khaos.load("pde_heat_diffusion_2d")(initial_temperature_grid)
> print(heat.prediction.shape)
> # (64, 64)
> ```
>
> **Wave evolution**
>
> ```python theme={null}
> wave = khaos.load("pde_wave_evolution_2d")(initial_wave_grid)
> print(wave.prediction.shape)
> # (64, 64)
> ```

> [tab] Robotics
>
> Maecenas faucibus mollis interdum.
>
> **Trajectory embedding and similarity**
>
> ```python theme={null}
> embed = khaos.load("robo_kinematics_sm")
> a = embed(joint_trajectory_a).vector
> b = embed(joint_trajectory_b).vector
> similarity = a @ b / (np.linalg.norm(a) * np.linalg.norm(b))
> # 0.93
> ```
>
> **Skill segmentation**
>
> ```python theme={null}
> seg = khaos.load("robo_skill_segmentation")(joint_trajectory)
> print(seg.boundaries, seg.labels)
> # [0, 42, 97, 160] ['reach', 'grasp', 'lift', 'place']
> ```
>
> **Stall and failure detection**
>
> ```python theme={null}
> report = khaos.load("robo_failure_detection")(joint_trajectory)
> if report.stalled:
>     print("stalled", report.score)
> # stalled 0.87
> ```

> [tab] 3D geometry
>
> Etiam porta sem malesuada magna mollis euismod.
>
> **Part classification**
>
> ```python theme={null}
> part = khaos.load("geo_part_classifier")("bracket.step")
> print(part.label, part.scores)
> # bracket {'bracket': 0.91, 'flange': 0.06, 'gear': 0.03}
> ```
>
> **Mesh similarity search**
>
> ```python theme={null}
> embed = khaos.load("geo_mesh_embedding")
> query = embed("bracket.stl").vector
> library = [embed(path).vector for path in part_paths]
> print(query.shape, len(library))
> # (512,) 4800
> ```
>
> **Point cloud embedding**
>
> ```python theme={null}
> embed = khaos.load("geo_pointcloud_embedding")
> scan = embed("site_scan.las").vector
> print(scan.shape)
> # (512,)
> ```

> [tab] Tabular
>
> Aenean lacinia bibendum nulla sed consectetur.
>
> **Column type detection**
>
> ```python theme={null}
> result = khaos.load("tab_column_types")("customers.csv")
> print(result.column_types)   # {"email": "email", "dob": "date", ...}
> # {'email': 'email', 'dob': 'date', 'zip': 'postal_code'}
> ```
>
> **Foreign-key matching**
>
> ```python theme={null}
> keys = khaos.load("tab_key_matching")("orders.csv", "customers.csv")
> for left, right, score in keys.matches:
>     print(left, "->", right, score)
> # order.customer_id -> customer.id 0.98
> # order.region -> customer.region 0.41
> ```
>
> **Entity deduplication**
>
> ```python theme={null}
> dupes = khaos.load("tab_entity_dedupe")("customers.csv")
> print(dupes.clusters)        # [[0, 14], [3, 9, 27], ...]
> # [[0, 14], [3, 9, 27]]
> ```
>
> **Anomaly scoring**
>
> ```python theme={null}
> anomalies = khaos.load("tab_anomaly_scoring")("transactions.csv")
> print(anomalies.scores.argsort()[-10:])   # ten most unusual rows
> # [812 455 12 903 77 641 230 18 504 366]
> ```

> [tab] Telemetry
>
> Curabitur blandit tempus porttitor.
>
> **Vibration fault detection**
>
> ```python theme={null}
> sig = khaos.load("tele_sensor_vibration")(vibration_array)
> print(sig.anomaly_score)
> # 0.82
> ```
>
> **ECG anomaly detection**
>
> ```python theme={null}
> sig = khaos.load("tele_bio_ecg")(ecg_array)
> print(sig.anomaly_score, sig.vector.shape)
> # 0.07 (256,)
> ```
>
> **Operating regime shifts**
>
> ```python theme={null}
> shifts = khaos.load("tele_regime_shift")(sensor_stream)
> print(shifts.change_points)
> # [1200, 4810, 9335]
> ```

> [tab] Graph
>
> Nullam quis risus eget urna mollis ornare.
>
> **Node embeddings**
>
> ```python theme={null}
> emb = khaos.load("graph_node_embedding")(graph)
> print(emb.vector.shape)      # (num_nodes, dim)
> # (1000, 128)
> ```
>
> **Subgraph embeddings**
>
> ```python theme={null}
> emb = khaos.load("graph_subgraph_embedding")(graph)
> print(emb.vector.shape)
> # (64, 128)
> ```
>
> **Fraud ring detection**
>
> ```python theme={null}
> result = khaos.load("graph_fraud_rings")(transaction_graph)
> for ring, score in zip(result.rings, result.scores):
>     print(ring, score)
> # [4, 17, 52, 88] 0.94
> # [9, 31, 76] 0.81
> ```
>
> **Link prediction**
>
> ```python theme={null}
> links = khaos.load("graph_link_prediction")(graph)
> print(links.edges[:5])       # (source, target, probability)
> # [(3, 41, 0.97), (12, 8, 0.93), (5, 60, 0.88)]
> ```

> [tab] Chemistry
>
> Vestibulum id ligula porta felis euismod semper.
>
> **Molecular embedding**
>
> ```python theme={null}
> emb = khaos.load("chem_mol_embedding")("CC(=O)OC1=CC=CC=C1C(=O)O")
> print(emb.vector.shape)
> # (256,)
> ```
>
> **LogP and solubility**
>
> ```python theme={null}
> smiles = "CC(=O)OC1=CC=CC=C1C(=O)O"
> logp = khaos.load("chem_logp")(smiles).properties["logp"]
> sol = khaos.load("chem_solubility")(smiles).properties["solubility"]
> print(logp, sol)
> # 1.19 -1.72
> ```
>
> **Toxicity**
>
> ```python theme={null}
> tox = khaos.load("chem_toxicity")("CC(=O)OC1=CC=CC=C1C(=O)O")
> print(tox.properties)
> # {'toxicity': 0.12}
> ```

Artifact definitions live under `artifacts/<domain>/` and training configs under
`training/`.


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