The Lang-Weil bounds imply that for a geometrically irreducible variety $X$ of dimension d over $\overline{\mathbb{F}_p}$ we have,
$$|N_q(X)-q^{d}|\le O(q^{d-1/2}),$$

where $N_q(X)$ is the number of $\mathbb{F}_q$ points on $X$.

Are there any explicit expressions for what $O(q^{d-1/2})$ can be in general? I can find several references for the case of geometrically irreducible hypersurfaces (such as [this question on math overflow][1]). I just wanted a reference to a general explicit expression (I imagine I could calculate it from some inductive arguments, but I was wondering if there are known citable references).

Edit: Found an answer [here][2]
$$|N_q(X)-q^{d}|\le (\delta-1)(\delta-2)q^{d-1/2}+5\delta^{13/3}q^{d-1},$$
where $\delta$ is the degree of $X$.

  [1]: https://mathoverflow.net/questions/352053/density-of-rational-points-over-finite-fields-an-estimate-of-lang-weil-constant
  [2]: https://arxiv.org/pdf/math/0405302.pdf