█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

ell

LLM प्रॉम्प्ट्स को versioned Python functions के रूप में लिखें, फिर उन्हें ट्रैक और विज़ुअलाइज़ करें

Prompt Programmingओपन सोर्स
भाषा
Python
$pip install -U "ell-ai[all]"
संक्षेप में

ell क्या है?

ell LLM प्रॉम्प्ट्स को versioned Python functions के रूप में लिखें, फिर उन्हें ट्रैक और विज़ुअलाइज़ करें. यह App Orchestration टूल्स की Prompt Programming श्रेणी में आता है; ओपन सोर्स है और Python में लिखा गया है। शुरू करने के लिए: ell इंस्टॉल करें.

सारांश

ell एक Python framework है, जो prompt engineering के लिए बनाया गया है। यह prompts को सादे strings की जगह programs की तरह देखता है। आप ऐसा function लिखते हैं जो language model को भेजा जाने वाला text लौटाता है, और ell उसे language model program (LMP) बना देता है। Function का docstring system message होता है और उसकी return value user message होती है।

यह उन developers के लिए है जो प्रॉम्प्ट्स को बार-बार बदलते हैं और इस काम को ad-hoc editing के बजाय code की तरह संभालना चाहते हैं। ell हर version को auto-generated commit messages के साथ एक local store में सहेजता है, ताकि आप changes की तुलना कर सकें और समय के साथ regressions पकड़ सकें।

Prompt-programming tool के रूप में ell आपके application code और model API के बीच बैठता है। यह versioning, multimodal inputs और Ell Studio नाम का एक local web tool जोड़ता है, जिससे आप देख और विज़ुअलाइज़ कर सकते हैं कि आपके prompts कैसे बदलते हैं।

यह क्या करता है

  • @ell.simple decorator का उपयोग करके prompts को सामान्य Python functions के रूप में परिभाषित करें, जहाँ docstring system message होता है और return value user message
  • Prompts का automatic versioning और serialization एक local store में, auto-generated commit messages के साथ
  • Ell Studio, prompt version control, monitoring और visualization के लिए एक local open-source tool
  • पहली श्रेणी का multimodal support: ell.system और ell.user के जरिए Message objects में PIL images और दूसरे media को inline पास करें
  • Multimodal inputs और outputs के लिए rich type coercion, ताकि images के साथ काम करना text के साथ काम करने जैसा ही हो

शुरू करें

Package इंस्टॉल करें, अपना पहला language model program लिखें, और चाहें तो prompt versions देखने के लिए Ell Studio लॉन्च करें।

ell इंस्टॉल करें

PyPI से [all] extra के साथ ell और Ell Studio इंस्टॉल करें।

bashbash
pip install -U "ell-ai[all]"

इंस्टॉल की जाँच करें

जाँचें कि ell import होता है और version प्रिंट करता है।

bashbash
python -c "import ell; print(ell.__version__)"

Language model program लिखें

किसी function को @ell.simple से decorate करें। Docstring system message होता है और return value user message।

pythonpython
import ell

@ell.simple(model="gpt-4o")
def hello(world : str):
    """You are a helpful assistant that writes in lower case.""" # System Message
    return f"Say hello to {world[::-1]} with a poem."    # User Message

hello("sama")

Ell Studio लॉन्च करें

Prompt versions देखने और monitor करने के लिए किसी storage directory के सामने local studio शुरू करें।

bashbash
ell-studio --storage ./logdir

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • एक prompt को बार-बार बदलना और version history चाहना, ताकि changes की तुलना कर सकें और regressions को rollback कर सकें
  • Text और images को मिलाने वाले multimodal prompts बनाना, जैसे कैप्चर की गई फ़ोटो की सामग्री का वर्णन करना
  • Prompt engineering को code workflow की तरह लेना, जहाँ prompts को आपके Python project में checked-in functions के रूप में परिभाषित किया जाए
  • Strings को सीधे edit करने के बजाय local tool से देखना और विज़ुअलाइज़ करना कि समय के साथ prompts कैसे विकसित होते हैं

How ell compares

ell alongside other open-source prompt programming tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
Prompt Optimizer★ 43kऐसे वर्कबेंच में prompts को दोबारा लिखें, टेस्ट करें और उनकी तुलना करें जो पूरी तरह आपकी अपनी मशीन पर चलता है
DSPy★ 39.3kनाज़ुक prompts की जगह जोड़े जा सकने वाले modules से language models को प्रोग्राम करें
GEPA★ 7.7kप्रॉम्प्ट और अन्य टेक्स्ट पैरामीटर्स को LLM रिफ्लेक्शन और evolutionary search से ऑप्टिमाइज़ करें
ell★ 5.8kLLM प्रॉम्प्ट्स को versioned Python functions के रूप में लिखें, फिर उन्हें ट्रैक और विज़ुअलाइज़ करें
AdalFlow★ 4.2kLLM पाइपलाइन बनाने और अपने-आप ऑप्टिमाइज़ करने के लिए PyTorch जैसी लाइब्रेरी
LMQL★ 4.2kPython के कंट्रोल फ़्लो को LLM prompts और आउटपुट कंस्ट्रेंट्स के साथ जोड़ने वाली क्वेरी लैंग्वेज
Hunyuan PromptEnhancer★ 3.8kचेन-ऑफ-थॉट प्रॉम्प्ट रीराइटिंग, टेक्स्ट-टू-इमेज और इमेज एडिटिंग मॉडल के लिए
TextGrad★ 3.8kLLM feedback के ज़रिए backpropagation से प्रॉम्प्ट और टेक्स्ट वेरिएबल्स ऑप्टिमाइज़ करें