Condition For NaHCO3 to react to form CO2 with organic acids
$\ce{NaHCO3}$ is the basic sodium salt of carbonic acid, a diprotic acid which exists only in small amounts in aqueous solution, because the equilibrium

$$\ce{CO2 + H2O &lt;=&gt; H2CO3}$$

lies mainly on the educt side (this is also the reason why $\ce{CO2}$ evolution is observed). When this fact is taken into account, a $\ce{pK_{a}}$ value of 6.3 at 25 °C is obtained for the first protolysis step (source). Benzoic acid has a lower $\ce{pK_{a}}$ value of 4.19 and is therefore able to liberate carbonic acid from its salts, like any other acid that is significantly stronger than $\ce{H2CO3}$.

$$\ce{C6H5CO2H + NaHCO3 -&gt; C6H5CO2Na + CO2 + H2O}$$

Just in case that you mean 3,4-Dihydroxycyclobut-3-ene-1,2-dione, which is also known as squaric acid, then a reaction with $\ce{CO2}$ evolution is likely. Squaric acid is a fairly strong diprotic acid, with $\ce{pK_{a}}$ values of 1.5 and 3.4, respectively. The acidity can be attributed to the stabilization of the dianion by resonance:



If carbon dioxide evolution with 1,2-dihydroxy cyclobutanedione is possible depends on the $\ce{pK_{a}}$ value of this compound. However, I would expect it to be less acidic than squaric acid.