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.1.1.tar.gz (12.8 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.1.1-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: synapt_extract-0.1.1.tar.gz
  • Upload date:
  • Size: 12.8 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.1.1.tar.gz
Algorithm Hash digest
SHA256 405c89e55739a2f5db96b0e3c9a6ce98e86cbaed39cb8fca83513ab668fc6150
MD5 f73d196c8789c69e84ce4804acc11829
BLAKE2b-256 6683b97a540f325d674eff35f36f58a39485361131db0b529d5577db850cac5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for synapt_extract-0.1.1.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.1.1-py3-none-any.whl.

File metadata

  • Download URL: synapt_extract-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.7 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a5107dfa240da5bc7de00725b3df70799cf68010253d9360cc2b3deddf1d94b4
MD5 fb3d43206003b4e49bb7dda7593472ba
BLAKE2b-256 0672c78a8411a05dcbb8f756a719c028b51e25c7327ee398ec64edaa555978e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for synapt_extract-0.1.1-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