GenAI: A New Paradigm for Problem-Solving with Undefined Inputs



Generative AI introduces a new programming paradigm where the input does not need to be explicitly defined. Instead of crafting rigid logic to process an input, we define the expected output format and use a prompt as a functional description of how to transform the input. The system then dynamically generates the best possible response, validated against the expected structure.
This approach unlocks solutions to problems that were previously difficult to model with traditional programming techniques. Let's explore this concept with examples and discuss its implications for software development.
The Traditional Paradigm: Defined Inputs, Defined Outputs
In classical programming, a function is designed with a strict contract:
Here, the function expects a structured input where the price follows a known pattern (e.g., $12.99). If the format changes significantly, this function will fail.
But what if we need to extract prices from unstructured text? Imagine dealing with various formats:
- "The cost is twelve dollars and ninety-nine cents."
- "€10,99 in Europe."
- "Price: 15 bucks."
Writing rules to cover all these variations would be tedious and fragile. This is where GenAI shines.
The GenAI Paradigm: Undefined Inputs, Standardized Outputs
Instead of crafting complex regex rules, we can define the expected output structure and let a large language model (LLM) handle the extraction dynamically.
Key Differences:
- Unstructured Input Handling: The input can be a sentence, a phrase, or a mix of languages.
- Declarative Function Logic: The function doesn’t "parse" the text directly—it describes what it expects.
- Format Validation: The AI must return a valid JSON object, ensuring standardization.
Solving Previously Hard Problems
Many real-world problems were difficult to solve with traditional programming because they required extensive rule-based processing. GenAI makes these problems tractable:
1. Extracting Information from Free-Form Text
- Traditional approach: Regex, NLP pipelines, entity recognition models.
- GenAI approach: Prompt-based extraction with standardized output validation.
Example: Extracting Job Experience from a Resume
This works across various resume formats without predefined parsing logic.
2. Generating SQL Queries from Natural Language
- Traditional approach: Manual query writing or limited keyword-based generation.
- GenAI approach: Convert text descriptions into valid SQL queries.
Without writing a SQL parser, we can generate structured queries dynamically.
GenAI as a New Tool in the Developer Toolbox
GenAI is not replacing traditional programming, but it adds a new paradigm that complements deterministic logic. Instead of handling every possible input variation manually, developers can define the desired output format and let AI handle input variability.
Where This Paradigm Works Best
- When inputs are unstructured: Emails, conversations, scanned documents, free-form text.
- When transformation logic is flexible: Summarization, language translation, query generation.
- When the output format is well-defined: JSON responses, function calls, structured data extraction.
Where Traditional Programming is Still Better
- Highly deterministic workflows: Banking transactions, safety-critical systems, low-level computation.
- Performance-sensitive applications: High-speed processing that requires low latency.
- Strict business rules: Tax calculations, legal compliance rules that must be explicitly defined.
Conclusion
GenAI shifts how we approach certain classes of problems by allowing unstructured inputs while maintaining structured outputs. It doesn't replace traditional programming but expands what’s possible, making previously hard problems solvable with simple prompts.
For developers, this means embracing a hybrid approach:
- Use traditional programming for well-defined logic.
- Use GenAI where inputs are unpredictable, but outputs can be standardized.
This is a powerful addition to the developer’s toolbox - one that should be embraced to build smarter, more adaptive software.
Checkout the articles below to see how we use AI for real-world use cases at Qovery 👇🏼

Suggested articles
.webp)