From ORM Model to Production in Hours
🤖 AI-Driven Development Demo
Domain model created in ORM tool → Generated verbalizations + JSON schema automatically
(Click image to zoom)
{
"name": "CreditCardApplication",
"elements": [
{
"type": "EntityType",
"name": "Applicant",
"refMode": {
"name": "ID",
"dataType": "Integer"
}
},
{
"type": "EntityType",
"name": "CardType",
"refMode": {
"name": "Name",
"dataType": "Text"
},
"valueConstraint": {
"allowedValues": [
"Basic Card",
"Rewards Card",
"Premium Card"
]
}
},
...
]
}
Each Applicant is identified by an ID which is an Integer.
Each CardType is identified by a Name which is Text.
Each CardType must be one of 'Basic Card', 'Rewards Card', 'Premium Card'.
Each CreditCardApplication is identified by an ID which is an Integer.
A CreditScoreValue is a kind of Integer.
Each CreditScoreValue must be in the range 0 to 850.
A DTIRatioValue is a kind of Decimal.
Each DTIRatioValue must be in the range 0.0 to 0.50.
An EmploymentYearsValue is a kind of Integer.
Each EmploymentYearsValue must be in the range 0 to 99.
An ExistingAccountsCountValue is a kind of Integer.
Each ExistingAccountsCountValue must be in the range 0 to 99.
Each Applicant must have exactly one CreditScoreValue.
Each Applicant must have exactly one DTIRatioValue.
Each CreditCardApplication must be for exactly one Applicant.
Each CreditCardApplication must be for exactly one CardType.
...
Exported from ORM tool → Ready for AI consumption
AI-generated interface → Modern, responsive design with real-time validation
(Click image to zoom)
We will be building a CreditCardApplication approval API.
This is a demo for neuro-symbolic AI.
The specifications are in the specification folder off the root.
See CreditCardApp.json for the data model and CreditCardApp.txt for the business rules.
It will use a combination of DuckDb, Prolog, Logica, and AI (LLMs and LTNs) to make decisions.
It will have a web interface that will submit to the API endpoint built with Python and FastAPI.
See CreditCardAppUI.html for the web interface mock.
It will use Python or Prolog to orchestrate the system; although, Python is the API entry point.
The decision to orchestrate from Prolog or Python should be based on the amount of data
being passed and the complexity of the decision.
If Prolog is used, it will use SWI Prolog and Janus to interoperate with Python.
It will use DuckDb to store the data.
It may use Prolog to make decisions.
It may use Logica to make decisions. See logica_starter_kit for examples.
It may use AI (LLMs and LTNs) to make decisions.
It should choose the best combination of DuckDb, Logica, Prolog, and AI to make decisions.
It is not required to use all of DuckDb, Logica, Prolog, and AI to make decisions.
It may suggest other technologies as well.
It should be able to run on a single machine.
It should be able to run on Google Cloud.
For LLMs, use Gemini 2.5 Flash and the Gemini API
Minimal human input required → Full application
"Build a credit card approval API based on the ORM model (CreditCardApp.json) and business rules (CreditCardApp.txt). Use neuro-symbolic AI combining DuckDB, Logica, and AI (LLMs/LTNs). Include a web interface."
(Static SVG for demo stability. Click to zoom.)
(Click image to zoom)
sequenceDiagram
participant Client
participant Engine as Decision Engine
participant AIManager as AI Manager
participant LLM
participant LTN
participant Logica
participant DB
Client->>Engine: process_application
Note over Engine: Step 1 Create Records
Engine->>DB: create_applicant
Engine->>DB: create_application
Note over Engine: Step 2 AI Analysis
Engine->>AIManager: analyze_employment
AIManager->>LLM: analyze_notes
LLM-->>AIManager: analysis
Engine->>AIManager: calculate_stability
AIManager->>LTN: evaluate_constraints
LTN-->>AIManager: score
Note over Engine: Step 3 Business Rules
Engine->>Logica: execute_rules
Logica-->>Engine: results
Note over Engine: Step 4 Final Decision
Engine->>Engine: make_decision
Engine->>DB: update_application
Engine-->>Client: DecisionResponse
sequenceDiagram
participant App as FastAPI App
participant Engine as Decision Engine
participant AIManager as AI Manager
participant LLM
participant LTN
participant Config
App->>Engine: init
Engine->>AIManager: init
AIManager->>Config: get_ai_config
Config-->>AIManager: config
Note over AIManager: Initialize LLM
alt LLM Enabled
AIManager->>LLM: init
LLM->>Config: get gemini config
alt API Key Available
LLM-->>AIManager: available
else No API Key
LLM-->>AIManager: no_api_key
end
else LLM Disabled
AIManager-->>AIManager: disabled
end
Note over AIManager: Initialize LTN
alt LTN Enabled
AIManager->>LTN: init
alt Library Available
LTN-->>AIManager: available
else Import Failed
LTN-->>AIManager: failed
end
else LTN Disabled
AIManager-->>AIManager: disabled
end
AIManager-->>Engine: component_manager
Engine-->>App: decision_engine
sequenceDiagram
participant Client
participant Engine
participant AIManager
participant LLM
participant LTN
participant Logica
Client->>Engine: process_application
Note over Engine: AI Analysis with Fallbacks
Engine->>AIManager: analyze_employment_text
AIManager->>LLM: analyze_employment_notes
alt LLM Available
LLM-->>AIManager: ai_analysis
Note right of AIManager: method llm
else LLM Failed
AIManager->>AIManager: fallback_employment_analysis
Note right of AIManager: method fallback
end
Engine->>AIManager: calculate_stability_score
AIManager->>LTN: evaluate_stability_constraints
alt LTN Available
LTN-->>AIManager: ltn_score
Note right of AIManager: method ltn
else LTN Failed
AIManager->>AIManager: fallback_stability_calculation
Note right of AIManager: method fallback
end
Engine->>Logica: execute_rules
alt Logica Available
Logica-->>Engine: logica_results
Note right of Engine: logica_used true
else Logica Failed
Engine->>Engine: apply_fallback_rules
Note right of Engine: logica_used false
end
Engine-->>Client: DecisionResponse with fallback indicators
Excludes: presentation, docs, starter kit examples, auxiliary scripts
🚀 Try the Live Demo