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.0.tar.gz (12.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.1.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: synapt_extract-0.1.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for synapt_extract-0.1.0.tar.gz
Algorithm Hash digest
SHA256 30b865aeb9f3bc1e41228e5ada4b312061c9b064d17a9e892d29a67d4aba59b1
MD5 5a38f4826c1e4693587a9b1ba97da954
BLAKE2b-256 f3c689cf4e04996089a1137dff5da3411ab67dba2a85ccca1c0cd47beb57ace0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: synapt_extract-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for synapt_extract-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 776a78262964b18bc5fbfd19fc8084e83a188bbb2229cdbc37ad001cdc4bad54
MD5 0e016f5f741e25c9a9a54dcb2abbafb9
BLAKE2b-256 50fa0d6f1f45b9c0f1e384a5007af16684010998044cd6314aaec05f2c0ff285

See more details on using hashes here.

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