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.2.0.tar.gz (30.2 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.2.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_mindmeld-0.2.0.tar.gz
  • Upload date:
  • Size: 30.2 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.2.0.tar.gz
Algorithm Hash digest
SHA256 b1413e52783a3b5306325fcffea84a991e19ed8e639a0f4f88edb4f3c8218b88
MD5 e58a96bd090daf27ae181f08ede8ad1b
BLAKE2b-256 3320b28f7909ff618bb982f0b48eb0b84d8ea62d63b4792bdaf1b8d2a6855e91

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_mindmeld-0.2.0.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: llm_mindmeld-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4dbd40677222167036c9bd6bc0ed59b10d344f59609671bd0f27ff58a1bd769b
MD5 e0d5e30b7f2b190c90e10ed35ac35749
BLAKE2b-256 f45fbe53820e4c2dedefa8c0eac2e31ca8dc47903d3d53ec5f7cfd101246ace6

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_mindmeld-0.2.0-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