In a previous post, we shared our view that AI may not be helpful with Domain Exploration. Some parts still hold true, but it didn’t stop us from exploring other ways that AI could help.
Generative AI is inherently probabilistic, which means it isn’t the best at delivering pinpoint accuracy or consistent results.
However, it excels at sparking ideas—an invaluable capability for innovation.
So, how do we leverage this strength?
Defining the Objective
We began by asking: if we provide a loosely defined domain description::
- Could a GPT create a logical Domain Model?
- How reasonable would that Domain Model be?
- Most importantly: could the GPT generate a Domain Model we can interact with using Fresnel?
To answer these questions, we designed an experiment. We built a custom GPT model trained using the Fresnel Developer Guide (sourced from the online wiki) and equipped it with tailored instructions to produce Fresnel-compatible .NET code.
6-Step Process
This 90-second video shows our investigative process from start to finish (edited):
The overall steps were:
1. Prompt ChatGPT with the textual domain problem
We started with an intentionally open-ended domain description:
I run a photography studio, and have an inventory of Drones.
These Drones are used for various Photo Shoots.
Different Team Members are assigned to Photo Shoots.
A Photo Shoot usually has multiple team members.
Usually the members are the main pilot, and an additional person for support.
Generate a model for a "Drone Management System" that lets me:
- Keep an inventory of Drones.
- Keep a list of Team members.
- Assign Drones to photo shoots.
- Assign Team Members to photo shoots.
To generate demo data for testing, we added:
Create Demo Data Builder classes for Drones and Team Members.
Each builder should generate a list of 10 objects filled with demo data.
Demo data should use realistic names.
These classes will be used to inject the demo data into the appropriate repositories.
2. Get the GPT to generate .NET model code.
The GPT inferred the following objects and relationships:
- Drone
- Drone Status (enum)
- Team Member
- Team Member Role (enum)
- Photo Shoot
- Photo Shoot -> Location (single, value object)
- Photo Shoot -> Drone (single)
- Photo Shoot -> Team Members (collection)
Additionally (after being asked), the GPT generated in-memory repository classes and data builders for drones, team members, and photo shoots.
- Drone Repository (in-memory)
- Drone Demo Data Builder
- Team Member Repository (in-memory)
- Team Member Data Builder
- Photo Shoot Repository (in-memory)
3. Create an empty Fresnel Template project.
These steps are available in the online wiki:
> mkdir AI_DroneManagement
> cd AI_DroneManagement
> dotnet new install Envivo.Fresnel.Templates
> dotnet new fresnel-prototype-winforms
4. Paste the generated code into the Fresnel project.
We manually integrated the generated files (11 in total) into the project. While doing so, we noticed the model was missing a Location concept for photo shoots. A quick prompt to GPT solved this, and we added the updated code.
5. Apply code corrections as necessary.
As expected, some tweaks were required:
- Missing
usingstatements, quickly fixed via IDE shortcuts. - Non-existent namespaces were adjusted manually.
- The
annotations required refinement for object relationships.[RelationshipAttribute]
6. Test the interactive prototype.
This high-level test followed these steps:
- Check main entities are visible in the Library (Drone, Photo Shoot, Team Member)
- Confirm that sample Drone records are available (Search)
- Confirm that sample Team Member records are available (Search)
- Create a Photo Shoot
- Edit details
- Assign a Drone
- Assign Team Members
- Save the Photo Shoot
- Reload the Photo Shoot
- Confirm saved details are present

Results From The Investigation
The experiment delivered promising results:
- Overall Time: The process took 13 minutes, including manual revisions and demo data generation.
- Code Accuracy: Generated code was 95% correct, with minor adjustments needed.
- Code Output: 381 lines of code were generated—enough to drive the Fresnel prototype.
- GPT Speed: The model code generation itself took just 3 minutes.
Key Insights
- Restarting GTP Sessions: If GPT veers off track early, starting a new session is more effective.
- Model Edits: Once the basic framework is in place, model adjustments quicker to do manually in the C# code.
- Relationship Attributes: GPT struggles with context-sensitive
[RelationshipAttribute]annotations. - Relationship Attributes: The use of Aggregate References can be hit-and-miss.
- Sample Data: GPT is great at generating demo data for initial testing.
- GPT Prompt Precision: More detailed prompts improve the quality of sample data.
Final words
While our custom Fresnel GPT still has room for refinement, it’s already a powerful tool for rapid prototyping. In just minutes, we can sketch out ideas, engage stakeholders, and gather feedback with an interactive prototype.
When it comes to getting an idea off the ground, it doesn’t get much quicker than this.
We Create Bespoke Business Software
Let us help you accomplish more.
