Empirical Computation: Prompting versus Programming
Summary
This vision paper introduces "empirical computation," a paradigm where solutions are empirically most likely rather than necessarily correct, contrasting it with traditional "formal computation" (programming). It calls for the software engineering community to develop new foundations and techniques to analyze the properties of this approach. Experiments using GPT-3.5 Turbo on problems like sorting and searching demonstrate that LLM execution time is independent of computational complexity, but correctness significantly decreases as input size increases. For instance, sorting 50 numbers yields a 50% correctness probability. The study also found that correctness improves for "familiar" problem instances (e.g., LLM-generated) and is higher when inputs are provided in languages well-represented on the internet, such as English, compared to underrepresented languages like Korean.
Key takeaway
For software engineers integrating LLMs for computational tasks, recognize that "empirical computation" prioritizes probabilistic likelihood over guaranteed correctness. You should anticipate correctness degradation with increasing input size and consider prompt engineering, fine-tuning, or test-time training to improve reliability. Be aware that input language and "familiarity" significantly influence LLM performance, necessitating careful input design and validation for critical applications.
Key insights
Empirical computation, driven by LLMs, yields probabilistically correct solutions, demanding new software engineering analysis methods.
Principles
- LLM computation time is complexity-agnostic.
- Correctness decreases with input size.
- "Familiarity" and language representation impact accuracy.
Method
Experiments used LLM-GPT-Sort with GPT-3.5 Turbo, varying input properties like precision, magnitude, and array length for sorting, searching, longest palindromic substring, and subset sum problems.
In practice
- Use prompt engineering to maximize correctness.
- Consider fine-tuning or reinforcement learning for improvement.
- Provide inputs in well-represented languages for better accuracy.
Topics
- Empirical Computation
- Large Language Models
- Software Engineering
- Computational Complexity
- Prompt Engineering
- Correctness Analysis
- GPT-3.5 Turbo
Code references
Best for: AI Scientist, Software Engineer, Research Scientist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.