Skip to main content

A framework to glue all your AI tools together

Project description

mindmeld

A Python framework for testing and evaluating Large Language Model (LLM) content generation with a focus on maintaining consistent style and tone across responses.

Features

  • Define structured input/output schemas using Pydantic models
  • Create inference configurations with example-based learning
  • Evaluate LLM outputs using automated judges
  • Set quality thresholds for acceptance criteria
  • Support for multiple evaluation metrics and runs

Usage Example

Here's an example of defining an inference configuration for generating Reddit comments in a specific user's style:

from mindmeld.inference import Inference, RuntimeConfig, run_inference, eval_inference, AIProvider, AIModel
from mindmeld.metrics.echo import echo
from pydantic import BaseModel
import os
# Define your input/output schemas
class EchoInput(BaseModel):
    text: str

class EchoOutput(BaseModel):
    result: str

# Register the active models and set defaults
runtime_config =RuntimeConfig(
    models=[
        AIModel(
            provider=AIProvider(name="openai"),
            name="gpt-4o"
        )
    ],
    eval_model="gpt-4o",
    default_model="gpt-4o"
)

# Create an inference configuration
inference = Inference(
    id="echo",
    instructions="""
    Echo back the input text.
    """,
    input_type=EchoInput,
    output_type=EchoOutput,
    examples=[
        (EchoInput(text="Hello"), EchoOutput(result="Hello")),
        (EchoInput(text="Test"), EchoOutput(result="Test"))
    ],
    metrics=[
        echo()
    ],
    eval_runs=3,
    eval_threshold=0.9
)

# Run inference and evaluation
input_data = EchoInput(text="Hello, world!")
result = run_inference(inference, input_data, runtime_config)
eval_result = eval_inference(inference, input_data, runtime_config)

Installation

[Add installation instructions once package is published]

Documentation

[Add link to detailed documentation once available]

License

MIT License. See the LICENSE file for details.

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

llm_mindmeld-0.1.1.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

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

llm_mindmeld-0.1.1-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_mindmeld-0.1.1.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for llm_mindmeld-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1d2c2bdef5d11829f0a8ac95cf901800b66f418250ec708d5c50eee41af31a14
MD5 ab6ec1cd033642058332b315af2b104e
BLAKE2b-256 d22db9e74e964fa431e70c8e8c1b9daba95fcb78fa77a7f34770d0b0937d5fc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_mindmeld-0.1.1.tar.gz:

Publisher: python-publish.yml on Shakakai/mindmeld

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

File details

Details for the file llm_mindmeld-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: llm_mindmeld-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for llm_mindmeld-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d44732c02f24ee6da3b5248aa5a705c8ce0eabb03f322e2814cd976de08a8dc2
MD5 e3f535a52c6ae374461e1b1c3f4b945e
BLAKE2b-256 a7fa8b1fd9bc5252a748aa3b9f3792b847d5cb1d55987fc2ed5c32387a8b1d8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_mindmeld-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on Shakakai/mindmeld

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