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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1413e52783a3b5306325fcffea84a991e19ed8e639a0f4f88edb4f3c8218b88
|
|
| MD5 |
e58a96bd090daf27ae181f08ede8ad1b
|
|
| BLAKE2b-256 |
3320b28f7909ff618bb982f0b48eb0b84d8ea62d63b4792bdaf1b8d2a6855e91
|
Provenance
The following attestation bundles were made for llm_mindmeld-0.2.0.tar.gz:
Publisher:
python-publish.yml on Shakakai/mindmeld
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_mindmeld-0.2.0.tar.gz -
Subject digest:
b1413e52783a3b5306325fcffea84a991e19ed8e639a0f4f88edb4f3c8218b88 - Sigstore transparency entry: 150264313
- Sigstore integration time:
-
Permalink:
Shakakai/mindmeld@a2df7cc2159e7f3d3b2d870c6523b668dcce87f9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Shakakai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a2df7cc2159e7f3d3b2d870c6523b668dcce87f9 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4dbd40677222167036c9bd6bc0ed59b10d344f59609671bd0f27ff58a1bd769b
|
|
| MD5 |
e0d5e30b7f2b190c90e10ed35ac35749
|
|
| BLAKE2b-256 |
f45fbe53820e4c2dedefa8c0eac2e31ca8dc47903d3d53ec5f7cfd101246ace6
|
Provenance
The following attestation bundles were made for llm_mindmeld-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on Shakakai/mindmeld
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_mindmeld-0.2.0-py3-none-any.whl -
Subject digest:
4dbd40677222167036c9bd6bc0ed59b10d344f59609671bd0f27ff58a1bd769b - Sigstore transparency entry: 150264315
- Sigstore integration time:
-
Permalink:
Shakakai/mindmeld@a2df7cc2159e7f3d3b2d870c6523b668dcce87f9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Shakakai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a2df7cc2159e7f3d3b2d870c6523b668dcce87f9 -
Trigger Event:
push
-
Statement type: