build process, explicitly defining them provides clarity and ensures the generated model adheres to your requirements.
You can provide schemas during plexe.Model initialization using either Pydantic models or Python dictionaries.
Using Pydantic Models
Pydantic models offer robust type validation and are the recommended way to define schemas.Using Dictionaries
You can also define schemas using simple Python dictionaries mapping field names to their types.When using dictionaries, Plexe currently supports basic Python types like
int, float, str, and bool. For more complex types or validation rules, use Pydantic models directly.Schema Inference
If you don’t provideinput_schema or output_schema but do provide datasets during the model.build() call, Plexe will attempt to infer the schemas:
- Identify Target: An LLM analyzes the column names and your
intentto identify the most likely target variable(s) for the output schema. - Determine Types: Data types are inferred from the provided Pandas DataFrame(s).
- Construct Schemas: Inferred input and output schemas are created.

