Plexe AI has released a library plexe, can be used with Python to create own custom ML models with the help of LLMs. Just in natural language, provided the requirements and context, this library makes the lives of engineers very easy in creating a custom model (with little python 🙂). This can be very much useful when we want something to be done in a way the LLMs do, but also not interested in a large generative model everytime.
The library is very much easier to use when compared to using an ML model. But the only major thing is, it is not giving a working model for me yet. No matter how many times I try, it ends up with an error for not finding item in its registry.
Though it is the case, let us see till what point it can take us. And then, finally we can look into the error as well.
Code
Below is the code with just basic requirement to create a model using plexe-ai/plexe library
import plexe
#from datasets import load_dataset
import pandas as pd
# Define the model
model = plexe.models.Model(
intent="Predict sentiment from news articles",
input_schema={"headline": str, "content": str},
output_schema={"sentiment": str}
)
# model = plexe.models.Model(
# intent="Predict sentiment from news articles"
# )
# Build and train the model
model.build(
datasets=[pd.read_csv('news_2025_1.csv')],
provider="gemini/gemini-1.5-flash",
max_iterations=3
)
# Use the model
prediction = model.predict({
"headline": "New breakthrough in renewable energy",
"content": "Scientists announced a major advancement..."
})
# Save for later use
plexe.save_model(model, "sentiment-model")
#loaded_model = plexe.load_model("sentiment-model.tar.gz")
Upon running our sample code (reference from the official Github README - github.com/plexe-ai/plexe), the script starts to run by executing respective agents in a sequential manner. From setting the prompt template till creating the code to generate the model for training and inference, all handled in a very much perfect way.
The agents go through each phase including the thinking part as well. With proper and reliable retries, the execution flows without flaws.
Each step involves a well-designed schematic plan to take forward the agents with expected success responses.
Every single piece of code that got generated get collated finally, but that’s when the problem arises. While finding the stored items from registry, there is an issue and the execution breaks without rendering the final model. I’m still experimenting the library and not sure if the library itself experimenting it :D
The above image has the error that kind of spun within the flow of execution (no external actions taken)
However, the idea and the setup of the library is great. Maybe, the team will be coming up with a stable solution to avoid flaws and issues in the future releases.
Happy learning ! Happy coding !!