Accurately determining phase fractions in two-phase flows is among the most significant issues in Industries related to the production and processing of petroleum and petrochemicals. There are numerous sensor types and configurations for measuring the void fraction. In this respect, the capacitance-based sensor is commonly recognized as one of the most precise and widely utilized sensors. In this essay, COMSOL Multiphysics software, which has been benchmarked, was used for simulations with various electrode architectures for measuring oil-air two-phase flow in an annular pattern. The initial electrode configurations were helix, double ring, concave and parallel plates. Finite element analysis utilizing COMSOL Multiphysics was executed to compare the electrode configurations. Results exposed disparate sensitivities for different electrode geometries. To get better results, a new electrode geometry called arrow-shaped which was optimized with Artificial intelligence (AI) was proposed and compared with the others. The sensor responses presented demonstrated that the proposed arrow-shaped capacitance-based sensor had 21% higher sensitivity than the best-performing sensor among four other existing sensor designs, including concave, helix, double ring, and parallel plates. These results indicate the superior performance of the arrow-shaped sensor and its potential for use in high-sensitivity applications.