Core Usage
🏗 Defining ExoModels
Inherit from ExoModel to give your data structures "AI powers." Use Pydantic's Field to provide descriptions that the LLM will use to understand the context of each field.
from exomodel import ExoModel
from pydantic import Field
class Project(ExoModel):
title: str = Field(description="The name of the project")
budget: float = Field(description="Estimated cost in USD")
🧠 AI Interactions
Initialization by Prompt
You can instantiate a model directly from a natural language description.
Self-Analysis with RAG
ExoModels can analyze themselves against specific business rules provided via RAG.
class BusinessDocument(ExoModel):
content: str
@classmethod
def get_rag_sources(cls):
return ["docs/compliance_rules.pdf"]
doc = BusinessDocument(content="Draft content...")
analysis = doc.run_analysis()
Field Updates
Update specific fields using natural language.
📋 Managing Collections
Use ExoModelList to handle multiple entities, enabling bulk generation and UI-ready exports.