Full implementation on GitHub with tests, type checking, and comprehensive documentation.
# Quick start
uv sync --all-extras
uv run pytest # 75 tests, 84% coverageFull implementation on GitHub with tests, type checking, and comprehensive documentation.
# Quick start
uv sync --all-extras
uv run pytest # 75 tests, 84% coverageSuppose I want to avoid k8s and operate on a single physical machine but I still want to do load based auto scaling of docker containers. Doable?
Yes — you don't need k8s for this on a single box. This guide shows when single-box autoscaling makes sense, how to implement it, and when to graduate to Kubernetes.
| Criteria | Single Box | Kubernetes |
|---|
base.py is the whole formal model expressed as a Pydantic class hierarchy — the point is that mypy + Pydantic do the enforcing, so there's essentially no hand-written validation code. Four layers:
TruthStatus and ExtractionMethod are closed Literal unions, so values can't drift into "inference"/"derived" variants. Provenance is a frozen sub-model requiring both source and extraction_method — that's what makes R10's all-or-nothing rule structural: you either have a complete record or None.
| #!/bin/sh | |
| if [ "$#" -eq 0 ]; then | |
| set -- README | |
| fi | |
| TMPFILE=$(mktemp /tmp/unicode-chars.XXXXXX.tex) | |
| cat > "$TMPFILE" << 'EOF' | |
| \catcode`→=\active | |
| \catcode`∈=\active |
This work began as an exploration of Graph RAG for medical literature. It quickly became clear that the needs of researchers and clinicians marked this as a "high stakes" area of reasoning and retrieval, and that this would be an important consideration in every decision in the design of a suitable system. Specifically three principles emerged as significant requirements.
This is a topic that any post-2022 software engineer has to take seriously. So here is my take on things. First let's review what the dangers are that we are trying to avoid here.
Core motivation. Datalog with strict typing gets you ~90% of what the Graphwright typed-graph formalism (T, Φ, V, τ) already wants, and gives you a second, declarative language to embed in literate-programming markdown blocks — one where the code reads as the prose rather than fighting it.
Syntax sketch so far:
Type declarations, Haskell/OCaml-flavored, with an extends addition for hierarchy (not present in vanilla Haskell ADTs, needed because your
data Agent = Agent { name: String }
Created: 6/22/2026 7:10:24
Updated: 6/22/2026 17:56:05
Exported: 6/23/2026 8:00:37
Link: https://claude.ai/chat/d2f66964-3d4e-40b9-b34b-16c72a7be7ff
6/22/2026 16:01:57
Multi-stage builds work by separating build-time tools from runtime needs. You define multiple stages with separate FROM statements, build your application in early stages with all necessary compilers and dependencies, then copy only the final artifacts into a minimal runtime image. This eliminates the bulk of build tools from your final container.
Key principles:
COPY --from: Pull artifacts from earlier stages or external images into your final stage.kgraph_api is a single typed Python library over GraphDbInterface. It exposes
two tiers of operation against a typed graph:
describe_schema, search_instances, bfs_query, describe_instance.