Skip to main content

JIPSO framework for prompt orchestration and comparison

Project description

JIPSO Framework Logo

📰 Paper Codecov PyPI version Docker Pulls Documentation Status FOSSA Status

INSTALL

pip install jipso

🚀 QUICK START

Example 1

import jipso
import os

os.environ['OPENAI_API_KEY'] = 'sk-proj-...'

prompt1 = 'Write leave request email'
prompt2 = 'Write formal leave request email with clear reason and timeline'
o_eval = jipso.pvp(prompt1, prompt2)
print(o_eval)

# ✅ **Function executed:** pvp("Write leave request email", "Write formal leave request email with clear reason and timeline"

# **Test Input Generated:** Employee needs 3 days off next week for medical appointment

# **Results:**
# - **P1 Output:** Generic leave request mentioning time off needed
# - **P2 Output:** Structured email with specific dates, medical reason, coverage arrangements, and professional formatting

# 📊 **Score:** P1 = 3.2/10 (P2 baseline = 5.0)
# 📝 **Reasoning:** P1 produces vague, incomplete emails missing key details like specific dates, reasons, and professional structure. P2's explicit requirements for "clear reason and timeline" generate comprehensive, actionable requests that managers can easily approve. P2 consistently outperforms P1 in completeness, professionalism, and practical utility.

Example 2 (2235)

import jipso

os.environ['ANTHROPIC_API_KEY'] = 'sk-ant-...'

p1 = jipso.Prompt('Collect sales figures this week')
p1.add('Customer trend analysis')
print(p1)
# Collect sales figures this week and perform customer trend analysis

p2 = jipso.Prompt('Customer trend analysis')
p = p1 | p2
print(p)
# Collect sales figures this week and perform customer trend analysis

print(p > p2)
# True

p3 = p.enhance()
print(p3)
# Collect detailed sales figures for this week including revenue, units sold, and transaction counts by product category and customer segment, then perform comprehensive customer trend analysis identifying purchasing patterns, seasonal variations, and emerging opportunities with actionable insights and recommendations

print(set(p3))
# {
#   'Collect detailed sales figures for this week',
#   'Include revenue data', 
#   'Include units sold data',
#   'Include transaction counts',
#   'Categorize by product category',
#   'Categorize by customer segment', 
#   'Perform comprehensive customer trend analysis',
#   'Identify purchasing patterns',
#   'Identify seasonal variations', 
#   'Identify emerging opportunities',
#   'Provide actionable insights',
#   'Provide recommendations'
# }

print(dict(p3))
# {
#   "name": "comprehensive_sales_analysis",
#   "description": "Collect detailed sales data and perform customer trend analysis",
#   "data_collection": {
#     "timeframe": "this week",
#     "metrics": ["revenue", "units_sold", "transaction_counts"],
#     "segmentation": ["product_category", "customer_segment"]
#   },
#   "analysis": {
#     "type": "comprehensive_customer_trend_analysis",
#     "focus_areas": ["purchasing_patterns", "seasonal_variations", "emerging_opportunities"]
#   },
#   "output": {
#     "format": ["actionable_insights", "recommendations"],
#     "detail_level": "comprehensive"
#   }
# }

Example 3

import jipso

os.environ['GEMINI_API_KEY'] = 'sk-ant-...'

j = jipso.Judgement('models/gemini-1.5-flash')
i = 'Hi, I would like to ask about the Dell XPS 13 laptop. What is the current price and are there any promotions? Thank you!'
p = 'Please categorize this email into one of the following categories: Product Advice, Complaints, Technical Support, Orders, Other'
s = 'Based on the main content and purpose of the email. Choose only 1 category that best fits.'
o = j(i=i, p=p, s=s)
print(o)

# **Category: Product Advice**
# Reason: The email asks about current pricing and promotions for the Dell XPS 13 laptop, indicating the sender is researching to make a purchase decision — in the product consulting group.

Example 4

import jipso

os.environ['ALIBABACLOUD_API_KEY'] = 'sk-...'

compute = jipso.Compute(
  j = 'qwen-turbo',
  i = 'Hi, I would like to ask about the Dell XPS 13 laptop. What is the current price and are there any promotions? Thank you!',
  p = 'Please categorize this email into one of the following categories: Product Advice, Complaints, Technical Support, Orders, Other',
)
compute.s = 'Based on the main content and purpose of the email. Choose only 1 category that best fits.'
compute.exe()
print(compute.o)

🕌 ARCHITECT jipso-stack

Node Docker Image Engine Role
Client Node - jipso-py Request jipso.Compute.exe()
Worker Node jipsofoundation/jipso celery Run jipso.Compute, wrap all AI model
Proxy Node nginx Nginx Rate limiting
Cache Node - Redis GPU? (please build it or we will jipso-cache) Cache VRAM
Broker Node bitnami/kafka Kafka Message Queue Broker
Database Node postgres PostgreSQL Database for jipso.Compute
Storage Node minio/minio Minio, S3, CDN Media content
Metric Node influxdb InfluxDB Metric: cost, SLA. Metric database and monitoring. Worker Node proactive push
Auth Node keycloak/keycloak Keycloak Authentication, API key management

💰 SPONSORSHIP

This project has received no external funding, sponsorship, or investment. All development is fully volunteer-based at this stage.

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

jipso-0.1.18.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

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

jipso-0.1.18-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file jipso-0.1.18.tar.gz.

File metadata

  • Download URL: jipso-0.1.18.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for jipso-0.1.18.tar.gz
Algorithm Hash digest
SHA256 89d6dee11bd939a0743bba3a2c0a7b52359a17863b9a18ee2deab7d0dcf89817
MD5 74d707ca19f076fd228021231ecf9e22
BLAKE2b-256 c2f9e9620ca78e2ea695616830f10c30884aac3bf0d3ce966e8fc89c8c26b358

See more details on using hashes here.

Provenance

The following attestation bundles were made for jipso-0.1.18.tar.gz:

Publisher: release.yml on jipso-foundation/jipso-py

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

File details

Details for the file jipso-0.1.18-py3-none-any.whl.

File metadata

  • Download URL: jipso-0.1.18-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for jipso-0.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 c0ef1ebc219957c124efea4e5bfcc3ee93f9a8a8a3e14dbf549789dabf51fb98
MD5 25713780ca8cb49da051e99de0dc1ff7
BLAKE2b-256 47e7de85339e00a9f9426cb25438921df36c0d5875a77967bf6721158332f30b

See more details on using hashes here.

Provenance

The following attestation bundles were made for jipso-0.1.18-py3-none-any.whl:

Publisher: release.yml on jipso-foundation/jipso-py

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