dcupl AI
dcupl AI brings artificial intelligence capabilities to your data layer. Leverage AI for intelligent model generation, data quality analysis, workflow creation, and interactive assistance.
Overview
flowchart TB
subgraph Input["User Input"]
D[Sample Data]
P[Natural Language]
F[Files]
end
subgraph AI["AI Processing"]
M[Model Generation]
L[Data Linting]
W[Workflow Proposals]
C[Chat Assistant]
end
subgraph Output["AI Artifacts"]
MD[Model Definition]
QR[Quality Report]
WT[Workflow Template]
MK[Mock Data]
end
D --> M --> MD
D --> L --> QR
P --> W --> WT
P --> C --> MK
F --> C
dcupl AI is powered by Claude and provides:
- Model Generation - Infer data models from sample CSV/JSON data
- Data Quality Linting - AI-powered analysis and recommendations
- Workflow Proposals - Generate workflows from natural language descriptions
- Mock Data Generation - Create realistic test datasets
- Interactive Chat - Get help with any dcupl task
Core Concepts
Artifacts
AI operations return artifacts - reusable outputs that can be integrated into your project:
| Artifact Type | Description | Actions |
|---|---|---|
model-definition |
dcupl model specification | View, Edit, Use in project |
mock-data |
Generated test dataset | View, Export, Use as data source |
workflow-template |
Workflow configuration | View, Import to designer |
quality-report |
Data quality analysis | View issues and recommendations |
Agent Mode
The AI can work in agent mode - autonomously executing multiple steps to complete complex tasks:
flowchart LR
U[User Request] --> A{AI Analyzes}
A --> T1[Tool Call 1]
T1 --> T2[Tool Call 2]
T2 --> R[Final Response]
Available tools:
model-infer- Generate model from datadata-lint- Analyze data qualityworkflow-propose- Suggest workflowsmock-data- Generate test data
Model Generation
From Sample Data
Generate models automatically from your data:
- Open the AI Chat in the Console
- Drag and drop a CSV or JSON file
- Ask: "Generate a model from this data"
- Review the generated model
- Click Use Model to add to your project
Example:
id,name,price,category,inStock
1,Laptop,999.99,Electronics,true
2,Mouse,29.99,Electronics,true
3,Desk,249.00,Furniture,falseThe AI generates:
{
"key": "product",
"properties": [
{ "key": "id", "type": "int" },
{ "key": "name", "type": "string" },
{ "key": "price", "type": "float" },
{ "key": "category", "type": "string" },
{ "key": "inStock", "type": "boolean" }
]
}AI-Inferred Features
The AI can detect and configure:
- Data types - string, int, float, boolean, date, array
- Validation rules - email format, URL format, numeric ranges
- Enum values - when a field has limited distinct values
- Nullable fields - based on missing data patterns
- Relationships - when field names suggest references (e.g.,
customerId)
API Request
const response = await fetch('https://<your-project>.dcupl.com/v1/ai/models/infer', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
sample: [
{ name: 'John', age: 30, email: 'john@example.com' },
{ name: 'Jane', age: 25, email: 'jane@example.com' },
],
hints: {
targetModelDescription: 'Customer data model',
},
}),
});
const { artifacts } = await response.json();
// artifacts[0].payload contains the model definitionData Quality Linting
Analyze Your Data
Get AI-powered insights into data quality issues:
- Open a data file in the Console editor
- Click the AI button
- Type: "Lint this data"
- Review the quality report
Quality Analysis
The AI checks for:
- Missing values - Null or undefined fields
- Type inconsistencies - Mixed data types in a column
- Format issues - Invalid email, date, or URL formats
- Duplicates - Duplicate records or keys
- Outliers - Unusual or suspicious values
- Referential integrity - Broken references between models
Quality Report Example
{
"artifactType": "quality-report",
"payload": {
"qualityIssues": [
{ "severity": "warning", "message": "5 records have missing email addresses" },
{ "severity": "error", "message": "Phone numbers have inconsistent formats" },
{ "severity": "warning", "message": "3 duplicate customer IDs found" }
],
"recommendations": [
"Add required validation for email field",
"Standardize phone number format to E.164",
"Add unique constraint on customer ID"
],
"summary": {
"totalRecords": 1000,
"issueCount": 8,
"qualityScore": 92
}
}
}Workflow Proposals
Generate from Description
Create workflows using natural language:
- Open the AI Chat
- Describe your workflow: "Create a workflow that syncs products from an external API daily and sends a Slack notification if any fail"
- Review the proposed workflow
- Click Use Workflow to import
Example Conversation
User: "I need a workflow that fetches customer data from our CRM API, enriches it with order history, and updates our analytics database"
AI Response:
flowchart LR T[Scheduled Trigger
Daily at 6 AM] --> F[Fetch CRM Data] F --> E[Enrich with Orders] E --> U[Update Analytics DB] U --> N[Send Completion Report]
The AI generates a complete workflow template with:
- Trigger configuration
- HTTP request nodes with proper authentication
- Data transformation scripts
- Error handling
Script Refinement
Improve existing workflow scripts:
- Open a workflow in the designer
- Select a script node
- Ask: "Add error handling to this script"
- Review and apply the improved script
// Before
return items.map((item) => process(item.json));
// After (AI-improved)
return items
.map((item) => {
try {
const result = process(item.json);
return { json: result, metadata: { processedAt: Date.now() } };
} catch (error) {
console.error('Processing failed:', error.message);
return {
json: { error: error.message, original: item.json },
metadata: { failed: true },
};
}
})
.filter((item) => !item.metadata?.failed);Mock Data Generation
Create Test Data
Generate realistic mock datasets:
- Open your model definition
- Click AI and ask: "Generate 100 sample records"
- Review the generated data
- Click Use Data to add to your project
Example
For a customer model, the AI generates:
[
{
"key": "cust-001",
"name": "Alice Johnson",
"email": "alice.johnson@email.com",
"phone": "+1-555-0101",
"address": "123 Oak Street, Portland, OR 97201",
"createdAt": "2025-03-15T10:30:00Z"
},
{
"key": "cust-002",
"name": "Bob Martinez",
"email": "bob.martinez@email.com",
"phone": "+1-555-0102",
"address": "456 Pine Avenue, Seattle, WA 98101",
"createdAt": "2025-03-16T14:22:00Z"
}
]The AI respects:
- Field types and constraints
- Validation rules (valid emails, phone formats)
- Enum values
- Referential integrity (if multiple models)
Interactive Chat
Chat Interface
Access the AI chat from anywhere in the Console:
- Click the Assistant icon in the toolbar
- Type your question or drag files into the chat
- Get streaming responses with artifacts
Features
- Streaming responses - Real-time token streaming
- File attachments - Upload JSON/CSV (max 50MB)
- Multi-turn conversations - Context is maintained
- Artifact generation - AI outputs can be used in projects
Example Conversations
User: "What's the best way to model a many-to-many relationship between products and categories?"
AI: "In dcupl, you can model many-to-many relationships using array references. Here's the recommended approach..."
{
"key": "product",
"properties": [
{ "key": "name", "type": "string" },
{ "key": "categories", "type": "Array<Reference<category>>" }
]
}User: (drops CSV file) "Why is my data not loading correctly?"
AI: "I see some issues with your CSV file:
- Row 45 has a malformed date in the 'createdAt' column
- The 'price' column contains text values in 3 rows
- Some rows are missing the required 'id' field
Here's how to fix these..."
User: "How do I retry failed HTTP requests in a workflow?"
AI: "You can implement retry logic using error ports and conditional edges. Here's a pattern..."
Best Practices
Model Generation
- Provide representative data - Include all field variations and edge cases
- Use sufficient sample size - 10+ rows helps AI understand patterns
- Review generated models - Verify inferred types and add constraints
- Iterate - Regenerate if the first result isn't optimal
Data Linting
- Lint before deployment - Catch issues early
- Act on recommendations - Implement suggested validators
- Regular quality checks - Lint after data updates
- Document exceptions - Note intentional data patterns
Chat Usage
- Be specific - Clear instructions get better results
- Provide context - Include relevant files and constraints
- Iterate - Ask follow-up questions to refine outputs
- Review artifacts - Always verify AI-generated content
Configuration
Available Models
| Model | Use Case | Iterations |
|---|---|---|
| Claude | General AI tasks | Up to 10 |
File Limits
- Max file size: 50MB
- Supported types:
.json,.csv - Sources: Desktop drag-drop, Console file browser
Agent Configuration
{
agentic: true,
agentOptions: {
maxIterations: 10 // Maximum tool calls per request
}
}What's Next?
- Workflows - Build automated data pipelines
- RAPI - Deploy REST APIs from your models
- SDK Integration - Connect AI-generated models to your app