plexe library, define a model using natural language, build it using your data, and make predictions.
1. Installation
First, install theplexe library using pip. You can choose between a standard installation, a lightweight version (without deep learning dependencies), or include all optional dependencies.
2. Set Up Environment Variables
Plexe uses Large Language Models (LLMs) under the hood via the LiteLLM library. You need to configure API keys for the LLM provider you want to use. Set them as environment variables:openai/gpt-4o-mini if no provider is specified.
3. Prepare Your Data
For this example, let’s assume you have a CSV file namedhousing_data.csv with features like square_footage, bedrooms, bathrooms, and a target column price.
4. Define and Build the Model
Import theplexe library and create a Model instance. Define your goal using the intent parameter. You can also specify input and output schemas, though Plexe can often infer them.
The
build process involves multiple steps orchestrated by AI agents: planning, code generation, execution, analysis, and potentially fixing code. Enabling chain_of_thought=True provides verbose output showing these steps.5. Make Predictions
Once the model state isREADY, you can use the predict method.
6. Inspect the Model
You can get metadata and a description of the built model.7. Save and Load (Optional)
Persist your trained model for later use.plexe library. Explore the other tutorials and guides to learn about more advanced features.
