Bug Report and Markdown Encoding Syntax Issues in Google AI Studio and API
Dear Google employees and esteemed employees of its contractor companies. I would like to submit a bug report regarding the Google AI Studio platform. I observed these bugs in both the graphical user interface and while working with the API. These are issues and very serious flaws concerning the correctness of Markdown syntax and encoding, where the rules for the correct formatting of this standard are violated.
Unjustified Use of LaTeX Formatting and Incorrect Notation of the Greek Alphabet in Pharmacology and Receptors
I asked the artificial intelligence questions in the fields of pharmacology, drug effects, and the mechanisms of psychoactive substances involving various brain receptors. Although science recognizes hundreds of additional receptors, I am an expert in this field and understand it thoroughly. Visually, right within the Google AI Studio interface, the system displayed everything completely correctly. A fundamental problem arose, however, the moment I attempted to convert these outputs into HTML code. Initially, I assumed that the error likely lay in the HTML converters themselves. Ultimately, it turned out that the root cause was incorrectly generated Markdown, in which using LaTeX formatting was entirely unnecessary.
Similarly, in the domain of neurological receptors—whether concerning psychoactive substances such as cannabinoids and the active compounds of cannabis, or the effects of psychiatric medications—the Greek alphabet is frequently utilized, yet this alphabet was improperly formatted in the generated Markdown.
Failure of Converters and the Pandoc Tool on Linux When Processing Subscripts and Chemical Formulas
As a result, standard online Markdown-to-HTML converters failed to handle this notation, and even such a renowned tool as Pandoc failed. Pandoc is a command-line utility without a graphical user interface, primarily intended for Linux. As a true professional, I am a Linux user and do not use Windows—in fact, I barely even know what kind of operating system Windows is, because Linux is more than sufficient for all my work. Although Pandoc is primarily intended for Linux, it can presumably run on Windows as well, but I mention that only as an aside. Pandoc is thus a headless tool capable of converting Markdown into HTML.
In the end, however, it became clear that under these conditions, not even Pandoc functions properly. In reality, Pandoc was not to blame; rather, the mistake was made by the developers of Gemini and AI Studio themselves, because they failed to implement official rules for Greek alphabet notation and introduced LaTeX where it was completely unnecessary and where standard Markdown would have been perfectly adequate. This applies, for example, to superscripts, subscripts, or mathematical formulas. Subscripts in particular appear very frequently in chemical formulas. For chemical formulas, one merely needs a standard subscript; it is not at all necessary to employ complex LaTeX formatting when I am simply asking about an ordinary chemical reaction, for instance.
Expert Feedback from a Specialist’s Perspective and a Demand for Action from Development Teams and Management
I am an exceptionally, extremely intelligent and highly educated individual with deep interests across multiple scientific disciplines, primarily neuroscience, chemistry, and pharmacology. Yet in this situation, I suddenly find that I cannot convert the generated output into HTML code because the Markdown format is structured incorrectly and you are violating Markdown formatting standards, which represents a clear defect. You must fix this without exception. It is of utmost importance that you escalate this feedback to upper management, who should subsequently assign a sufficiently large team of engineers to comprehensively address and resolve all these shortcomings, as that is your direct responsibility.
Issue with the Excessive Generation of Headings and Subheadings in Gemini and NotebookLM Models for WordPress
Likewise, the system generated an unreasonably large number of headings and subheadings. While this issue does not pertain exclusively to Google AI Studio—as I have experienced the exact same difficulties in both Gemini and NotebookLM environments—it is another Google AI product generating an enormous quantity of headings and sublevels. In practice, this causes tremendous complications: when I use a table-of-contents generator in WordPress, the result is completely cluttered and creates an unbearable amount of bloat when trying to display all these redundant subheadings.
This creates unnecessary extra work for me, because when I publish an AI-generated article on my private personal website, the whole piece appears disorganized due to the presence of useless and unjustified headings and subheadings. This structure should be handled differently, rather than producing so many varied heading levels, as this is not an appropriate solution.
VPS Server Overload, PHP Process Failure, and Timeout Errors During Content Generation
For example, while publishing a rather lengthy article, the VPS server on which I host WordPress simply froze. A timeout error occurred, indicating that the server could no longer handle such a processing load. It was an extensive article with an excessive number of headings and subheadings, where the table-of-contents plugin caused an overload that crashed the corresponding PHP process. This entire behavior is thoroughly impractical; therefore, I kindly ask you to fix all of these issues. This is a systemic flaw, but all such serious defects can be corrected, which I consider very positive, so you have plenty of work ahead of you.
*********
Bug Report: Markdown Formatting Degradation, Unnecessary LaTeX Math Invocation, and CommonMark Syntax Violations in Gemini Output
Target: Google AI Studio / Gemini Model Family (Flash & Pro series)
Category: Output Formatting / Markdown & LaTeX Tokenization / Post-Processing
Severity: Medium (Leads to broken HTML rendering, parser crashes, and unreadable text in standard web/CMS pipelines)
1. Executive Summary
When generating scientific, biomedical, and structured explanatory text, Gemini frequently produces malformed Markdown and unnecessarily wraps plain inline terms into LaTeX math delimiters ($...$).
This causes two critical downstream issues:
- Broken Math/Symbol Rendering: Standard Markdown-to-HTML parsers without MathJax/KaTeX (e.g., standard Pandoc, CMS like WordPress, Odysee, Static Site Generators) fail to render terms like
$\text{CB}_1$or$\alpha_1$, displaying raw escaped delimiters like\(\text{CB}_1\)or missing subscripts completely. - Structural Collapse of Lists and Quotes: The model frequently violates CommonMark standards by omitting blank lines before lists and blockquotes immediately following colons (
:), causing HTML parsers to squash ordered/unordered lists and quotes into a single continuous, unformatted paragraph.
2. Detailed Issues and Concrete Examples
Issue A: Overuse of LaTeX Math Mode for Chemical/Biological Nomenclature
- Observed Behavior: The model wraps simple biological receptors, chemical ions, and subscripts in LaTeX math mode instead of using native Unicode or standard semantic Markdown/HTML notation.
- Problematic Output Examples from Gemini:
$\text{CB}_1$and$\text{CB}_2$(Cannabinoid receptors)$\text{GABA}_A$$Ca^{2+}$and$Mg^{2+}$
- Why this is problematic: These are not mathematical equations. In non-academic environments lacking active MathJax JavaScript engines, this output breaks and renders literal LaTeX code (
\text{CB}_1). - Expected / Clean Behavior:
- Use Unicode/subscript/superscript notation directly:
CB₁,CB₂,GABA_A,Ca²⁺,Mg²⁺ - OR standard Markdown/HTML tags:
CB<sub>1</sub>,Ca<sup>2+</sup>.
- Use Unicode/subscript/superscript notation directly:
Issue B: Inconsistent and Unnecessary LaTeX for Greek Alphabet Characters
-
Observed Behavior: The model arbitrarily mixes native Unicode Greek letters with LaTeX escape sequences within the same paragraph.
-
Problematic Output Example:
...podjednotiek $\alpha_1$ a $\alpha_3$alongsidePPAR-γ(where gamma is Unicode, but alpha is in math mode).
-
Downstream Result: In rendered HTML, the browser displays:
(najmä podjednotiek \(\alpha_1\) a \(\alpha_3\)) -
Expected Behavior: Greek letters should be emitted consistently as plain UTF-8 characters (
α,β,γ,α₁,α₃) unless part of a complex standalone mathematical formula (e.g., integrals, fractions, matrices).
Issue C: Violation of CommonMark Blank-Line Precedence (List & Blockquote Flattening)
-
Observed Behavior: When a list or blockquote follows an introductory statement ending with a colon (
:), the model frequently places the list or quote on the immediate next line without a blank line (\n\n) separation. -
Problematic Output Example:
Kanabinoidy pôsobia ako komplexné širokospektrálne analgetikum: 1. **Cez $\text{CB}_1$ a inhibíciu glutamátu** vypínajú... 2. **Cez moduláciu...** Pacienti liečení kanabisom často popisujú analgetický účinok veľmi špecificky: > *„Bolesť tam technicky stále je...“* THC teda neodpája... -
Downstream Result: According to CommonMark and Pandoc parser rules, a list or blockquote directly attached to an open paragraph without a blank line (
\n\n) is treated as inline paragraph text. In the rendered HTML, this completely destroys the structure and produces a single flattened line:Kanabinoidy pôsobia ako komplexné širokospektrálne analgetikum: 1. Cez CB1 a inhibíciu glutamátu vypínajú... 2. Cez moduláciu...
...veľmi špecificky: > „Bolesť tam technicky stále je...“ THC teda neodpája...(with raw>rendered as text). -
Expected Behavior:
The model must consistently enforce a blank line (\n\n) before:- Any ordered list (
1.,2.) - Any unordered list (
*,-,+) - Any blockquote (
>)
- Any ordered list (
Issue D: Deep Heading Hierarchy for Minor List Items
- Observed Behavior: The model frequently defaults to using level 3 to 6 headings (
###,####) to emphasize minor itemized subsections inside already enumerated lists. - Impact: Downstream CMS platforms (e.g., WordPress, documentation portals) with Table of Contents (TOC) generators pick up dozens of these micro-headings, generating cluttered, broken navigation menus and unnecessarily triggering high regex backtracking limits during page assembly.
- Expected Behavior: Use bold text paragraphs (
**Bold title:**) or description lists for sub-points instead of nesting###or####headings under list items.
3. Impact on Developers & End Users
- Preprocessing Overhead: Developers must build extensive custom regex filters and Pandoc wrappers to sanitize Gemini’s Markdown output before it can be safely injected into web applications or CMS engines.
- Display Inconsistency: End users copying text into emails, documents, or websites get broken LaTeX markers (
\(\text{...}\)) and jumbled lists that lose all line breaks.
4. Suggested Fixes / Recommendations for the Gemini Engineering Team
- System Prompt / RLHF Fine-Tuning for Markdown:
- Penalize the generation of inline LaTeX (
$...$) when the expression contains only plain alphanumeric labels, standard ion charges, or single Greek letters. - Prioritize native UTF-8 representations (
α,β,γ,₁,₂,²⁺) for chemical/biological terminology unless the user explicitly requests LaTeX format.
- Penalize the generation of inline LaTeX (
- Strict CommonMark Boundary Enforcement:
- Ensure that the tokenizer / generation head always appends a double newline (
\n\n) before emitting list indicators (^([0-9]+\.|\*|\-|\+)) and blockquotes (^>) following a paragraph ending with:.
- Ensure that the tokenizer / generation head always appends a double newline (


