Skip to main content

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.

Metadata

Release files for llm-mindmeld 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-mindmeld 0.2.0
File Size Uploaded Provenance
llm_mindmeld-0.2.0.tar.gz 30.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-mindmeld 0.2.0
File Interpreter ABI Platform
llm_mindmeld-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.8 kB

Release files / llm_mindmeld-0.2.0.tar.gz

Download URL llm_mindmeld-0.2.0.tar.gz
Size 30.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b1413e52783a3b5306325fcffea84a991e19ed8e639a0f4f88edb4f3c8218b88
BLAKE2b-256 checksum
How to use checksums
3320b28f7909ff618bb982f0b48eb0b84d8ea62d63b4792bdaf1b8d2a6855e91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2024.

Transparency log

Release files / llm_mindmeld-0.2.0-py3-none-any.whl

Download URL llm_mindmeld-0.2.0-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4dbd40677222167036c9bd6bc0ed59b10d344f59609671bd0f27ff58a1bd769b
BLAKE2b-256 checksum
How to use checksums
f45fbe53820e4c2dedefa8c0eac2e31ca8dc47903d3d53ec5f7cfd101246ace6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2024.

Transparency log

Security for llm-mindmeld 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llm_mindmeld-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2024.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page