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.3.0.tar.gz (15.6 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.3.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: synapt_extract-0.3.0.tar.gz
  • Upload date:
  • Size: 15.6 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.3.0.tar.gz
Algorithm Hash digest
SHA256 50a3ebd7b669cc2d2909ba752bf8092370b4991991a4ef3c1e252e70afd1201c
MD5 407ead910359cc3666913d5ff93cea86
BLAKE2b-256 0d4061de7ea32fc3862ea251b0128b9d3db78f039915c27e698f88fe3fd83c14

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: synapt_extract-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 22.5 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e22ed125bbe17326171662ebd3ba8ad9ce425da5af54673803fd9143a32f311
MD5 031c632eae1854c2acff15aec495c383
BLAKE2b-256 9cbd4374410b1a7ed48ebcb652eb4f6e6ed0539098a2bb8b93999294ba0dc243

See more details on using hashes here.

Provenance

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