linkedparticles-core 1.190.0__tar.gz → 1.192.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/PKG-INFO +1 -1
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/config.py +17 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/conflict_resolution.py +11 -0
- linkedparticles_core-1.192.2/particles/core/ladders.py +244 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/probe_verdict.py +20 -0
- linkedparticles_core-1.192.2/particles/core/rung_ladder.py +443 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/schema.py +5 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/validity.py +2 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/general.py +105 -20
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/pyproject.toml +1 -1
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/_client_fixtures.py +41 -2
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conftest.py +1 -0
- linkedparticles_core-1.190.0/tests/test_validity_extraction.py +0 -458
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/LICENSE +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/NOTICE +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/README.md +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/conformance/README.md +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/conformance/profile.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/conformance/similarity_vectors.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/schemas/context.jsonld +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/schemas/interchange.schema.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/schemas/particle.schema.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/schemas/shacl/CorpusSnapshotShape.ttl +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/schemas/shacl/ParticleShape.ttl +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/schemas/shacl/ProvenanceChainShape.ttl +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/schemas/shacl/SubjectShape.ttl +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/schemas/shacl/TrustStatementShape.ttl +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/artifacts/schemas/trust_lens.schema.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/constraints.txt +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/_resources.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/contract.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/fixtures.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/jsonschema.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/profile.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/runner.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/shacl.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/types.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/conformance/validator.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/_resources.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/cascade_gate.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/claims.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/closure_measure.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/conflict_review.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/consolidation_cadence.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/contradiction_disclosure.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/duplicate_key.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/equivalence.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/fingerprint.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/generics.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/granularity.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/held_release.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/jsonld_context.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/modality.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/observer_scope.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/past_value.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/predicate_profile.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/progress.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/provenance.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/reanchor.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/scoring/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/scoring/confidence.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/scoring/decay.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/scoring/relevance.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/scoring/utility.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/spend_budget.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/stance.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/status.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/vocabulary.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/vocabulary_jsonld.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/vocabulary_report.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/egress.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/embeddings.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/agent.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/append_delta.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/calibration.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/components.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/docstrings.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/github/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/github/_shared.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/github/gist.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/github/pages.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/github/repo.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/hackernews.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/incremental.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/journal.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/mastodon.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/mcp_memory.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/migration_preview.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/modality.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/nomisma.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/numista/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/numista/_shared.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/numista/coin.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/numista/issuer.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/numista/listing.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/polarity.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/property_keys.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/rdf.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/reddit.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/registry.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/scope.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/session_state.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/structure.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/subject_gate.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/subject_scope.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/taxonomy.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/tool_turns.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/trust_lens.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/vocabulary.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/extraction/wikidata.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/http.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/interchange/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/interchange/codec.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/interchange/jsonl.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/interchange/yaml_ld.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/adapters/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/adapters/anthropic.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/adapters/local.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/adapters/openai_compat.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/batch_budget.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/breaker.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/client.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/errors.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/fencing.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/logprobs.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/pool.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/registry.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/replay.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/spend_budget.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/llm/usage.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/py.typed +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/render/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/render/markdown.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/secrets.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/url_canonical.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/url_safety.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/__init__.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/_upstream.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/MANIFEST.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/hackernews-thread-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/hackernews-thread-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/hackernews-thread-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/journal-entry-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/journal-entry-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/journal-entry-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/mastodon-thread-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/mastodon-thread-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/mastodon-thread-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/mcp-memory-export-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/mcp-memory-export-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/mcp-memory-export-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/nomisma-concept-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/nomisma-concept-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/nomisma-concept-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/numista-coin-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/numista-coin-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/numista-coin-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/numista-issuer-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/numista-issuer-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/numista-issuer-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/numista-listing-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/numista-listing-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/numista-listing-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/rdf-graph-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/rdf-graph-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/rdf-graph-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/reddit-thread-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/reddit-thread-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/reddit-thread-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/taxonomy-coins-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/taxonomy-coins-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/taxonomy-coins-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/trust-lens-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/trust-lens-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/trust-lens-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-article-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-article-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-article-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-article-002/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-article-002/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-article-002/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-essay-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-essay-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-essay-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-interview-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-interview-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/web-interview-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/wikidata-entity-001/content.bin +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/wikidata-entity-001/manifest.yaml +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/conformance/fixtures/wikidata-entity-001/snapshot.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/fixtures/scope/normative-rule-file.md +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/fixtures/scope/normative-rule-file.recorded.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/fixtures/scope/rule-file-agents-md.md +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/fixtures/scope/rule-file-agents-md.recorded.json +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_calibration_isotonic.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_confidence.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_config_client_sections.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_config_sample.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_conformance_fixture_gen.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_conformance_similarity_vectors.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_conformance_validator.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_core_contradiction_disclosure.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_core_held_release.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_core_observer_scope.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_core_provenance.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_core_vocabulary.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_egress_policy.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_embeddings.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_extraction_agent.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_extraction_vision.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_interchange_schema.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_llm_batch_budget.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_llm_logprobs.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_llm_pool.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_llm_replay.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_llm_usage.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_schema.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_secrets.py +0 -0
- {linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/tests/test_url_canonical.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: linkedparticles-core
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.192.2
|
|
4
4
|
Summary: Store-free client library for Particles: define, validate, serialize, and extract provenance-tracked belief particles
|
|
5
5
|
Project-URL: Homepage, https://linkedparticles.org
|
|
6
6
|
Project-URL: Documentation, https://docs.linkedparticles.org
|
|
@@ -1096,10 +1096,18 @@ class ExtractionValidityConfig(BaseModel):
|
|
|
1096
1096
|
a structural decision (does a boundary exist?), never the stored
|
|
1097
1097
|
``confidence.value``. ``enabled: false`` reproduces the pre-0197
|
|
1098
1098
|
behaviour exactly (no candidate ever carries ``valid_until`` from extraction).
|
|
1099
|
+
|
|
1100
|
+
``session_source_types`` names the source types a harness deposits as a
|
|
1101
|
+
session transcript. For those, the extractor may anchor a
|
|
1102
|
+
past-tense claim reporting an act performed *in the session* at the
|
|
1103
|
+
reference date as an ``EVENT`` under the ``session`` basis, so a window
|
|
1104
|
+
read finds what a session did; for every other source a past-tense claim
|
|
1105
|
+
with no date gets no start. Empty disables the rule.
|
|
1099
1106
|
"""
|
|
1100
1107
|
|
|
1101
1108
|
enabled: bool = True
|
|
1102
1109
|
min_boundary_confidence: float = 0.75
|
|
1110
|
+
session_source_types: list[str] = Field(default_factory=lambda: ["CONVERSATION"])
|
|
1103
1111
|
|
|
1104
1112
|
|
|
1105
1113
|
class StructuredClaimConfig(BaseModel):
|
|
@@ -3081,6 +3089,15 @@ class AuditConfig(BaseModel):
|
|
|
3081
3089
|
# 0 probes nothing (disclosed the same way). `particles lint` is not
|
|
3082
3090
|
# affected: cost gating is the audit's concern, lint stays exhaustive.
|
|
3083
3091
|
max_contradiction_probes: int = Field(default=50, ge=0)
|
|
3092
|
+
# (the ruling, order, do not drop): under a probe
|
|
3093
|
+
# cap the census probes the pairs some single reader sees first (the
|
|
3094
|
+
# observer precondition reconciles or reviews them) and
|
|
3095
|
+
# reserves this share of the cap for cross-scope pairs, two projects'
|
|
3096
|
+
# claims the precondition declines, so a contradiction between projects
|
|
3097
|
+
# is still discovered and recorded as OBSERVER_DIVERGENCE. A share neither
|
|
3098
|
+
# side fills goes to the other. An ordering, never a filter; a store that
|
|
3099
|
+
# was never rescoped, and uncapped `particles lint`, are not reordered.
|
|
3100
|
+
cross_scope_probe_share: float = Field(default=0.2, ge=0.0, le=1.0)
|
|
3084
3101
|
# read each pair the probe flagged a second time, on
|
|
3085
3102
|
# ``llm.verification``, with each claim's source passage, note name and
|
|
3086
3103
|
# note date, and count only the confirmed pairs in the headline. The report
|
{linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/conflict_resolution.py
RENAMED
|
@@ -699,6 +699,10 @@ def decide_ladder(
|
|
|
699
699
|
# written and no cascade runs.
|
|
700
700
|
RETIRED_VALUE_KEY = "conflict:retired_value"
|
|
701
701
|
|
|
702
|
+
#: The ``properties`` key naming the ladder rung whose verdict opened an
|
|
703
|
+
#: INCONSISTENCY record, ``name@version``.
|
|
704
|
+
DECIDED_BY_KEY = "conflict:decided_by"
|
|
705
|
+
|
|
702
706
|
|
|
703
707
|
def build_inconsistency_particle(
|
|
704
708
|
existing: Particle,
|
|
@@ -709,6 +713,7 @@ def build_inconsistency_particle(
|
|
|
709
713
|
asserted_by: str = "extract-pipeline",
|
|
710
714
|
trigger_ref_type: ProvenanceRefType = ProvenanceRefType.SOURCE,
|
|
711
715
|
retired_twin: bool = False,
|
|
716
|
+
decided_by: str | None = None,
|
|
712
717
|
) -> Particle:
|
|
713
718
|
"""Construct the INCONSISTENCY ``Particle`` for an unresolvable pair.
|
|
714
719
|
|
|
@@ -752,6 +757,10 @@ def build_inconsistency_particle(
|
|
|
752
757
|
headline says so, and :data:`RETIRED_VALUE_KEY` carries the twin's
|
|
753
758
|
``status_reason`` in ``properties`` so Review can tell the two kinds
|
|
754
759
|
of record apart.
|
|
760
|
+
- ``decided_by``: the stamp of the ladder rung whose
|
|
761
|
+
verdict opened the record, carried in ``properties`` under
|
|
762
|
+
:data:`DECIDED_BY_KEY`; ``None`` leaves it unstamped (a fail-closed
|
|
763
|
+
record no rung decided, or a retired-value hold).
|
|
755
764
|
"""
|
|
756
765
|
# Inherit subject_ids from the existing particle (Particle A). Fall back
|
|
757
766
|
# to the new particle's set if existing has none.
|
|
@@ -773,6 +782,8 @@ def build_inconsistency_particle(
|
|
|
773
782
|
f"Particle A: {existing.id} — {existing.content[:120]}\n"
|
|
774
783
|
f"Particle B (new): {new.content[:120]}"
|
|
775
784
|
)
|
|
785
|
+
if decided_by is not None:
|
|
786
|
+
properties = {**(properties or {}), DECIDED_BY_KEY: decided_by}
|
|
776
787
|
|
|
777
788
|
return Particle(
|
|
778
789
|
content=inc_content,
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 The Particles authors
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
"""The engine's ladders: which rungs answer each question kind, in which order.
|
|
6
|
+
|
|
7
|
+
Each function below declares one :class:`~particles.core.rung_ladder.Ladder`.
|
|
8
|
+
The deterministic rungs carry their own ``decide`` and are defined here; the
|
|
9
|
+
model rungs are declared with ``decide=None`` and bound in the shell to the
|
|
10
|
+
completion they ask. A model rung's version is the prompt hash of the probe
|
|
11
|
+
it stands for (:func:`~particles.core.probe_verdict.prompt_hash`), which the
|
|
12
|
+
shell passes in, so a prompt edit changes the stamp every verdict carries.
|
|
13
|
+
|
|
14
|
+
**The contradiction ladder** (the census, L-SEM-01):
|
|
15
|
+
|
|
16
|
+
* ``adjudicability`` (pure): ``NO`` when either claim is not truth-apt,
|
|
17
|
+
read from the stored modality only.
|
|
18
|
+
* ``generic_guard`` (pure): ``NO`` when exactly one claim is generic.
|
|
19
|
+
* ``duplicate_key`` (local): ``NO`` when the two claims are the same sentence
|
|
20
|
+
under the §6.10 normalisation, whatever their subject sets and
|
|
21
|
+
holders; the full §6.10 identity is the narrower case of the same test.
|
|
22
|
+
A sentence does not contradict itself, and this case was 170 of the 200
|
|
23
|
+
pairs a capped census probed before the rung existed. The
|
|
24
|
+
census hands the rung a :class:`NormalizedForms` memo so each text is
|
|
25
|
+
normalised once per run, not once per pair.
|
|
26
|
+
* ``contradiction_probe`` (model): the census probe.
|
|
27
|
+
* ``second_reading`` (model, confirmation on ``YES``): the context-rich
|
|
28
|
+
second reading, whose verdict replaces the probe's.
|
|
29
|
+
|
|
30
|
+
**The update ladder** (rung 2.5): ``update_slot`` (model,
|
|
31
|
+
``semantic_lint``) and ``update_slot_second`` (model, ``verification``,
|
|
32
|
+
confirmation on ``CHANGES``).
|
|
33
|
+
|
|
34
|
+
**The duplicate ladder**: the ``duplicate_judge`` model rung.
|
|
35
|
+
|
|
36
|
+
**The candidate ladder** (the abstraction gate):
|
|
37
|
+
``population_quantifier`` (pure, ``NOT_ENTAILED`` on a kind-ranging
|
|
38
|
+
quantifier) and the ``entailment_judge`` model rung.
|
|
39
|
+
|
|
40
|
+
Pure: no I/O, no logging.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
from __future__ import annotations
|
|
44
|
+
|
|
45
|
+
from particles.core.conflict_resolution import is_generic_instance_pair
|
|
46
|
+
from particles.core.duplicate_key import normalize_content
|
|
47
|
+
from particles.core.generics import population_quantifier
|
|
48
|
+
from particles.core.rung_ladder import (
|
|
49
|
+
CandidateVerdict,
|
|
50
|
+
ContradictionVerdict,
|
|
51
|
+
CostClass,
|
|
52
|
+
DuplicateVerdict,
|
|
53
|
+
Ladder,
|
|
54
|
+
QuestionKind,
|
|
55
|
+
Rung,
|
|
56
|
+
UpdateVerdict,
|
|
57
|
+
)
|
|
58
|
+
from particles.core.schema import Particle, is_truth_apt
|
|
59
|
+
|
|
60
|
+
__all__ = [
|
|
61
|
+
"ADJUDICABILITY",
|
|
62
|
+
"DUPLICATE_KEY",
|
|
63
|
+
"GENERIC_GUARD",
|
|
64
|
+
"POPULATION_QUANTIFIER",
|
|
65
|
+
"CandidateInput",
|
|
66
|
+
"ClaimPair",
|
|
67
|
+
"NormalizedForms",
|
|
68
|
+
"TextPair",
|
|
69
|
+
"candidate_ladder",
|
|
70
|
+
"contradiction_ladder",
|
|
71
|
+
"duplicate_key_rung",
|
|
72
|
+
"duplicate_ladder",
|
|
73
|
+
"update_ladder",
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
#: A pair of stored claims, as the census holds them.
|
|
77
|
+
ClaimPair = tuple[Particle, Particle]
|
|
78
|
+
#: Two claim texts, earlier first where the question is directional.
|
|
79
|
+
TextPair = tuple[str, str]
|
|
80
|
+
#: A candidate abstraction's text and its premises' texts.
|
|
81
|
+
CandidateInput = tuple[str, tuple[str, ...]]
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _adjudicability(pair: ClaimPair) -> ContradictionVerdict:
|
|
85
|
+
a, b = pair
|
|
86
|
+
if is_truth_apt(a) and is_truth_apt(b):
|
|
87
|
+
return ContradictionVerdict.ABSTAIN
|
|
88
|
+
return ContradictionVerdict.NO
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _generic_guard(pair: ClaimPair) -> ContradictionVerdict:
|
|
92
|
+
if is_generic_instance_pair(*pair):
|
|
93
|
+
return ContradictionVerdict.NO
|
|
94
|
+
return ContradictionVerdict.ABSTAIN
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class NormalizedForms:
|
|
98
|
+
"""Each claim's §6.10 normalised text, computed once per particle id.
|
|
99
|
+
|
|
100
|
+
The duplicate-key rung compares two normalised texts, and a census asks it
|
|
101
|
+
of every candidate pair the pure rungs let through: some 2.66 million
|
|
102
|
+
pairs over 55,578 distinct texts on the owner's store, so normalising per
|
|
103
|
+
pair did the same work fifty times over. The shell makes one of these per
|
|
104
|
+
run and hands it to :func:`duplicate_key_rung`; the rung reads a claim's
|
|
105
|
+
form through it and the first read computes it. A memo of a pure function
|
|
106
|
+
over the particle's own text: no I/O, and the same answer whoever asks.
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
def __init__(self) -> None:
|
|
110
|
+
self._forms: dict[str, str] = {}
|
|
111
|
+
|
|
112
|
+
def of(self, particle: Particle) -> str:
|
|
113
|
+
"""``normalize_content`` of the particle's text, computed on first read."""
|
|
114
|
+
form = self._forms.get(particle.id)
|
|
115
|
+
if form is None:
|
|
116
|
+
form = self._forms[particle.id] = normalize_content(particle.content)
|
|
117
|
+
return form
|
|
118
|
+
|
|
119
|
+
def __len__(self) -> int:
|
|
120
|
+
return len(self._forms)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def duplicate_key_rung(
|
|
124
|
+
forms: NormalizedForms | None = None,
|
|
125
|
+
) -> Rung[ClaimPair, ContradictionVerdict]:
|
|
126
|
+
"""The duplicate-key rung, reading normalised texts through ``forms`` when given.
|
|
127
|
+
|
|
128
|
+
With no memo each call normalises both texts afresh, which is
|
|
129
|
+
:data:`DUPLICATE_KEY`; the verdict is the same either way.
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
def decide(pair: ClaimPair) -> ContradictionVerdict:
|
|
133
|
+
a, b = pair
|
|
134
|
+
if forms is None:
|
|
135
|
+
same = normalize_content(a.content) == normalize_content(b.content)
|
|
136
|
+
else:
|
|
137
|
+
same = forms.of(a) == forms.of(b)
|
|
138
|
+
return ContradictionVerdict.NO if same else ContradictionVerdict.ABSTAIN
|
|
139
|
+
|
|
140
|
+
return Rung(name="duplicate_key", version="1", cost=CostClass.LOCAL, decide=decide)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
#: Neither claim is a truth-apt claim, so there is no shared truth to contradict.
|
|
144
|
+
ADJUDICABILITY: Rung[ClaimPair, ContradictionVerdict] = Rung(
|
|
145
|
+
name="adjudicability",
|
|
146
|
+
version="1",
|
|
147
|
+
cost=CostClass.PURE,
|
|
148
|
+
decide=_adjudicability,
|
|
149
|
+
# Reads each record's stored modality, not its text.
|
|
150
|
+
content_keyed=False,
|
|
151
|
+
)
|
|
152
|
+
#: A generic against an instance claim is not an adjudicable pair.
|
|
153
|
+
GENERIC_GUARD: Rung[ClaimPair, ContradictionVerdict] = Rung(
|
|
154
|
+
name="generic_guard", version="1", cost=CostClass.PURE, decide=_generic_guard
|
|
155
|
+
)
|
|
156
|
+
#: The same sentence twice is not a contradiction (normalisation).
|
|
157
|
+
DUPLICATE_KEY: Rung[ClaimPair, ContradictionVerdict] = duplicate_key_rung()
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def contradiction_ladder(
|
|
161
|
+
probe_version: str,
|
|
162
|
+
reading_version: str,
|
|
163
|
+
*,
|
|
164
|
+
forms: NormalizedForms | None = None,
|
|
165
|
+
) -> Ladder[ClaimPair, ContradictionVerdict]:
|
|
166
|
+
"""The census's contradiction ladder at the given prompt versions.
|
|
167
|
+
|
|
168
|
+
``forms`` is the run's memo of normalised texts for the duplicate-key rung
|
|
169
|
+
(:class:`NormalizedForms`); without one the rung normalises per pair.
|
|
170
|
+
"""
|
|
171
|
+
return Ladder(
|
|
172
|
+
kind=QuestionKind.CONTRADICTION,
|
|
173
|
+
abstain=ContradictionVerdict.ABSTAIN,
|
|
174
|
+
rungs=(
|
|
175
|
+
ADJUDICABILITY,
|
|
176
|
+
GENERIC_GUARD,
|
|
177
|
+
DUPLICATE_KEY if forms is None else duplicate_key_rung(forms),
|
|
178
|
+
Rung(name="contradiction_probe", version=probe_version, cost=CostClass.MODEL),
|
|
179
|
+
Rung(
|
|
180
|
+
name="second_reading",
|
|
181
|
+
version=reading_version,
|
|
182
|
+
cost=CostClass.MODEL,
|
|
183
|
+
confirms=frozenset({ContradictionVerdict.YES.value}),
|
|
184
|
+
),
|
|
185
|
+
),
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def update_ladder(version: str) -> Ladder[TextPair, UpdateVerdict]:
|
|
190
|
+
"""The update probe as a two-rung ladder with a confirmation rung.
|
|
191
|
+
|
|
192
|
+
The first reading answers; a first ``CHANGES`` is read again on
|
|
193
|
+
``verification`` and the second reading's verdict, abstention included,
|
|
194
|
+
replaces it, so rung 2.5 retires only on two ``CHANGES``.
|
|
195
|
+
"""
|
|
196
|
+
return Ladder(
|
|
197
|
+
kind=QuestionKind.UPDATE,
|
|
198
|
+
abstain=UpdateVerdict.ABSTAIN,
|
|
199
|
+
rungs=(
|
|
200
|
+
Rung(name="update_slot", version=version, cost=CostClass.MODEL),
|
|
201
|
+
Rung(
|
|
202
|
+
name="update_slot_second",
|
|
203
|
+
version=version,
|
|
204
|
+
cost=CostClass.MODEL,
|
|
205
|
+
confirms=frozenset({UpdateVerdict.CHANGES.value}),
|
|
206
|
+
),
|
|
207
|
+
),
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def duplicate_ladder(version: str) -> Ladder[TextPair, DuplicateVerdict]:
|
|
212
|
+
"""The curation duplicate judge as a one-rung ladder."""
|
|
213
|
+
return Ladder(
|
|
214
|
+
kind=QuestionKind.DUPLICATE,
|
|
215
|
+
abstain=DuplicateVerdict.ABSTAIN,
|
|
216
|
+
rungs=(Rung(name="duplicate_judge", version=version, cost=CostClass.MODEL),),
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def _population_quantifier(item: CandidateInput) -> CandidateVerdict:
|
|
221
|
+
if population_quantifier(item[0]) is not None:
|
|
222
|
+
return CandidateVerdict.NOT_ENTAILED
|
|
223
|
+
return CandidateVerdict.ABSTAIN
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
#: A claim ranging over a kind is not entailed by claims about its members.
|
|
227
|
+
POPULATION_QUANTIFIER: Rung[CandidateInput, CandidateVerdict] = Rung(
|
|
228
|
+
name="population_quantifier",
|
|
229
|
+
version="1",
|
|
230
|
+
cost=CostClass.PURE,
|
|
231
|
+
decide=_population_quantifier,
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def candidate_ladder(judge_version: str) -> Ladder[CandidateInput, CandidateVerdict]:
|
|
236
|
+
"""The abstraction gate: the deterministic pre-check, then the entailment judge."""
|
|
237
|
+
return Ladder(
|
|
238
|
+
kind=QuestionKind.ENTAILMENT,
|
|
239
|
+
abstain=CandidateVerdict.ABSTAIN,
|
|
240
|
+
rungs=(
|
|
241
|
+
POPULATION_QUANTIFIER,
|
|
242
|
+
Rung(name="entailment_judge", version=judge_version, cost=CostClass.MODEL),
|
|
243
|
+
),
|
|
244
|
+
)
|
{linkedparticles_core-1.190.0 → linkedparticles_core-1.192.2}/particles/core/probe_verdict.py
RENAMED
|
@@ -23,6 +23,8 @@ operations that consult it:
|
|
|
23
23
|
clear it, so no new call is needed.
|
|
24
24
|
* :func:`subject_link_key` keys the one kind that is not a pair of claims: the
|
|
25
25
|
subject-link judge's pick among a name's Wikidata candidates.
|
|
26
|
+
* :func:`rung_kind` names the record set of a deterministic ladder rung,
|
|
27
|
+
whose verdicts the ledger keeps beside the probes'.
|
|
26
28
|
|
|
27
29
|
An edit to either claim changes its content hash and misses the record, and a
|
|
28
30
|
prompt change misses too. Pure: no I/O, no logging.
|
|
@@ -37,10 +39,12 @@ from enum import StrEnum
|
|
|
37
39
|
from particles.core.duplicate_key import content_hash
|
|
38
40
|
|
|
39
41
|
__all__ = [
|
|
42
|
+
"RUNG_KIND_PREFIX",
|
|
40
43
|
"ProbeKind",
|
|
41
44
|
"VerdictKey",
|
|
42
45
|
"prompt_hash",
|
|
43
46
|
"remembered_clear",
|
|
47
|
+
"rung_kind",
|
|
44
48
|
"subject_link_key",
|
|
45
49
|
"verdict_key",
|
|
46
50
|
]
|
|
@@ -78,6 +82,22 @@ _SYMMETRIC = frozenset(
|
|
|
78
82
|
)
|
|
79
83
|
|
|
80
84
|
|
|
85
|
+
#: The ``probe_kind`` prefix of a deterministic rung's ledger rows.
|
|
86
|
+
RUNG_KIND_PREFIX = "rung:"
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def rung_kind(name: str) -> str:
|
|
90
|
+
"""The ledger kind a deterministic rung's verdicts are recorded under: one per rung.
|
|
91
|
+
|
|
92
|
+
A model rung records under its probe's own :class:`ProbeKind`; every other
|
|
93
|
+
rung under ``rung:<name>``, so each rung's rows are its own record set.
|
|
94
|
+
"""
|
|
95
|
+
kind = f"{RUNG_KIND_PREFIX}{name}"
|
|
96
|
+
if len(kind) > 32:
|
|
97
|
+
raise ValueError(f"rung name too long for the ledger: {name!r}")
|
|
98
|
+
return kind
|
|
99
|
+
|
|
100
|
+
|
|
81
101
|
def prompt_hash(*parts: str) -> str:
|
|
82
102
|
"""A short, stable version string for a prompt rendered with placeholders.
|
|
83
103
|
|