Skip to main content

SynaptExtraction IL v1 -- schema, validation, and finalization

Project description

synapt-extract

SynaptExtraction is the intermediate language (IL) for synapt's product stack. It is the universal exchange format between text extraction and intelligence operations.

Any text + Any LLM  ->  SynaptExtraction (IL)  ->  @synapt/memory (intelligence)

Install

pip install synapt-extract

Quick start

from synapt_extract import (
    build_extraction_prompt,
    finalize_extraction,
    FinalizeContext,
)

# 1. Build a prompt
prompt = build_extraction_prompt(text, profile="standard")

# 2. Send to any LLM, parse JSON response
llm_output = json.loads(llm.complete(prompt))

# 3. Finalize
result = finalize_extraction(llm_output, FinalizeContext(
    produced_by="openai://gpt-4o-mini",
    user_id=user_id,
    kind="conversa/prayer",
))

assert result.validation.valid

Prompt profiles

Profile Model class Capabilities
minimal 3B-7B local entities, entity_state, goals, themes, summary
standard GPT-4o-mini, Haiku + entity_context, goal_timing, facts, temporal_refs, sentiment, evidence_anchoring
full GPT-4o, Sonnet, Opus + entity_ids, goal_entity_refs, relations, relation_origin, assertion_signals, temporal_classes

Links

License

MIT

Project details


Download files

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

Source Distribution

synapt_extract-0.2.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

synapt_extract-0.2.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file synapt_extract-0.2.0.tar.gz.

File metadata

  • Download URL: synapt_extract-0.2.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for synapt_extract-0.2.0.tar.gz
Algorithm Hash digest
SHA256 65979d3637bfb15e5ebf854c43e0b229279960bffed5e67a1f60b586ebfec3a0
MD5 f0a158cd8827dcc14a98102598432366
BLAKE2b-256 8dc6e0575cc9b2626fdd3890eb119b5efd8446b7aefaa2703a945a396c6986bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for synapt_extract-0.2.0.tar.gz:

Publisher: publish-pypi.yml on synapt-dev/extract

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synapt_extract-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: synapt_extract-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for synapt_extract-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5eceed72ffc67f68e50af8647ec7b392d89665598a8a03b811586077470b87c
MD5 6971eb5a291e36d453d3f2cd072092e5
BLAKE2b-256 e049c56389161dd409f87576535bb7546989e8e4b7143b8afb94c95899f07ee9

See more details on using hashes here.

Provenance

The following attestation bundles were made for synapt_extract-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on synapt-dev/extract

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page