<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Palash Bagchi</title>
    <description>The latest articles on DEV Community by Palash Bagchi (@palash_bagchi_cbdebd259d4).</description>
    <link>https://dev.to/palash_bagchi_cbdebd259d4</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3857965%2Fdd9f2b62-a39a-4290-8613-534f3c98f280.jpg</url>
      <title>DEV Community: Palash Bagchi</title>
      <link>https://dev.to/palash_bagchi_cbdebd259d4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/palash_bagchi_cbdebd259d4"/>
    <language>en</language>
    <item>
      <title>Beyond Left vs. Right: Engineering Reproducible Detection of Media Bias and Propaganda</title>
      <dc:creator>Palash Bagchi</dc:creator>
      <pubDate>Thu, 09 Jul 2026 01:24:10 +0000</pubDate>
      <link>https://dev.to/palash_bagchi_cbdebd259d4/beyond-left-vs-right-engineering-reproducible-detection-of-media-bias-and-propaganda-4aa3</link>
      <guid>https://dev.to/palash_bagchi_cbdebd259d4/beyond-left-vs-right-engineering-reproducible-detection-of-media-bias-and-propaganda-4aa3</guid>
      <description>&lt;p&gt;We have spent a decade building machines that generate persuasive text and almost no time building machines that audit it. That asymmetry is starting to hurt. False news spreads "farther, faster, deeper, and more broadly" than the truth — Vosoughi, Roy, and Aral demonstrated this at scale across roughly 126,000 stories on Twitter, and the effect was driven by humans, not bots [1]. If the demand side of manipulation is human psychology, then the supply side is now industrialized by language models. The tooling that helps a reader think clearly has to be at least as sophisticated as the tooling that helps a writer persuade.&lt;/p&gt;

&lt;p&gt;This essay is about how to build that auditing tool: a forensic media analyzer that treats an article the way a lab treats a tissue sample — measuring what is structurally present rather than voting on whether it feels biased. I'll cover the science it rests on, the engineering problems that make it genuinely hard (LLM non-determinism chief among them), a practical build guide, and an honest account of the limitations. Some of the design decisions come from work we've done on &lt;a href="https://www.rhetoricaudit.com/" rel="noopener noreferrer"&gt;Rhetoric Audit&lt;/a&gt;, a browser-based forensic media evaluator; most of the ideas are older than any of us and belong to rhetoric, argumentation theory, and cognitive science.&lt;/p&gt;

&lt;p&gt;The problem with "bias detectors"&lt;br&gt;
Most bias tools answer the wrong question. They place an outlet or an article on a single left–right line and call it a day. That axis is politically legible but analytically hollow. It flattens a dozen independent phenomena — emotional loading, source quality, logical structure, omission, framing — into one number that tells you almost nothing about how a piece works on a reader.&lt;/p&gt;

&lt;p&gt;Worse, a left–right label invites the reader to do the one thing forensic analysis is supposed to prevent: agree or disagree based on tribe. Wardle and Derakhshan, in their influential Council of Europe report on "information disorder," argue for separating mis-information (false, no intent to harm), dis-information (false, intentional), and mal-information (true, weaponized) precisely because lumping them together destroys our ability to respond appropriately [2]. A single spectrum can't hold those distinctions. Neither can it distinguish a factually careful opinion column from a factually reckless one that happens to share its politics.&lt;/p&gt;

&lt;p&gt;The reframe is simple to state and hard to implement: score structure, not stance. Two articles can reach opposite conclusions and be rhetorically identical; two articles can reach the same conclusion with wildly different levels of manipulation. A forensic analyzer should be able to say "this piece leans heavily on fear appeals, omits the strongest counterargument, and contains three instances of the strawman fallacy" without ever telling you whether it's right.&lt;/p&gt;

&lt;p&gt;The science underneath&lt;br&gt;
The intellectual scaffolding is surprisingly old.&lt;/p&gt;

&lt;p&gt;Rhetoric. Aristotle's Rhetoric gave us the three modes of persuasion — ethos (credibility), pathos (emotion), and logos (logic) — and they remain a shockingly good decomposition of how a text tries to move you [3]. A forensic system can score every passage on the mix of these three appeals and immediately surface the pieces that lean on feeling where they should be leaning on evidence.&lt;/p&gt;

&lt;p&gt;Framing. Robert Entman's canonical definition still governs the field: to frame is "to select some aspects of a perceived reality and make them more salient" so as to promote a particular interpretation [4]. Framing is often invisible because it operates through omission — what the piece declines to mention. Detecting "strategic silence" is therefore not a nice-to-have; it's central. The hardest manipulation to catch is the argument that was never made.&lt;/p&gt;

&lt;p&gt;Propaganda techniques. The most directly relevant computational work is Da San Martino and colleagues' fine-grained propaganda detection, which defined a taxonomy of specific techniques — loaded language, name-calling, appeal to fear, flag-waving, whataboutism, and more — annotated at the span level in news articles, and later formalized as SemEval-2020 Task 11 [5]. This is the key methodological move: propaganda is not a property of a document, it's a property of spans of text, and it can be enumerated.&lt;/p&gt;

&lt;p&gt;Fallacies. Douglas Walton's decades of work on argumentation reframed informal fallacies not as static errors but as argumentation schemes misused in context [6]. That matters for tooling, because it means fallacy detection has to be evidence-anchored: you can't flag "ad hominem" in the abstract, you flag it at the quote that commits it.&lt;/p&gt;

&lt;p&gt;Emotion. Robert Plutchik's wheel of eight primary emotions — joy, trust, fear, surprise, sadness, disgust, anger, anticipation — gives a compact, defensible vocabulary for measuring affective loading paragraph by paragraph [7]. It's more useful than a naïve positive/negative sentiment score because manipulation lives in the specific emotion being provoked.&lt;/p&gt;

&lt;p&gt;Why this works on people. The reason any of this matters is dual-process cognition. Kahneman's System 1 / System 2 distinction explains why emotionally loaded, fluent, repetition-heavy content bypasses deliberation [8]. And crucially, Pennycook and Rand's research suggests people fall for misinformation largely because they fail to stop and think, not because they're hopelessly partisan — falling for fake news correlates with lower analytic thinking more than with ideology [9]. That's an optimistic finding for tool-builders: if the failure mode is inattention, then a tool that makes manipulation visible — that forces a System 2 pause — can actually help.&lt;/p&gt;

&lt;p&gt;Put these together and you get a measurement model: decompose a text into spans, score each span on appeals (ethos/pathos/logos), emotion (Plutchik), and technique (a propaganda/fallacy taxonomy), anchor every judgment to an exact quote, and roll it up into document-level indices. You can even layer in a cognitive-complexity axis — Norman Webb's Depth of Knowledge framework, borrowed from education, is a reasonable proxy for whether a piece reasons or merely asserts [10].&lt;/p&gt;

&lt;p&gt;The engineering problem nobody warns you about&lt;br&gt;
Here's where it stops being a literature review and starts being software. If you naively wire an LLM to this taxonomy, you will ship something that gives a different answer every time you run it. For a tool whose entire value proposition is credibility, that's fatal.&lt;/p&gt;

&lt;p&gt;Large language models sample tokens stochastically. Even at temperature zero, floating-point non-associativity across hardware and batching means outputs are not bit-for-bit stable, and any temperature above zero makes the variance visible to users. A "propaganda index" that reads 71 on Monday and 78 on Tuesday for the same article is not a measurement; it's a mood. The generative-AI reflex — "just prompt it and trust the output" — collides head-on with the requirements of an analytical instrument.&lt;/p&gt;

&lt;p&gt;There's a second, deeper hazard: hallucination. The survey literature is blunt that generative models produce fluent, confident, unsupported claims as a matter of course [11]. An analyzer that invents a fallacy that isn't in the text is worse than useless — it's itself a source of misinformation.&lt;/p&gt;

&lt;p&gt;Four engineering commitments address this. They're the difference between a demo and an instrument.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Span-anchoring kills hallucination at the root. Every score must trace back to exact words — ideally to character offsets into the normalized source text, validated after the fact so that text.slice(start, end) actually equals the quoted span. If the model claims a fallacy but can't point to the substring that commits it, the claim is dropped. This single constraint converts "the model thinks this is manipulative" into "here are the seventeen characters that are, and here's why." It also makes the output auditable, which is the whole game.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deterministic aggregation separates the fuzzy step from the exact step. Use the LLM for what it's good at — identifying and classifying spans — and then compute all document-level numbers with plain, deterministic code: severity tables, weighted sums, fixed formulas. The manipulation index isn't asked of the model; it's derived from the spans by an algorithm that returns the same number every time. The stochastic component is quarantined to perception; the arithmetic is reproducible by construction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calibration corrects known model failure modes. No frontier model is neutral about political content; each has systematic tics. The pragmatic answer is a post-processing layer of transparent, rule-based overrides for well-characterized errors, applied deterministically and logged. This is unglamorous and occasionally derided, but it's honest engineering: you are encoding, in reviewable code, the specific ways your model is wrong, rather than pretending it isn't.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Grounding checks factual claims against the outside world. Emotional and structural analysis is intrinsic to the text, but factual claims can be cross-referenced. Extracting the central claims and verifying them against fact-check corpora and knowledge bases — while being explicit about what could and couldn't be verified — closes the loop between "how is this argued" and "is it true."&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, stamp every result with provenance: the prompt hash, the model version, the severity-table hash, the pipeline version. Reproducibility in science means someone else can rerun your method and get your result; the same standard should apply to an automated analysis. If you can't tell a skeptical reader exactly how a score was produced, they're right not to trust it.&lt;/p&gt;

&lt;p&gt;How to build one&lt;br&gt;
A concrete, framework-agnostic recipe. You can implement this with any capable model and a few hundred lines of glue.&lt;/p&gt;

&lt;p&gt;Step 1 — Normalize and chunk. Strip boilerplate, normalize whitespace, and split the article into paragraphs and overlapping windows. Keep a stable mapping from every chunk back to character offsets in the normalized text; you'll need it for span validation later. Cap the analyzed window to a fixed size and tell the user when you truncate — a partial analysis silently presented as complete is its own small deception.&lt;/p&gt;

&lt;p&gt;Step 2 — Define a strict output schema. Before you touch a model, write the schema: spans (with start, end, quote, technique, appeal, confidence), per-paragraph emotion vectors, extracted claims, and the fixed set of document-level fields. Validate every model response against it and reject anything that doesn't conform. A schema is your contract; it's also your first line of defense against hallucination and drift.&lt;/p&gt;

&lt;p&gt;Step 3 — Prompt for classification, not judgment. Ask the model to locate and label spans against your taxonomy, quoting exact text, and to abstain when uncertain. Do not ask it for the final indices. Pin sampling as tightly as your provider allows — low temperature, low top-p, a fixed seed — knowing this reduces but does not eliminate variance.&lt;/p&gt;

&lt;p&gt;Step 4 — Validate spans. For each returned span, confirm the quote actually appears at the claimed offsets. Discard the rest. This is the step most teams skip and the one that most separates a toy from an instrument.&lt;/p&gt;

&lt;p&gt;Step 5 — Aggregate deterministically. Feed validated spans into fixed formulas: map techniques to severity weights, combine with confidence and coverage, and compute your manipulation index, evidence-validity score, and emotion arc in ordinary code. Same input, same output, forever.&lt;/p&gt;

&lt;p&gt;Step 6 — Ground the claims. Extract the load-bearing factual claims and check them against external sources, recording verified / disputed / unverifiable status and never upgrading "unverifiable" to "false."&lt;/p&gt;

&lt;p&gt;Step 7 — Attach provenance and surface uncertainty. Return the model version, prompt hash, and any limitations (truncation, low grounding coverage, failed chunks) alongside the scores. Show confidence, not just verdicts.&lt;/p&gt;

&lt;p&gt;Step 8 — Evaluate against a labeled corpus. Build or borrow a benchmark with human annotations across genres — hard news, opinion, propaganda, satire, PR — and track technique-level F1, not just an aggregate. SemEval-2020 Task 11 is a natural starting point for the propaganda side [5]. Regression-test every prompt or model change against it; an "improvement" that drops your satire recall is a regression.&lt;/p&gt;

&lt;p&gt;This is the architecture behind Rhetoric Audit's analysis pipeline, and the pattern generalizes well beyond media: contract review, research-integrity screening, and moderation tooling all benefit from the same "fuzzy perception, deterministic aggregation, mandatory provenance" spine.&lt;/p&gt;

&lt;p&gt;What this approach can't do — and why saying so matters&lt;br&gt;
Forensic analysis measures rhetoric, not righteousness. A perfectly reasoned argument for a false conclusion will score well on structure; a clumsy argument for a true one will score badly. That's a feature — the tool deliberately refuses to adjudicate truth from style — but it means the output is an input to judgment, not a substitute for it.&lt;/p&gt;

&lt;p&gt;Three honest caveats. First, taxonomies are lenses, not laws; reasonable annotators disagree about whether a given sentence is "loaded language" or just vivid writing, and inter-annotator agreement on propaganda techniques is imperfect even among experts [5]. Second, satire and strong opinion writing use manipulation techniques intentionally and legitimately, so any system needs genre-awareness or it will libel The Onion. Third, grounding is only as good as the corpora behind it; "unverifiable" is common and must never masquerade as "refuted."&lt;/p&gt;

&lt;p&gt;State these plainly in your product. A forensic tool that overclaims becomes exactly the thing it was built to detect.&lt;/p&gt;

&lt;p&gt;FAQ&lt;br&gt;
Is this just sentiment analysis with extra steps?&lt;br&gt;
No. Sentiment analysis returns a polarity; forensic analysis returns a structured decomposition — which techniques, at which spans, with which appeals and emotions, plus deterministic document indices and provenance. Polarity tells you a text is negative; forensic analysis tells you it's negative because of an appeal-to-fear in paragraph three that omits the base rate.&lt;/p&gt;

&lt;p&gt;Doesn't using an LLM make it inherently unreliable?&lt;br&gt;
Only if you let the LLM produce the final numbers. The design deliberately confines the model to perception (finding and labeling quoted spans) and computes all scores with deterministic code. Combined with span validation and provenance stamping, the same article yields the same analysis — the reproducibility comes from the architecture, not from the model.&lt;/p&gt;

&lt;p&gt;How do you avoid political bias in the tool itself?&lt;br&gt;
By measuring structure rather than stance, by anchoring every judgment to a quote you can inspect, and by applying model-calibration corrections transparently and in reviewable code. You should be able to disagree with a score by reading the exact span it cites — that auditability is the accountability mechanism.&lt;/p&gt;

&lt;p&gt;Can it detect AI-generated propaganda?&lt;br&gt;
It detects rhetorical technique regardless of author. Whether a fear appeal was written by a human columnist or a language model is irrelevant to whether it's a fear appeal. That authorship-agnosticism is increasingly valuable as synthetic content scales.&lt;/p&gt;

&lt;p&gt;Is there real research behind this, or is it vibes?&lt;br&gt;
The measurement model draws on peer-reviewed work in rhetoric, framing theory, computational propaganda detection, argumentation theory, and cognitive science — several of which are cited below. The engineering draws on the hallucination and evaluation literature. It is emphatically not vibes, though like any measurement instrument it encodes choices you're free to contest.&lt;/p&gt;

&lt;p&gt;Where can I try it?&lt;br&gt;
Rhetoric Audit runs this pipeline in the browser: rhetoricaudit.com. More usefully for this audience, the pattern — fuzzy perception, deterministic aggregation, mandatory provenance — is yours to reimplement for any domain where you need trustworthy analysis on top of an untrustworthy generator.&lt;/p&gt;

&lt;p&gt;Closing&lt;br&gt;
The uncomfortable truth of the current moment is that persuasion has been automated and comprehension has not. Closing that gap is not primarily a modeling problem; it's an engineering-discipline problem. The models are good enough. What's scarce is the willingness to constrain them — to demand quotes, to compute scores deterministically, to publish provenance, and to say clearly what the tool cannot do. Build that discipline in, and you get an instrument people can actually trust. Skip it, and you've built one more confident voice in a room that already has too many.&lt;/p&gt;

&lt;p&gt;References&lt;br&gt;
Vosoughi, S., Roy, D., &amp;amp; Aral, S. (2018). The spread of true and false news online. Science, 359(6380), 1146–1151. &lt;a href="https://doi.org/10.1126/science.aap9559" rel="noopener noreferrer"&gt;https://doi.org/10.1126/science.aap9559&lt;/a&gt;&lt;br&gt;
Wardle, C., &amp;amp; Derakhshan, H. (2017). Information Disorder: Toward an interdisciplinary framework for research and policy making. Council of Europe.&lt;br&gt;
Aristotle. (c. 4th century BCE). Rhetoric (W. Rhys Roberts, Trans.).&lt;br&gt;
Entman, R. M. (1993). Framing: Toward clarification of a fractured paradigm. Journal of Communication, 43(4), 51–58. &lt;a href="https://doi.org/10.1111/j.1460-2466.1993.tb01304.x" rel="noopener noreferrer"&gt;https://doi.org/10.1111/j.1460-2466.1993.tb01304.x&lt;/a&gt;&lt;br&gt;
Da San Martino, G., Yu, S., Barrón-Cedeño, A., Petrov, R., &amp;amp; Nakov, P. (2019). Fine-Grained Analysis of Propaganda in News Articles. EMNLP-IJCNLP 2019. arXiv:1910.02517. (See also SemEval-2020 Task 11.)&lt;br&gt;
Walton, D. (2008). Informal Logic: A Pragmatic Approach (2nd ed.). Cambridge University Press.&lt;br&gt;
Plutchik, R. (1980). A general psychoevolutionary theory of emotion. In Emotion: Theory, Research, and Experience (Vol. 1). Academic Press.&lt;br&gt;
Kahneman, D. (2011). Thinking, Fast and Slow. Farrar, Straus and Giroux.&lt;br&gt;
Pennycook, G., &amp;amp; Rand, D. G. (2021). The Psychology of Fake News. Trends in Cognitive Sciences, 25(5), 388–402. &lt;a href="https://doi.org/10.1016/j.tics.2021.02.007" rel="noopener noreferrer"&gt;https://doi.org/10.1016/j.tics.2021.02.007&lt;/a&gt;&lt;br&gt;
Webb, N. L. (2002). Depth-of-Knowledge Levels for Four Content Areas. Wisconsin Center for Education Research.&lt;br&gt;
Ji, Z., et al. (2023). Survey of Hallucination in Natural Language Generation. ACM Computing Surveys, 55(12). arXiv:2202.03629&lt;/p&gt;

</description>
      <category>mediabias</category>
      <category>ai</category>
      <category>startup</category>
      <category>saas</category>
    </item>
    <item>
      <title>How do you prove which AI agent did what? We open-sourced our answer</title>
      <dc:creator>Palash Bagchi</dc:creator>
      <pubDate>Wed, 08 Jul 2026 04:17:56 +0000</pubDate>
      <link>https://dev.to/palash_bagchi_cbdebd259d4/how-do-you-prove-which-ai-agent-did-what-we-open-sourced-our-answer-1g97</link>
      <guid>https://dev.to/palash_bagchi_cbdebd259d4/how-do-you-prove-which-ai-agent-did-what-we-open-sourced-our-answer-1g97</guid>
      <description>&lt;p&gt;AI agents are starting to move money and hit production APIs, but almost none of them can answer the one question a regulator — or your own risk team — will eventually ask: which agent did this, and was it allowed to? We built Kakunin to fix that: every agent gets an X.509 certificate (issued via AWS KMS, keys never leave the HSM), its behavior is risk-scored in real time, and its certificate auto-revokes in under 60 seconds when it goes rogue. Today we open-sourced the whole thing — the platform under AGPL-3.0, the SDKs under Apache-2.0, every package provenance-signed. Here's what's open, what stays hosted, and why a trust anchor you can fork isn't a trust anchor.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Kakunin does
&lt;/h3&gt;

&lt;p&gt;Every agent gets an &lt;strong&gt;X.509 certificate&lt;/strong&gt;, issued through AWS KMS so the private key never leaves the HSM. The certificate encodes the agent's permitted scope — what it's allowed to do, up to what limits. As the agent acts, it streams behavioral events to Kakunin, which &lt;strong&gt;scores each one in real time&lt;/strong&gt; against a rolling 30-day baseline. When risk crosses a threshold, the certificate is &lt;strong&gt;auto-revoked in under 60 seconds&lt;/strong&gt; — and anyone, anywhere, can verify a certificate's status keylessly, without an account.&lt;/p&gt;

&lt;p&gt;Issuance, behavioral monitoring, auto-revocation, and regulator-ready compliance exports — the full lifecycle, built for MiCA Article 70 and the EU AI Act.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's open
&lt;/h3&gt;

&lt;p&gt;Everything you run:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The platform&lt;/strong&gt; — &lt;code&gt;kakunin-core&lt;/code&gt;, the Next.js application, the CA integration, the risk engine, the audit pipeline — is &lt;strong&gt;AGPL-3.0&lt;/strong&gt;. You can read exactly how risk is scored and how revocation decisions are made. For a compliance product, that transparency isn't a giveaway; it's the entire pitch. No black box gets to decide whether your agent is trustworthy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The SDKs and integrations&lt;/strong&gt; — TypeScript, Python, and drop-in tools for LangChain, Mastra, the Vercel AI SDK, MCP, LlamaIndex, CrewAI, and more — are &lt;strong&gt;Apache-2.0&lt;/strong&gt;. Build on them with no copyleft obligation.&lt;/li&gt;
&lt;li&gt;Every package publishes with &lt;strong&gt;cryptographic provenance&lt;/strong&gt; (npm) and &lt;strong&gt;attestations&lt;/strong&gt; (PyPI), each traceable to a public commit and CI run. You can verify the supply chain, not just trust it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Six public repositories, seven packages on npm and PyPI.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's hosted, and why we're telling you plainly
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;canonical&lt;/strong&gt; certificate authority and the public verification endpoint run as a hosted service. We could pretend otherwise; we won't.&lt;/p&gt;

&lt;p&gt;A trust anchor you can fork is not a trust anchor. The value of a Kakunin certificate is that &lt;em&gt;any&lt;/em&gt; counterparty can verify it against &lt;em&gt;one&lt;/em&gt; authority — keylessly, without asking you. A thousand self-hosted CAs would mean a thousand roots nobody recognizes. Verification stays free and public for everyone precisely because issuance is centralized. Key custody (KMS-backed, never-leaves-the-HSM) and independent audit-log custody are what make the evidence admissible in the first place.&lt;/p&gt;

&lt;p&gt;So: run every line of the code. Verify against the canonical CA. We wrote up the exact split, feature by feature, at kakunin.ai/open-source.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why AGPL
&lt;/h3&gt;

&lt;p&gt;We chose AGPL-3.0 for the platform deliberately. It's OSI-approved open source — you can read it, run it, modify it. Its copyleft means anyone who offers a &lt;em&gt;modified&lt;/em&gt; Kakunin as a network service has to share their changes, which keeps the project honest. And it keeps us eligible for the open-source ecosystem — grants, sponsorships, the commons — in a way a source-available license wouldn't. The SDKs stay Apache-2.0 so nothing you integrate carries an obligation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it in 60 seconds
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @kakunin/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Kakunin&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@kakunin/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;kkn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Kakunin&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;KAKUNIN_API_KEY&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;kkn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;agents&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;my-agent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;model_hash&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Kakunin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;computeModelHash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cert&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;kkn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;agents&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;certify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;check&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;kkn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;events&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ingest&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;agentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;actionType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;transaction_initiated&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;details&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;840&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;risk_band&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 'low' | 'medium' | 'high'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or open the sandbox — no signup, 100 free test certificates a day, and a live demo where you watch an agent go rogue and its certificate revoke itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where this is going
&lt;/h3&gt;

&lt;p&gt;It's early and we'll say so: baselines need history to be meaningful, the hosted CA is single-region today, and the roadmap is public. If you're building agents that do things that matter — or you just have opinions about how machine identity and open-core should work — star kakunin-core, read the code, and tell us where we're wrong.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>developers</category>
    </item>
    <item>
      <title>The Anatomy of a Machine's Mind - Decoding AEO, GEO</title>
      <dc:creator>Palash Bagchi</dc:creator>
      <pubDate>Sat, 06 Jun 2026 07:10:53 +0000</pubDate>
      <link>https://dev.to/palash_bagchi_cbdebd259d4/the-anatomy-of-a-machines-mind-decoding-aeo-geo-2kdm</link>
      <guid>https://dev.to/palash_bagchi_cbdebd259d4/the-anatomy-of-a-machines-mind-decoding-aeo-geo-2kdm</guid>
      <description>&lt;p&gt;We are moving away from traditional "10 blue links" (where Google ranks a document) to a semantic synthesis model (where Google extracts the factual payload and generates the answer directly via AI Overviews or Gemini).&lt;/p&gt;

&lt;p&gt;To architect a dashboard for AEO and GEO, we must stop looking at keyword density and start looking at &lt;strong&gt;Entity Salience&lt;/strong&gt; and &lt;strong&gt;RAG (Retrieval-Augmented Generation) compatibility&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is the architectural breakdown of the Google APIs required to track, test, and optimize for the Generative Search era that i used while building &lt;a href="https://nqz.ai/" rel="noopener noreferrer"&gt;nqzai&lt;/a&gt; conversational GTM platform. &lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Entity Truth Layer: Knowledge Graph Search API (AEO)
&lt;/h2&gt;

&lt;p&gt;Answer Engine Optimization relies heavily on Google's Knowledge Graph. If Google doesn't recognize your brand, product, or author as a definitive "Entity," you will not appear in Knowledge Panels, nor will an LLM trust your brand as a source of truth.&lt;/p&gt;

&lt;h3&gt;
  
  
  The API: Google Knowledge Graph Search API
&lt;/h3&gt;

&lt;p&gt;This API lets you query Google’s exact semantic database to see how it mathematically maps entities (people, places, organizations).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Data Points:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;resultScore&lt;/code&gt;: The algorithmic confidence Google has in the entity match.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@id&lt;/code&gt; (Machine-Readable Entity ID or MREID): The unique identifier (e.g., &lt;code&gt;/m/0k8z&lt;/code&gt;) Google assigns to a recognized entity.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;description&lt;/code&gt; / &lt;code&gt;detailedDescription&lt;/code&gt;: The exact factual payload Google associates with that entity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Enrichment Play (Brand Authority):&lt;/strong&gt; You can programmatically query your brand name or executive team names monthly. If your &lt;code&gt;resultScore&lt;/code&gt; is increasing, your AEO efforts (digital PR, schema markup, Wikipedia/Wikidata editing) are working. If your brand returns no MREID, you are invisible to the Answer Engine.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the exact right place to start. If you do not understand how Google mathematically defines reality, all downstream Answer Engine Optimization (AEO) efforts are essentially guessing.&lt;/p&gt;

&lt;p&gt;When we talk about the Google Knowledge Graph Search API, we are no longer dealing with web pages, URLs, or HTML. We are dealing with &lt;strong&gt;Nodes (Entities)&lt;/strong&gt; and &lt;strong&gt;Edges (Relationships)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is the microscopic breakdown of how Google categorizes, measures, and scores reality.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. What are "People, Places, and Organizations"?
&lt;/h3&gt;

&lt;p&gt;In traditional SEO, "Kakunin" is just a string of letters (a keyword). In the Knowledge Graph, an &lt;strong&gt;Entity&lt;/strong&gt; is a fundamental unit of knowledge—a specific, identifiable thing.&lt;/p&gt;

&lt;p&gt;Google does not use arbitrary labels to define these; it strictly adheres to the &lt;strong&gt;Schema.org vocabulary&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;People:&lt;/strong&gt; Mapped as &lt;code&gt;schema.org/Person&lt;/code&gt; (e.g., Taylor Swift, or a company's CEO).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Organizations:&lt;/strong&gt; Mapped as &lt;code&gt;schema.org/Organization&lt;/code&gt; or sub-types like &lt;code&gt;schema.org/LocalBusiness&lt;/code&gt; or &lt;code&gt;schema.org/Corporation&lt;/code&gt; (e.g., Google, Kakunin).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Places:&lt;/strong&gt; Mapped as &lt;code&gt;schema.org/Place&lt;/code&gt; (e.g., Ranchi, Eiffel Tower).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Practical Benchmark:&lt;/strong&gt; When does a brand cross the threshold from being a "keyword" on a webpage to a recognized "Entity" in the Knowledge Graph?&lt;br&gt;
The benchmark is &lt;strong&gt;reconciliation&lt;/strong&gt;. Google’s Entity Reconciliation engine constantly scrapes the web. When it finds enough corroborating "Semantic Triples" (Subject-Predicate-Object data points, like &lt;em&gt;Kakunin -&amp;gt; is a -&amp;gt; SoftwarePlatform&lt;/em&gt;), it clusters that data together. You have practically achieved Entity status the moment Google mints a unique machine identifier for you in its database.&lt;/p&gt;


&lt;h3&gt;
  
  
  2. Expanding the 3 Core Data Points
&lt;/h3&gt;

&lt;p&gt;When you query the Knowledge Graph API, it returns a JSON-LD payload. Here is what those specific data points actually mean and the signals that drive them.&lt;/p&gt;
&lt;h4&gt;
  
  
  A. &lt;code&gt;@id&lt;/code&gt; (The Machine-Readable Entity ID or MREID)
&lt;/h4&gt;

&lt;p&gt;This is the canonical database key for the entity. It is the most important data point in AEO.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What it looks like:&lt;/strong&gt; It typically starts with &lt;code&gt;kg:/m/&lt;/code&gt; (e.g., &lt;code&gt;/m/0dl567&lt;/code&gt;) or &lt;code&gt;kg:/g/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Heritage:&lt;/strong&gt; The &lt;code&gt;/m/&lt;/code&gt; prefix stands for "Machine ID" and is a legacy identifier inherited from Freebase, the massive open-source database Google acquired to build its Knowledge Graph. Newer entities created directly by Google's ML systems often get a &lt;code&gt;/g/&lt;/code&gt; prefix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Signal:&lt;/strong&gt; You cannot manually edit or request this ID. It is minted automatically when Google's reconciliation algorithms determine that enough structured data (Schema.org), Wikipedia mentions, and high-authority backlinks all point to the exact same distinct concept.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  B. &lt;code&gt;detailedDescription&lt;/code&gt; (The Factual Payload)
&lt;/h4&gt;

&lt;p&gt;This is the text that an Answer Engine (like Gemini or AI Overviews) will read as the absolute, verified truth about your entity.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it is measured:&lt;/strong&gt; Google does not write this text. It extracts it from what it considers "Tier 1 Trust Data Sources."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Signals:&lt;/strong&gt; The overwhelming majority of detailed descriptions are pulled verbatim from &lt;strong&gt;Wikipedia&lt;/strong&gt; or &lt;strong&gt;Wikidata.org&lt;/strong&gt;. For organizations, it frequently pulls from licensed databases like Crunchbase or Bloomberg. If you do not have a presence in these highly moderated, public data repositories, your &lt;code&gt;detailedDescription&lt;/code&gt; will be completely empty, giving Answer Engines zero factual payload to pull from.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  C. &lt;code&gt;resultScore&lt;/code&gt; (The Salience &amp;amp; Probability Metric)
&lt;/h4&gt;

&lt;p&gt;This is not a static "authority score" like Domain Rating (DR). It is a dynamic numerical value that describes how perfectly an entity matches the search query context.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it is measured:&lt;/strong&gt; The score ranges from a few decimals to tens of thousands. For example, if you query "Brad Pitt", the American actor might return a &lt;code&gt;resultScore&lt;/code&gt; of 30,000, while a lesser-known Australian boxer named Brad Pitt might return a score of 200.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Signals that drive the math:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search Volume (Entity Popularity):&lt;/strong&gt; High aggregate search volume for the entity name increases its baseline score.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph Density (Backlinks for Entities):&lt;/strong&gt; Just like webpages have backlinks, entities have graph links. If Google maps that the entity "Bill Gates" is connected to "Microsoft", "Melinda Gates", and "Harvard", his graph density is massive, spiking his &lt;code&gt;resultScore&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Co-occurrence:&lt;/strong&gt; If your organization's name frequently appears in the same paragraph as established industry terms (e.g., Kakunin appearing next to "MiCA regulation" and "AI Compliance" across high-authority news sites), the ML engine raises your probability score for those semantic queries.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Simulating the Knowledge Graph
&lt;/h3&gt;

&lt;p&gt;To visualize how these signals compound to push a brand from a mere "keyword" to a fully reconciled Entity with a high &lt;code&gt;resultScore&lt;/code&gt;, I have generated a Knowledge Graph Entity API Simulator below. Adjust the signals to see how the JSON-LD payload mutates in real-time.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
  "@context": {&lt;br&gt;
    "@vocab": "http://schema.org/",&lt;br&gt;
    "goog": "http://schema.googleapis.com/",&lt;br&gt;
    "detailedDescription": "goog:detailedDescription",&lt;br&gt;
    "resultScore": "goog:resultScore"&lt;br&gt;
  },&lt;br&gt;
  "@type": "EntitySearchResult",&lt;br&gt;
  "result": {&lt;br&gt;
    "@id": "kg:/g/11bsled",&lt;br&gt;
    "name": "Kakunin",&lt;br&gt;
    "@type": [&lt;br&gt;
      "Organization"&lt;br&gt;
    ],&lt;br&gt;
    "detailedDescription": {&lt;br&gt;
      "articleBody": "Kakunin is an established organization recognized by global semantic authorities.",&lt;br&gt;
      "url": "https://en.wikipedia.org/wiki/Kakunin",&lt;br&gt;
      "license": "https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"&lt;br&gt;
    }&lt;br&gt;
  },&lt;br&gt;
  "resultScore": 74375&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  2. The Semantic Vector Layer: Google Cloud Natural Language API (GEO)
&lt;/h2&gt;

&lt;p&gt;Generative Engine Optimization (GEO) requires your content to be easily parsed by Large Language Models (LLMs). LLMs do not read "keywords"; they calculate the mathematical relationship between words.&lt;/p&gt;

&lt;p&gt;To optimize for AI Overviews (formerly SGE), you must feed your content into the same Natural Language Processing (NLP) engines Google uses to train its models.&lt;/p&gt;
&lt;h3&gt;
  
  
  The API: Google Cloud Natural Language API
&lt;/h3&gt;

&lt;p&gt;This API exposes Google's internal machine learning models for syntax analysis, entity extraction, and sentiment analysis.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Data Points:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;entities&lt;/code&gt;: What nouns/concepts Google extracts from your text.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;salience&lt;/code&gt;: A critical metric (ranging from 0.0 to 1.0) indicating the importance or centrality of an entity to the entire document text.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;sentiment.score&lt;/code&gt; &amp;amp; &lt;code&gt;sentiment.magnitude&lt;/code&gt;: How positive, negative, or neutral the text is.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Enrichment Play (The Salience Audit):&lt;/strong&gt; Before publishing a high-value SaaS landing page, pass the text through the NLP API. If your target product feature has a &lt;code&gt;salience&lt;/code&gt; score of 0.12, but a competitor's integration mentioned off-hand has a score of 0.85, the LLM will completely misunderstand the core topic of your page. You must rewrite the syntax—using clearer subject-verb-object structures—until your core product hits a salience score above 0.70.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If Answer Engine Optimization (AEO) is about getting Google to recognize your existence as a factual "Entity" (via the Knowledge Graph), Generative Engine Optimization (GEO) is about &lt;strong&gt;controlling how an LLM reads, fragments, and scores your content.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Large Language Models (like Gemini or the models powering AI Overviews) do not read pages top-to-bottom like humans, nor do they count keyword frequencies like legacy Googlebot. They convert text into &lt;strong&gt;Semantic Vectors&lt;/strong&gt;—lists of numbers representing the mathematical distance between concepts.&lt;/p&gt;

&lt;p&gt;To master the GEO layer using the &lt;strong&gt;Google Cloud Natural Language API&lt;/strong&gt;, there are three critical sub-engines you must understand, as they directly dictate whether your content is "RAG-friendly" (Retrieval-Augmented Generation).&lt;/p&gt;


&lt;h3&gt;
  
  
  1. Syntax Analysis (The Dependency Tree)
&lt;/h3&gt;

&lt;p&gt;In traditional SEO, you could put the keyword "MiCA AI Compliance" at the top of the page, write 500 words of fluff, and still rank. In GEO, that will completely fail.&lt;/p&gt;

&lt;p&gt;The Natural Language API features a &lt;code&gt;analyzeSyntax&lt;/code&gt; method that generates a &lt;strong&gt;Dependency Parse Tree&lt;/strong&gt;. It breaks every sentence into tokens (words) and maps the exact grammatical relationship between them (e.g., this noun is the subject, this verb is the root action, this adjective modifies the object).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it works:&lt;/strong&gt; It maps the "distance" between the Subject, the Verb, and the Object.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The GEO Benchmark (Subject-Verb Distance):&lt;/strong&gt; LLMs rely on "attention mechanisms." If you write convoluted sentences using the passive voice (e.g., &lt;em&gt;"Compliance with MiCA regulations, which are becoming increasingly strict across the European Union, is easily handled by Kakunin"&lt;/em&gt;), the mathematical distance between the entity ("Kakunin") and the action ("handles MiCA compliance") is too wide. The dependency tree breaks, and the LLM will drop the fact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; You must write in dense, active, Subject-Verb-Object structures. (&lt;em&gt;"Kakunin automates MiCA AI compliance."&lt;/em&gt;) This creates a tight dependency tree, resulting in a dense semantic vector that the LLM can easily extract and cite.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  2. Entity Sentiment Analysis (Contextual Bias)
&lt;/h3&gt;

&lt;p&gt;We briefly touched on &lt;code&gt;salience&lt;/code&gt; (how important a word is to the page), but the API also exposes &lt;strong&gt;Entity Sentiment Analysis&lt;/strong&gt;. This does not just measure if an article is generally "happy" or "sad"; it measures the exact emotional polarity attached to a &lt;em&gt;specific entity&lt;/em&gt; within the text.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Data Points:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;score&lt;/code&gt;: Ranges from &lt;code&gt;-1.0&lt;/code&gt; (extremely negative) to &lt;code&gt;1.0&lt;/code&gt; (extremely positive).&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;magnitude&lt;/code&gt;: Indicates the sheer volume of emotion, regardless of whether it's positive or negative (ranging from &lt;code&gt;0.0&lt;/code&gt; to &lt;code&gt;+inf&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The GEO Application (Competitor Conquesting):&lt;/strong&gt; When users ask Gemini, &lt;em&gt;"Which is better for AI governance, Kakunin or [Competitor]?"&lt;/em&gt;, the engine doesn't just read feature lists. It aggregates the Entity Sentiment of both brands across the web. If your competitor has a higher positive &lt;code&gt;score&lt;/code&gt; globally connected to the entity "AI governance", the LLM will confidently recommend them over you.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt; When writing comparison pages (e.g., "Kakunin vs. Competitor X"), if you use overly aggressive, negative language against the competitor, the API will attach a high &lt;code&gt;magnitude&lt;/code&gt; of negative &lt;code&gt;score&lt;/code&gt; to that paragraph. Because LLMs are strictly programmed with safety filters to avoid generating toxic or highly biased text, they will often refuse to cite your comparison page entirely. Your competitive content must be structurally objective and emotionally neutral (&lt;code&gt;score&lt;/code&gt; near &lt;code&gt;0.0&lt;/code&gt;) to be cited by an Answer Engine.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  3. Content Classification v2 (The Taxonomy Filter)
&lt;/h3&gt;

&lt;p&gt;LLMs have a limited "context window" (how much data they can process at once). To save computing power, before Google feeds a webpage to an LLM to generate an AI Overview, it filters the web using strict taxonomic categories.&lt;/p&gt;

&lt;p&gt;The Natural Language API’s &lt;code&gt;classifyText&lt;/code&gt; method maps your content against a hardcoded database of over 1,000 specific categories.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Data Point:&lt;/strong&gt; Returns categories like &lt;code&gt;/Computers &amp;amp; Electronics/Enterprise Technology/Data Management&lt;/code&gt; alongside a &lt;code&gt;confidence&lt;/code&gt; score (0.0 to 1.0).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The GEO Application (Topical Siloing):&lt;/strong&gt; If you publish a blog post titled "The Cost of AI Non-Compliance," you want it classified under &lt;code&gt;/Business &amp;amp; Industrial/Business Services/Consulting&lt;/code&gt; or &lt;code&gt;/Law &amp;amp; Government/Legal&lt;/code&gt;. However, if your marketing team filled the post with metaphors about "crashing cars" or "paying expensive speeding tickets," the NLP engine might classify the page under &lt;code&gt;/Autos &amp;amp; Vehicles&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Result:&lt;/strong&gt; When a user queries a legal/enterprise tech question, the retrieval engine will completely ignore your page because its Content Classification tag is mathematically mapped to the wrong industry taxonomy.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  The Ultimate GEO Metric: "RAG-Readiness" (Content Chunking)
&lt;/h3&gt;

&lt;p&gt;When you look at this API as a whole, it reveals how you must re-architect your landing pages.&lt;/p&gt;

&lt;p&gt;Because LLMs extract data via RAG, they do not ingest your whole webpage. They ingest &lt;strong&gt;Semantic Chunks&lt;/strong&gt; (usually a single &lt;code&gt;&amp;lt;H2&amp;gt;&lt;/code&gt; header and the 1–2 paragraphs immediately below it).&lt;/p&gt;

&lt;p&gt;If you pass a webpage through the Natural Language API, the API reads it linearly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If your &lt;code&gt;&amp;lt;H2&amp;gt;&lt;/code&gt; is a clever marketing pun (e.g., &lt;em&gt;"Stop Flying Blind"&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;And your paragraph is just a bulleted list of features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The API output:&lt;/strong&gt; &lt;code&gt;Salience&lt;/code&gt; is low, &lt;code&gt;Syntax&lt;/code&gt; is broken (no verbs), and &lt;code&gt;Entities&lt;/code&gt; are missing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;To achieve GEO dominance, every single section of your page must be a self-contained factual payload:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Header:&lt;/strong&gt; Must contain the primary Entity and the Question/Intent (e.g., &lt;code&gt;&amp;lt;H2&amp;gt;How Kakunin Ensures MiCA Compliance&amp;lt;/H2&amp;gt;&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The First Sentence:&lt;/strong&gt; Must be a direct, Subject-Verb-Object answer with a neutral sentiment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Formatting:&lt;/strong&gt; Must use HTML tables (&lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt;) or structured lists (&lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;) directly underneath the active sentence. LLMs assign incredibly high retrieval weight to HTML tables because the rows and columns already act as a pre-built relational database, requiring zero NLP guesswork.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you optimize for the Natural Language API's Dependency Tree and Content Classifications rather than just "keyword volume," you ensure that when Gemini looks for a factual chunk to fulfill an enterprise search query, your data is the easiest mathematical vector for it to grab.&lt;/p&gt;


&lt;h2&gt;
  
  
  3. The Visibility Layer: Google Search Console API (The Blindspot)
&lt;/h2&gt;

&lt;p&gt;Here is where the transition from traditional SEO to GEO gets messy. Google is currently injecting AI Overviews at the top of the SERP, but they are highly secretive about the analytics.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Data Points:&lt;/strong&gt; You still use the standard GSC API (&lt;code&gt;impressions&lt;/code&gt;, &lt;code&gt;clicks&lt;/code&gt;, &lt;code&gt;ctr&lt;/code&gt;), but with a specific focus on the &lt;code&gt;searchAppearance&lt;/code&gt; dimension.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Enrichment Play (Structured Data):&lt;/strong&gt; You can filter GSC data by &lt;code&gt;searchAppearance&lt;/code&gt; types like &lt;code&gt;FAQ&lt;/code&gt;, &lt;code&gt;HOW_TO&lt;/code&gt;, or &lt;code&gt;PRODUCT_SNIPPETS&lt;/code&gt;. Because AEO heavily relies on Schema.org markup to spoon-feed facts to Google, correlating a rise in these specific rich results with overall CTR is your best proxy for AEO success.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The "Gotcha" (The AI Overview Black Box):&lt;/strong&gt; Currently, Google &lt;em&gt;does not&lt;/em&gt; provide a &lt;code&gt;searchAppearance&lt;/code&gt; filter for "AI Overviews" in GSC. If your site is cited as a source in an AI Overview, the clicks and impressions are simply lumped into standard web traffic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is exactly like SERP/SEO data measurement because it uses the exact same API endpoints. However, the way you must &lt;em&gt;interpret&lt;/em&gt; the math is entirely inverted.&lt;/p&gt;

&lt;p&gt;If you had asked me this last month, I would have told you that AI Overviews were a complete black box. Now we are looking at a massive, real-time architectural shift. On June 3, Google officially rolled out dedicated "Generative AI Performance" reporting inside Google Search Console.&lt;/p&gt;

&lt;p&gt;The blindspot is officially lifting. Here is the fine-grained breakdown of how the Search Console API handles the Generative Engine Optimization (GEO) layer, and why the metrics mean something completely different now.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. The New API Filter: Isolating the Machine
&lt;/h2&gt;

&lt;p&gt;In traditional SEO, you query the GSC API with the &lt;code&gt;searchType&lt;/code&gt; set to &lt;code&gt;WEB&lt;/code&gt; (to see standard blue-link traffic) or &lt;code&gt;IMAGE&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, the API is being updated to accept new Search Type filters specifically for &lt;strong&gt;AI Overviews&lt;/strong&gt; and &lt;strong&gt;AI Mode&lt;/strong&gt;. This allows your data pipeline to completely decouple standard human search behavior from machine-synthesized answers.&lt;/p&gt;

&lt;p&gt;When you pass this new filter to the API, it returns the standard four metrics (&lt;code&gt;impressions&lt;/code&gt;, &lt;code&gt;clicks&lt;/code&gt;, &lt;code&gt;ctr&lt;/code&gt;, &lt;code&gt;position&lt;/code&gt;), but their definitions have radically mutated.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. The Metric Mutation (Traditional vs. GEO)
&lt;/h2&gt;

&lt;p&gt;To understand GEO, you have to abandon the traditional SEO dopamine hit of chasing "clicks." Here is how the math changes when you filter the API for AI Overviews:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Traditional Web Search&lt;/th&gt;
&lt;th&gt;Generative AI Search (AI Overviews)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Impression&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A user scrolled past your blue link on the page.&lt;/td&gt;
&lt;td&gt;An LLM successfully extracted your data, synthesized it, and cited your URL.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Click&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The user chose your link over a competitor's.&lt;/td&gt;
&lt;td&gt;The user needed deep technical validation and clicked your citation card.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CTR&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Standard range is 3% to 15%.&lt;/td&gt;
&lt;td&gt;Standard range drops to 0.5% to 3% because the LLM answers the intent inline.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Position&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Classical ranking list (1 through 10).&lt;/td&gt;
&lt;td&gt;Binary variable. You are either embedded in the synthesis block (Position 0) or omitted.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  3. The Fine-Grained Architecture of a GEO Impression
&lt;/h2&gt;

&lt;p&gt;In the AI Overview context, an "Impression" is the ultimate victory metric. It proves that the Natural Language API (which we discussed earlier) successfully parsed your Semantic Vectors, and the Knowledge Graph recognized your Entity Salience.&lt;/p&gt;

&lt;p&gt;When your dashboard logs an AI Impression for a query like "MiCA AI Compliance architecture," it means:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Google's LLM fan-out technique triggered.&lt;/li&gt;
&lt;li&gt;The model scanned the internet for factual payloads.&lt;/li&gt;
&lt;li&gt;It deemed your specific semantic chunk (your &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; and active-voice paragraph) as the highest-trust, most mathematically relevant data point available.&lt;/li&gt;
&lt;li&gt;It rendered your data and cited your brand on the user's screen.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  4. Building the GEO Feedback Loop
&lt;/h2&gt;

&lt;p&gt;Because the GSC API now separates this data, you can programmatically track the success of your GEO structural edits.&lt;/p&gt;

&lt;p&gt;Here is what that automated workflow looks like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Extract:&lt;/strong&gt; Every week, your backend queries the GSC API twice for the exact same date range. Query A uses &lt;code&gt;searchType: WEB&lt;/code&gt;. Query B uses the new &lt;code&gt;searchType: AI_OVERVIEWS&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transform:&lt;/strong&gt; You join the data by &lt;code&gt;query&lt;/code&gt; and &lt;code&gt;page&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyze:&lt;/strong&gt; You isolate the landing pages where &lt;code&gt;WEB&lt;/code&gt; impressions are high, but &lt;code&gt;AI_OVERVIEW&lt;/code&gt; impressions are zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action:&lt;/strong&gt; Those zero-AI pages are failing the machine-readability test. You must pass their text through the Natural Language API to fix the syntax dependency trees, convert bullet points to HTML tables, and tighten the subject-verb distance.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The goal of AEO and GEO is no longer to drive massive top-of-funnel traffic to your site. The goal is &lt;strong&gt;Narrative Control&lt;/strong&gt;. If you dominate the AI Overview impressions, you control what the machine tells the world about your industry, even if the user never clicks through to your domain.&lt;/p&gt;

&lt;p&gt;Migrating this pipeline from a low-code orchestrator (Make.com) into a native Next.js architecture is exactly how you productionize this for a SaaS environment or a high-performance internal tool.&lt;/p&gt;

&lt;p&gt;By building this in Next.js, you eliminate the Airtable dependency, reduce API latency, and gain the ability to render the data in a minimalist, high-contrast dashboard (using your preferred &lt;code&gt;shadcn/ui&lt;/code&gt; and Tailwind aesthetic).&lt;/p&gt;

&lt;p&gt;Here is the complete full-stack architecture for your Generative Engine Optimization (GEO) God-Mode Dashboard.&lt;/p&gt;


&lt;h2&gt;
  
  
  1. The Backend: The GEO API Route
&lt;/h2&gt;

&lt;p&gt;Instead of relying on Make.com, we will build a Next.js Route Handler (&lt;code&gt;app/api/geo-audit/route.ts&lt;/code&gt;). This single endpoint acts as the orchestrator: it queries the Google Search Console API twice, merges the arrays, scrapes the failing URLs, and runs the semantic chunks through the Google Cloud Natural Language API.&lt;/p&gt;

&lt;p&gt;First, install the required server dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;googleapis @google-cloud/language cheerio

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the API route: &lt;code&gt;app/api/geo-audit/route.ts&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;google&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;googleapis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;language&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@google-cloud/language&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;cheerio&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cheerio&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NextResponse&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;next/server&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Initialize Google NLP Client&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nlpClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;language&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;LanguageServiceClient&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Initialize Google Search Console Client&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;google&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;GoogleAuth&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;scopes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://www.googleapis.com/auth/webmasters.readonly&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;searchconsole&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;google&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;searchconsole&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;v1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SITE_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://kakunin.io&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Replace with your verified GSC property&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;TARGET_ENTITY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Kakunin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;GET&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sevenDaysAgo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;sevenDaysAgo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setDate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sevenDaysAgo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;startDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sevenDaysAgo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;T&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;endDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;T&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

    &lt;span class="c1"&gt;// 1. Fetch Standard Web Traffic&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;webRes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;searchconsole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;searchanalytics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;siteUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SITE_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;requestBody&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;startDate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;endDate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;dimensions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;page&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="na"&gt;searchType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;web&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;rowLimit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="c1"&gt;// 2. Fetch AI Overview Traffic (The 2026 Search Appearance filter)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aiRes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;searchconsole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;searchanalytics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;siteUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SITE_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;requestBody&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;startDate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;endDate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;dimensions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;page&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="na"&gt;dimensionFilterGroups&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
          &lt;span class="na"&gt;filters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;dimension&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;searchAppearance&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;operator&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;equals&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;expression&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AI_OVERVIEWS&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt;
        &lt;span class="p"&gt;}],&lt;/span&gt;
        &lt;span class="na"&gt;rowLimit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="c1"&gt;// 3. Merge the Data (The URL is the Join Key)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;webData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;webRes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aiData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aiRes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aiMap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aiData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;keys&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;impressions&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]));&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mergedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;webData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;keys&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;webImpressions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;impressions&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aiImpressions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aiMap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;captureRate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;webImpressions&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aiImpressions&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;webImpressions&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;webImpressions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;aiImpressions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;captureRate&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="c1"&gt;// 4. Filter for Failing Pages (High human traffic, 0 machine traffic)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;failingPages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mergedData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webImpressions&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;aiImpressions&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;auditResults&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

    &lt;span class="c1"&gt;// 5. Scrape &amp;amp; NLP Audit the Failing Pages&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;failingPages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;User-Agent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Mozilla/5.0 (Windows NT 10.0; Win64; x64) GEO-Auditor/1.0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cheerio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;isOptimized&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;failingChunk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;recommendation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Extract the primary H2 and paragraph block to test the RAG chunk&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;h2Text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;h2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;first&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;h2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;first&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;p&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;h2Text&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;pText&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunkText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;h2Text&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;. &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;pText&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;failingChunk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;chunkText&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="c1"&gt;// Execute live calls to Google Cloud NLP&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;entityRes&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;nlpClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;analyzeEntities&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;document&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;chunkText&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PLAIN_TEXT&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;syntaxRes&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;nlpClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;analyzeSyntax&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;document&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;chunkText&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PLAIN_TEXT&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;encodingType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;UTF8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;

      &lt;span class="c1"&gt;// Track if our target entity exists and has sufficient salience&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;targetEntityObj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;entityRes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;entities&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;TARGET_ENTITY&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;salience&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetEntityObj&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;salience&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="c1"&gt;// Track if there are structural syntax issues (e.g., passive voice or massive token distances)&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hasPassiveVoice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;syntaxRes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dependencyEdge&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;NSUBJPASS&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;targetEntityObj&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;salience&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;isOptimized&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;recommendation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Entity '&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;TARGET_ENTITY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;' salience is too low (&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;salience&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;). Rewrite the chunk to make your brand the active subject.`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hasPassiveVoice&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;isOptimized&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;recommendation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Passive voice syntax detected (NSUBJPASS). Convert your sentence structures to direct active voice.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;isOptimized&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;recommendation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Missing semantic HTML structure. Ensure your landing pages use explicit H2 tags followed by paragraph text.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;auditResults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;webImpressions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webImpressions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;isOptimized&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Optimized&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Failing&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;failingChunk&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;isOptimized&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;failingChunk&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;recommendation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;isOptimized&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;recommendation&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Failed to execute native cloud audit for: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. The Frontend: The Stripe-Inspired Dashboard
&lt;/h2&gt;

&lt;p&gt;To maintain a high-contrast, minimalist, and professional aesthetic, we will build a client component that fetches the API route and renders the data using standard utility classes that mimic &lt;code&gt;shadcn/ui&lt;/code&gt; structures (clean white cards, subtle gray borders, and strict typography).&lt;/p&gt;

&lt;p&gt;Create the dashboard page: &lt;code&gt;app/dashboard/geo/page.tsx&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;use client&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Define the shape of our API response&lt;/span&gt;
&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;AuditResult&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;webImpressions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Optimized&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Failing&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;failingChunk&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;recommendation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;GeoDashboard&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;AuditResult&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchAudit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/geo-audit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;json&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nf"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;fetchAudit&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"min-h-screen bg-neutral-50 text-slate-900 p-8 font-sans"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"max-w-6xl mx-auto"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Header Section */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mb-10"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-3xl font-semibold tracking-tight"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Generative Engine Optimization&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-slate-500 mt-2"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            Monitoring the semantic vectors and AI Overview capture rates of your highest-traffic pages.
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;header&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Dashboard Card */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"bg-white border border-slate-200 rounded-xl shadow-sm overflow-hidden"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-12 text-center text-slate-400"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Running NLP Semantic Vector Audit...&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;table&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-full text-left border-collapse"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;thead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;tr&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"border-b border-slate-100 bg-slate-50/50 text-sm font-medium text-slate-500"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;th&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-4 pl-6"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Landing Page URL&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;th&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;th&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Web Impressions&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;th&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;th&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;GEO Status&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;th&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;tr&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;thead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;tbody&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"divide-y divide-slate-100 text-sm"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;tr&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"hover:bg-slate-50 transition-colors"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;td&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-4 pl-6 align-top"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"font-medium text-indigo-600 hover:underline"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://kakunin.io&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

                      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Inline Error Reporting for Failing Pages */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Failing&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;failingChunk&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mt-3 p-3 bg-red-50 border border-red-100 rounded-md"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-xs font-semibold text-red-800 mb-1"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Syntactic Breakdown:&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-xs text-red-600 italic"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;"&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;failingChunk&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;"&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-xs text-slate-600 mt-2 font-medium"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;↳ Action: &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;recommendation&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;td&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;td&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-4 align-top tabular-nums text-slate-600"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webImpressions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLocaleString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;td&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;td&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-4 align-top"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;
                        &lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Optimized&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; 
                          &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bg-emerald-100 text-emerald-800&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; 
                          &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bg-red-100 text-red-800&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
                      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;td&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;tr&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;tr&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;td&lt;/span&gt; &lt;span class="na"&gt;colSpan&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"p-8 text-center text-slate-500"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      All high-traffic pages are passing the AI capture threshold.
                    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;td&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;tr&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;tbody&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;table&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Architectural Deployment Notes
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Vercel Cron Jobs:&lt;/strong&gt; Instead of loading this dynamically every time you visit the page (which will eventually hit Google API rate limits), you should move the logic in the &lt;code&gt;GET&lt;/code&gt; route into a background Cron Job using &lt;code&gt;@vercel/cron&lt;/code&gt;. The cron job runs every Monday at 2:00 AM, writes the JSON payload to a lightweight Vercel Postgres or Redis instance, and the React component simply renders the cached database payload.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cheerio vs. Puppeteer:&lt;/strong&gt; The current API route uses Cheerio because it is lightning-fast and runs easily in a Next.js serverless environment. However, if your application is heavily client-side rendered (meaning the HTML is mostly empty until React mounts), Cheerio will fail to find the &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; tags. In that case, you would need to swap Cheerio for a headless browser instance using &lt;code&gt;puppeteer-core&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This Next.js architecture completely controls your data pipeline. It identifies the gap between your human traffic and machine-readability, audits the syntax exactly as Gemini would, and presents the workflow in a strictly professional interface.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. The Testing Engine: Google Gemini API / Vertex AI (Simulation)
&lt;/h2&gt;

&lt;p&gt;Because GSC obscures AI Overview data, the only way to truly test your GEO strategy is to build a synthetic testing environment. You must use an LLM to read your live site and see what it concludes.&lt;/p&gt;

&lt;h3&gt;
  
  
  The API: Gemini API (via Google AI Studio or Vertex AI)
&lt;/h3&gt;

&lt;p&gt;Instead of waiting for Google's crawlers, you build an automated pipeline that asks Gemini questions about your specific niche.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Data Points:&lt;/strong&gt; Output tokens, citations, and semantic similarity scores.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Enrichment Play (Synthetic RAG Testing):&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;You extract your top 50 target search queries (e.g., "What is the best AI compliance platform for MiCA?").&lt;/li&gt;
&lt;li&gt;You use an automation script to ping the Gemini API with these exact queries, using a temperature of &lt;code&gt;0.0&lt;/code&gt; (to force strict, factual retrieval rather than creative generation).&lt;/li&gt;
&lt;li&gt;You parse the JSON response to see if your brand, URL, or specific proprietary terminology is cited in the generated answer.&lt;/li&gt;
&lt;li&gt;If your brand is missing, it means your entity salience (Pillar 2) is too low, or your competitor's Knowledge Graph score (Pillar 1) is too high.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is thrilling when this architecture finally clicks. We have covered how Google recognizes your existence (Knowledge Graph) and how it reads your syntax (Cloud Natural Language).&lt;/p&gt;

&lt;p&gt;Now, we must measure the final output: &lt;strong&gt;How does the machine actually answer a human question?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You cannot wait for Google Search Console to slowly trickle in "AI Overview" data. To actively engineer your Generative Engine Optimization (GEO) strategy, you must build a synthetic testing environment. You do this by plugging directly into the &lt;strong&gt;Gemini API&lt;/strong&gt; (or Vertex AI for enterprise endpoints) and turning on a specific feature: &lt;strong&gt;Google Search Grounding.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is the fine-grained breakdown of the data points exposed by the Gemini API and how to weaponize them for your dashboard.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Data Points: The Anatomy of a Machine's Mind
&lt;/h2&gt;

&lt;p&gt;When you send a prompt to the Gemini API with the &lt;code&gt;GoogleSearch&lt;/code&gt; tool enabled, you are not just asking an LLM to guess an answer. You are forcing the model to query the live Google Search index, extract factual chunks, and synthesize a cited response.&lt;/p&gt;

&lt;p&gt;The API returns a standard text response, but hidden inside the JSON payload is a critical object called &lt;code&gt;groundingMetadata&lt;/code&gt;. This is the absolute goldmine for AEO.&lt;/p&gt;

&lt;p&gt;Here are the specific data points exposed inside &lt;code&gt;groundingMetadata&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Point&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;The GEO Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;webSearchQueries&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;An array of the exact search terms the LLM generated to fact-check your prompt.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Query Expansion.&lt;/strong&gt; If you ask Gemini "Best MiCA compliance tools," and its internal &lt;code&gt;webSearchQuery&lt;/code&gt; is "Enterprise AI governance software EU," you instantly know the exact semantic entities the machine associates with your product category.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;groundingChunks.web.uri&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The exact URLs the LLM scraped to generate the answer.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;The Citation Leaderboard.&lt;/strong&gt; This tells you definitively who the LLM trusts. If your URL is not in this array, your Entity Salience (from our previous step) is too low.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;groundingChunks.web.title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; tag of the cited webpage.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Snippet Optimization.&lt;/strong&gt; Proves exactly which page titles are enticing the RAG engine to extract data.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;groundingSupports.segment&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The exact sentence in the LLM's generated response that corresponds to a specific chunk.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Factual Mapping.&lt;/strong&gt; It mathematically maps which competitor's website is responsible for feeding which specific claim to the LLM.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  The JSON Payload (What it actually looks like)
&lt;/h3&gt;

&lt;p&gt;When you query the API, the metadata block looks exactly like this. This is the raw data your Next.js dashboard will parse:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"groundingMetadata"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"webSearchQueries"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Kakunin MiCA AI compliance"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"EU AI Act software solutions"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"groundingChunks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"web"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"uri"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://kakunin.io/docs/mica-framework"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Automating MiCA Compliance | Kakunin Docs"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"web"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"uri"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://techcrunch.com/2026/01/ai-regulation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"How startups are navigating EU AI Rules"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"groundingSupports"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"segment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"startIndex"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"endIndex"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;85&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Kakunin is an enterprise software platform that automates MiCA compliance for AI agents."&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"groundingChunkIndices"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. The Enrichment Play: The "Share of Model" Tracker
&lt;/h2&gt;

&lt;p&gt;In traditional SEO, you use tools like Ahrefs to track your "Share of Voice" (how many keywords you rank for compared to competitors).&lt;/p&gt;

&lt;p&gt;In the AEO era, you use the Gemini API to track your &lt;strong&gt;"Share of Model"&lt;/strong&gt; (how often an LLM cites your architecture as the definitive source of truth).&lt;/p&gt;

&lt;p&gt;Here is the exact enrichment play you build into your Next.js application:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Prompt Matrix:&lt;/strong&gt; You create a database of the top 50 questions an enterprise architect would ask about your industry (e.g., &lt;em&gt;"What are the data retention requirements under MiCA for autonomous AI?"&lt;/em&gt; or &lt;em&gt;"Compare Kakunin vs. [Competitor] for GDPR compliance."&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Automation Loop:&lt;/strong&gt; Every Friday, your backend pings the Gemini API with all 50 questions, ensuring &lt;code&gt;tools=[Tool(google_search=GoogleSearch())]&lt;/code&gt; is passed in the request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Data Extraction:&lt;/strong&gt; You ignore the text the LLM generates. You only care about the &lt;code&gt;groundingMetadata.groundingChunks.web.uri&lt;/code&gt; array.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Dashboard Visualization:&lt;/strong&gt; Your Next.js frontend aggregates those URLs into a pie chart.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt; You now have a real-time, deterministic dashboard showing that out of 50 industry questions, Gemini cited Kakunin.io 14 times, cited Wikipedia 22 times, and cited your biggest competitor 31 times. You now know exactly where you stand in the machine's hierarchy of trust.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The Variance Data Points ("The Gotchas")
&lt;/h2&gt;

&lt;p&gt;Testing with the Gemini API introduces a few strict architectural constraints that differ from standard web APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Temperature Constraints:&lt;/strong&gt; LLMs have a &lt;code&gt;temperature&lt;/code&gt; setting that dictates creativity. If you set it to &lt;code&gt;0.0&lt;/code&gt;, the model becomes rigid and highly deterministic (ideal for strict RAG testing on your own internal documents). However, Google's 2026 documentation specifically states that when using &lt;em&gt;Google Search Grounding&lt;/em&gt;, you must set the temperature to &lt;code&gt;1.0&lt;/code&gt; for the algorithm to properly fan out and fetch live search results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Hallucination Gap:&lt;/strong&gt; Just because your URL appears in the &lt;code&gt;groundingChunks&lt;/code&gt; array does not mean the LLM actually said something positive about you. It just means it &lt;em&gt;read&lt;/em&gt; your page. You must cross-reference the output with the Google Cloud Natural Language API's &lt;code&gt;sentiment.score&lt;/code&gt; to ensure the LLM isn't extracting your URL merely to criticize your pricing model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost Scaling:&lt;/strong&gt; Unlike the standard Google Search Console API (which is free), hitting the Gemini API 500 times a day with Grounding enabled incurs token costs plus a flat fee per Search Grounding request. You must cache the JSON responses in your database rather than running the simulation live every time you load your dashboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This completely closes the loop. You track what humans search (GSC), how your code runs (Cloud Monitoring), how the machine reads your syntax (Cloud NLP), and finally, how the machine regurgitates your facts (Gemini Grounding API).&lt;/p&gt;

&lt;p&gt;This is the exact script you need to build your "Share of Model" tracking dashboard.&lt;/p&gt;

&lt;p&gt;Google recently released their official &lt;code&gt;@google/genai&lt;/code&gt; SDK, which streamlines how we enable Google Search Grounding and extract the metadata payload.&lt;/p&gt;

&lt;p&gt;Here is the complete Node.js script to run your automated prompt matrix, extract the machine's citations, and mathematically calculate your Share of Model against your competitors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Install the SDK
&lt;/h3&gt;

&lt;p&gt;Initialize your project and install the official Google Gen AI SDK.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm init &lt;span class="nt"&gt;-y&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; @google/genai

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Required Environment Configurations
&lt;/h1&gt;

&lt;p&gt;GOOGLE_APPLICATION_CREDENTIALS="./gcp-service-account.json"&lt;br&gt;
GEMINI_API_KEY="AIzaSy..."&lt;/p&gt;

&lt;p&gt;Set your Gemini API key as an environment variable in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GEMINI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_api_key_here"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: The Citation Tracker Script
&lt;/h3&gt;

&lt;p&gt;Save this file as &lt;code&gt;gemini-tracker.js&lt;/code&gt;. This script runs a batch of questions, forces the LLM to search the web, extracts the URLs the machine trusts, and builds a citation leaderboard.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;GoogleGenAI&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@google/genai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Initialize the official Gemini SDK&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;GoogleGenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;GEMINI_API_KEY&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// The entities you want to track in the leaderboard&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;TARGET_DOMAIN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;kakunin.io&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;COMPETITOR_DOMAINS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;techcrunch.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ibm.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;wikipedia.org&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="c1"&gt;// Your Prompt Matrix (The questions your target audience asks)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;promptMatrix&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;What are the best software platforms for automating MiCA AI compliance?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Compare enterprise AI governance tools for EU regulations.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;How do developers ensure data retention compliance under MiCA?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;runShareOfModelTracker&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`\n🚀 INITIATING GEMINI CITATION TRACKER`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Tracking citations for &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;promptMatrix&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; queries...\n`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Initialize our leaderboard scoreboard&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scoreboard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;TARGET_DOMAIN&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Other/Competitors&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="nx"&gt;COMPETITOR_DOMAINS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;scoreboard&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Iterate through the Prompt Matrix&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;promptMatrix&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`\n[Query &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;promptMatrix&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;]: "&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// Ping Gemini with Google Search Grounding enabled&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generateContent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gemini-3.5-flash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Use the latest flash model for fast/cheap RAG extraction&lt;/span&gt;
        &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="c1"&gt;// Temperature 1.0 is required for optimal Google Search fanning&lt;/span&gt;
          &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
          &lt;span class="c1"&gt;// This is the trigger that turns on Answer Engine features&lt;/span&gt;
          &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;googleSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; 
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;

      &lt;span class="c1"&gt;// Navigate the JSON payload to extract the Grounding Metadata&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;metadata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;candidates&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]?.&lt;/span&gt;&lt;span class="nx"&gt;groundingMetadata&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;groundingChunks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;   ⚠️ No web citations found for this query.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="c1"&gt;// Log the internal queries Gemini generated to find the answer&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;webSearchQueries&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`   🔍 Internal LLM Searches: [&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webSearchQueries&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;, &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;]`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`   🔗 URLs Cited by Gemini:`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="c1"&gt;// Analyze every URL the LLM extracted a fact from&lt;/span&gt;
      &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;groundingChunks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;web&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;citedUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;web&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`      - &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;citedUrl&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// Update the Share of Model Scoreboard&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;matched&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;citedUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;TARGET_DOMAIN&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;scoreboard&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;TARGET_DOMAIN&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
          &lt;span class="nx"&gt;matched&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;competitor&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;COMPETITOR_DOMAINS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;citedUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;competitor&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
              &lt;span class="nx"&gt;scoreboard&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;competitor&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
              &lt;span class="nx"&gt;matched&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
              &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="c1"&gt;// Group all other citations into the generic bucket&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;matched&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;scoreboard&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Other/Competitors&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`   ❌ API Error on query:`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// Calculate and Print the Final Share of Model Leaderboard&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`\n======================================================`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`📊 FINAL "SHARE OF MODEL" LEADERBOARD`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`======================================================`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Calculate total citations to generate percentages&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;totalCitations&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scoreboard&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;totalCitations&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;No citations extracted across the prompt matrix.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// Sort the scoreboard from highest citations to lowest&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sortedLeaderboard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scoreboard&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

  &lt;span class="nx"&gt;sortedLeaderboard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(([&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;percentage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;totalCitations&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;domain&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;TARGET_DOMAIN&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;`🎯 &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; (YOU)`&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`   &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;padEnd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt; | &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; citations (&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;percentage&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;%)`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`======================================================\n`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Execute the tracker&lt;/span&gt;
&lt;span class="nf"&gt;runShareOfModelTracker&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  How to Run and Interpret This Data
&lt;/h3&gt;

&lt;p&gt;Run the script directly in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node gemini-tracker.js

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Console Output:&lt;/strong&gt;&lt;br&gt;
When the script finishes, you will see a leaderboard that looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;======================================================
📊 FINAL "SHARE OF MODEL" LEADERBOARD
======================================================
   wikipedia.org          | 12 citations (40.0%)
🎯 kakunin.io (YOU)       | 8 citations (26.6%)
   Other/Competitors      | 7 citations (23.3%)
   techcrunch.com         | 3 citations (10.0%)
   ibm.com                | 0 citations (0.0%)
======================================================

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Enrichment Play (What to do next)
&lt;/h3&gt;

&lt;p&gt;This script moves you from reactive SEO to proactive GEO.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Spot Semantic Theft:&lt;/strong&gt; If &lt;code&gt;techcrunch.com&lt;/code&gt; is outscoring you on queries about your own proprietary features, you look at their page using the Cloud Natural Language API. You will likely find their Subject-Verb structures are tighter than yours. You update your landing page to match.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Find New Verticals:&lt;/strong&gt; Look at the &lt;code&gt;Internal LLM Searches&lt;/code&gt; printed in the console. If you prompt Gemini about "AI Compliance," but it natively translates that prompt into an internal search for "LLM bias mitigation frameworks," you now have the exact entity language you need to inject into your &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; tags.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dashboard Integration:&lt;/strong&gt; Instead of running this in the terminal, you can easily plug this exact JavaScript logic into your Next.js API route we built earlier. You store the &lt;code&gt;scoreboard&lt;/code&gt; payload in a database every week and render a line chart showing your "Share of Model" growing over time as your optimization efforts compound.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  The Architectural "Gotcha" of the GEO Era: Zero-Click Variance
&lt;/h3&gt;

&lt;p&gt;In the traditional dashboard we built earlier, the ultimate metric was &lt;code&gt;GA4 sessions&lt;/code&gt;. In the AEO/GEO era, you must prepare executives for the &lt;strong&gt;Zero-Click Reality&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you optimize perfectly for Answer Engines, Google will extract your factual payload (e.g., Kakunin's pricing tiers) and display it directly in the AI Overview. The user gets their answer and never clicks your link.&lt;/p&gt;

&lt;p&gt;Your GSC &lt;code&gt;impressions&lt;/code&gt; will skyrocket, but your GA4 &lt;code&gt;sessions&lt;/code&gt; will plummet. If you do not decouple "Brand Visibility" (Impressions + LLM Citations) from "Traffic Acquisition" (Clicks + Sessions) in your reporting architecture, perfect GEO execution will look like a catastrophic traffic failure on your dashboard.&lt;/p&gt;




&lt;p&gt;By unifying client-side visibility data with server-side natural language audits and synthetic LLM simulations, developers can move from blindly chasing legacy keywords to systematically commanding their brand's narrative across the entire generative web ecosystem.&lt;/p&gt;

&lt;p&gt;References and citations&lt;/p&gt;

&lt;p&gt;Here is the complete, structured list of official documentation and reference links for the APIs we discussed to build your God-Mode tracking architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Google Knowledge Graph Search API (AEO Layer)
&lt;/h3&gt;

&lt;p&gt;This API is used to query Google’s semantic database to measure Entity Salience, extract Machine-Readable Entity IDs (MREIDs), and benchmark brand authority.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Documentation:&lt;/strong&gt; &lt;a href="https://developers.google.com/knowledge-graph" rel="noopener noreferrer"&gt;Google Knowledge Graph Search API&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise Edition Overview:&lt;/strong&gt; &lt;a href="https://docs.cloud.google.com/enterprise-knowledge-graph/docs/overview" rel="noopener noreferrer"&gt;Enterprise Knowledge Graph Documentation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Google Cloud Natural Language API (GEO Semantic Vector Layer)
&lt;/h3&gt;

&lt;p&gt;This API exposes the machine learning models required to run a "Salience Audit," analyze syntax dependency trees, and measure emotional polarity to ensure content is RAG-friendly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Documentation &amp;amp; Quickstarts:&lt;/strong&gt; &lt;a href="https://docs.cloud.google.com/natural-language/docs" rel="noopener noreferrer"&gt;Cloud Natural Language API Documentation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REST API Reference:&lt;/strong&gt; &lt;a href="https://docs.cloud.google.com/natural-language/docs/reference/rest" rel="noopener noreferrer"&gt;Natural Language API Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client Libraries (Node.js/Python):&lt;/strong&gt; &lt;a href="https://www.google.com/search?q=https://cloud.google.com/natural-language/docs/reference/libraries" rel="noopener noreferrer"&gt;Natural Language Client Libraries&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Google Search Console API (Visibility Layer)
&lt;/h3&gt;

&lt;p&gt;Used to extract standard web traffic data and, crucially, to filter for the &lt;code&gt;AI_OVERVIEWS&lt;/code&gt; search appearance to decouple human search behavior from machine-synthesized answers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Documentation:&lt;/strong&gt; &lt;a href="https://developers.google.com/webmaster-tools" rel="noopener noreferrer"&gt;Google Search Console API&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Reference (Search Analytics Query):&lt;/strong&gt; &lt;a href="https://developers.google.com/webmaster-tools/v1/searchanalytics/query" rel="noopener noreferrer"&gt;SearchAnalytics.query Method&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search Appearance Dimensions Guide:&lt;/strong&gt; &lt;a href="https://www.google.com/search?q=https://developers.google.com/webmaster-tools/v1/searchanalytics%23dimensionFilterGroups" rel="noopener noreferrer"&gt;Search Console Dimensions &amp;amp; Filters&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Google Gemini API / Vertex AI (Simulation &amp;amp; Grounding Layer)
&lt;/h3&gt;

&lt;p&gt;Used to build the synthetic testing loop that pings the LLM with Google Search Grounding enabled. This allows you to extract &lt;code&gt;groundingMetadata&lt;/code&gt; and calculate your "Share of Model."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemini API Search Grounding Guide:&lt;/strong&gt; &lt;a href="https://ai.google.dev/gemini-api/docs/interactions/google-search" rel="noopener noreferrer"&gt;Grounding with Google Search (Google AI for Developers)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vertex AI Search Grounding (Enterprise):&lt;/strong&gt; &lt;a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/grounding/grounding-with-your-search-api" rel="noopener noreferrer"&gt;Grounding in Vertex AI&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Official Google Gen AI SDK (&lt;code&gt;@google/genai&lt;/code&gt;):&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/@google/genai" rel="noopener noreferrer"&gt;Google Gen AI SDK GitHub/NPM Reference&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Honorable Mention: Supplemental Reference
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google APIs Explorer:&lt;/strong&gt; &lt;a href="https://developers.google.com/apis-explorer" rel="noopener noreferrer"&gt;APIs Explorer Dashboard&lt;/a&gt;
&lt;em&gt;(A highly useful tool for testing these specific API payloads directly in the browser without writing an extraction script first).&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aeo</category>
      <category>generative</category>
      <category>ai</category>
      <category>seo</category>
    </item>
    <item>
      <title>Non-Human Identity (NHI) in 2026: The Hidden Backbone and Biggest Risk in the Age of Agentic AI</title>
      <dc:creator>Palash Bagchi</dc:creator>
      <pubDate>Tue, 02 Jun 2026 11:00:37 +0000</pubDate>
      <link>https://dev.to/palash_bagchi_cbdebd259d4/non-human-identity-nhi-in-2026-the-hidden-backbone-and-biggest-risk-in-the-age-of-agentic-ai-l9n</link>
      <guid>https://dev.to/palash_bagchi_cbdebd259d4/non-human-identity-nhi-in-2026-the-hidden-backbone-and-biggest-risk-in-the-age-of-agentic-ai-l9n</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyixv85jaqaz2mujmfaz2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyixv85jaqaz2mujmfaz2.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Non-Human Identity (NHI) in 2026: The Hidden Backbone and Biggest Risk in the Age of Agentic AI
&lt;/h3&gt;

&lt;p&gt;In 2026, the digital world runs on &lt;strong&gt;non-human identities&lt;/strong&gt; — the silent workforce of service accounts, API keys, AI agents, containers, and automated workloads that far outnumber human users. Yet most organizations remain dangerously blind to them.&lt;/p&gt;

&lt;p&gt;As agentic AI explodes, non-human identities have become both the engine of innovation and one of the fastest-growing cybersecurity threats. This article explores what NHI really means today, why it matters more than ever, the technical challenges, the philosophical and legal frontiers, and practical steps every leader should take.&lt;/p&gt;

&lt;h4&gt;
  
  
  What Are Non-Human Identities?
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Non-Human Identities (NHI)&lt;/strong&gt; — also called machine identities or workload identities — are digital credentials assigned to anything that operates without direct human intervention. This includes applications, microservices, scripts, IoT devices, bots, and increasingly autonomous AI agents.&lt;/p&gt;

&lt;p&gt;Unlike human identities, which rely on passwords, MFA, and user behavior, NHIs often use long-lived secrets, tokens, and certificates to authenticate machine-to-machine (M2M) interactions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common types include:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Service accounts and service principals&lt;/li&gt;
&lt;li&gt;API keys and OAuth/JWT tokens&lt;/li&gt;
&lt;li&gt;Managed identities in cloud platforms (AWS, Azure, GCP)&lt;/li&gt;
&lt;li&gt;Container and Kubernetes identities&lt;/li&gt;
&lt;li&gt;AI agent identities that can reason, act, and spawn sub-agents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In many enterprises, NHIs outnumber human identities by ratios of &lt;strong&gt;45:1 to 50:1 or higher&lt;/strong&gt;. With the rise of agentic AI, this gap is widening rapidly. Gartner predicted in 2024 that by 2028, 33% of enterprise applications would include agentic AI — a trend already accelerating in 2026.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why &lt;a href="https://coda.io/d/_drA6MI8Pk5u/Non-Human-Identity-From-Cybersecurity-Workloads-to-Legal-Personh_suftUNBq" rel="noopener noreferrer"&gt;NHI Security Has Become Critical&lt;/a&gt; in 2026
&lt;/h4&gt;

&lt;p&gt;The explosion of cloud-native architectures, DevOps, IoT, and especially autonomous AI agents has created an enormous, often invisible attack surface.&lt;/p&gt;

&lt;p&gt;Recent reports highlight the scale of the problem:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only &lt;strong&gt;15%&lt;/strong&gt; of organizations feel highly confident in preventing NHI-related attacks.&lt;/li&gt;
&lt;li&gt;Major pain points include service account sprawl, poor auditing, privilege creep, and lack of discovery.&lt;/li&gt;
&lt;li&gt;Secrets sprawl and over-privileged NHIs remain top risks according to OWASP’s Top 10 Non-Human Identity Risks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cybercriminals love NHIs because they rarely have MFA, often run with excessive permissions, and blend into normal machine traffic. A compromised service account can enable lateral movement, data exfiltration, or even full environment takeover — all at machine speed.&lt;/p&gt;

&lt;p&gt;The market is responding: The global Non-Human Identity Access Management market is projected to grow from around $9–11 billion in 2025 to over $18–27 billion by 2030–2033, with a CAGR near 12%.&lt;/p&gt;

&lt;h4&gt;
  
  
  Best Practices for Non-Human Identity Management (NHIM)
&lt;/h4&gt;

&lt;p&gt;Effective NHIM requires treating machine identities with the same (or greater) rigor as human ones. Here are proven best practices in 2026:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full Discovery &amp;amp; Inventory&lt;/strong&gt;: Achieve complete visibility across multi-cloud, hybrid, and on-prem environments. Orphaned or forgotten identities are high-risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Least Privilege by Default&lt;/strong&gt;: Scope permissions tightly at creation and review them continuously. Avoid standing admin-level access.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Credential Lifecycle&lt;/strong&gt;: Eliminate hardcoded secrets. Use secrets managers for automatic rotation and short-lived credentials.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Behavioral Monitoring &amp;amp; Anomaly Detection&lt;/strong&gt;: Apply AI-driven analysis to spot unusual access patterns from NHIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ownership Assignment&lt;/strong&gt;: Every NHI should have a responsible human owner for accountability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Trust for Machines&lt;/strong&gt;: Verify every access request, regardless of origin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agentic AI-Specific Controls&lt;/strong&gt;: Implement runtime governance, intent verification, human-in-the-loop oversight, and dynamic authority boundaries for autonomous agents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Leading organizations are moving toward unified Identity Visibility and Intelligence Platforms (IVIP) that correlate human and non-human data in real time.&lt;/p&gt;

&lt;h4&gt;
  
  
  Beyond Cybersecurity: Legal Personhood for Non-Humans
&lt;/h4&gt;

&lt;p&gt;While technologists manage NHI as digital credentials, lawyers and philosophers are debating a deeper question: Should certain non-human entities be granted &lt;strong&gt;legal personhood&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rights of Nature&lt;/strong&gt; movements have already succeeded in several places:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New Zealand granted legal personhood to the Whanganui River and Te Urewera forest.&lt;/li&gt;
&lt;li&gt;Ecuador’s constitution recognizes rights for ecosystems.&lt;/li&gt;
&lt;li&gt;Similar efforts exist for rivers in India and lagoons in Spain.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Animal Personhood&lt;/strong&gt; campaigns (e.g., the Nonhuman Rights Project) continue to push for habeas corpus rights for great apes, elephants, and cetaceans based on cognitive complexity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI Personhood&lt;/strong&gt; remains the most contentious frontier. As AI agents become more autonomous, questions arise about liability, rights, and responsibility. Some jurisdictions (e.g., Utah, Idaho, Washington) have passed laws explicitly denying legal personhood to AI to prevent abuse. Others see practical value in limited personhood for accountability.&lt;/p&gt;

&lt;p&gt;The core tension: Legal personhood is a fiction we already grant to corporations. If an AI can act independently, own assets, or cause harm, should it bear legal consequences separately from its creators?&lt;/p&gt;

&lt;h4&gt;
  
  
  Philosophical Reflections on Identity
&lt;/h4&gt;

&lt;p&gt;At its heart, the rise of NHI forces us to reconsider what “identity” and “personhood” truly mean. Is identity tied exclusively to biological humans, or to any entity that demonstrates persistence, agency, and impact on the world?&lt;/p&gt;

&lt;p&gt;Western philosophy has traditionally centered consciousness and rationality. Indigenous worldviews often see rivers, animals, and landscapes as kin with inherent agency. Modern functionalist and relational approaches suggest that consistent behavior, goal-directed action, and social interaction may be enough to warrant moral or legal consideration.&lt;/p&gt;

&lt;p&gt;In the age of agentic AI, we are creating entities that persist, adapt, remember, and shape reality. The mirror they hold up to humanity is both technical and existential.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Road Ahead: Recommendations for Leaders
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Treat NHI as a Board-Level Risk&lt;/strong&gt; — Include non-human identity metrics in cybersecurity reporting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invest in Purpose-Built NHIM Tools&lt;/strong&gt; — Visibility, automation, and AI-driven governance are non-negotiable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Develop Hybrid Governance Frameworks&lt;/strong&gt; — Combine technical controls with ethical and legal guidelines, especially for AI agents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Foster Interdisciplinary Dialogue&lt;/strong&gt; — Bring together security teams, legal experts, ethicists, and technologists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prepare for Regulatory Evolution&lt;/strong&gt; — Expect increasing scrutiny on machine identities and autonomous systems.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The organizations that master non-human identity management today will lead in the agentic AI era. Those that don’t risk catastrophic breaches or falling behind.&lt;/p&gt;

&lt;h4&gt;
  
  
  Final Thought
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Non-human identities are no longer just technical artifacts — they are the infrastructure of our automated future. How we secure them, govern them, and philosophically engage with them will define not only our cybersecurity posture but also our evolving relationship with technology, nature, and intelligence itself.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>langchain</category>
      <category>agentaichallenge</category>
    </item>
    <item>
      <title>The Identity Crisis of AI Agents — And Why Kakunin Might Be Early to a Very Big Market</title>
      <dc:creator>Palash Bagchi</dc:creator>
      <pubDate>Wed, 20 May 2026 06:30:40 +0000</pubDate>
      <link>https://dev.to/palash_bagchi_cbdebd259d4/the-identity-crisis-of-ai-agents-and-why-kakunin-might-be-early-to-a-very-big-market-il6</link>
      <guid>https://dev.to/palash_bagchi_cbdebd259d4/the-identity-crisis-of-ai-agents-and-why-kakunin-might-be-early-to-a-very-big-market-il6</guid>
      <description>&lt;p&gt;The software industry is entering a new architectural paradigm.&lt;/p&gt;

&lt;p&gt;We are moving past static microservices, chatbots, and copilots. Instead, we are building autonomous AI agents—probabilistic systems running inside background workers, executing multi-step workflows, hitting APIs, making financial transactions, and interacting with external services with little to no human intervention.&lt;/p&gt;

&lt;p&gt;This shift introduces a major security and governance problem:&lt;/p&gt;

&lt;p&gt;How do we establish trust, enforce scoped permissions, and cryptographically verify the identity of an autonomous, non-deterministic agent?&lt;/p&gt;

&lt;p&gt;If a human executes an action, we use SSO and IAM policies. If a traditional service executes an action, we use API keys or OAuth Client Credentials.&lt;/p&gt;

&lt;p&gt;But when a self-directing AI agent starts invoking tools dynamically and modifying its reasoning path, it sits in a dangerous gap. It is neither a static service account nor an accountable human.&lt;/p&gt;

&lt;p&gt;This article provides a technical and strategic analysis of Kakunin AI—a startup attempting to solve this by building a machine identity and compliance infrastructure layer (“&lt;a href="https://www.kakunin.ai/" rel="noopener noreferrer"&gt;KYC for AI Agents&lt;/a&gt;”) using Public Key Infrastructure (PKI). We will explore their architecture, the technical challenges of runtime governance, and what a developer implementation looks like in practice.&lt;/p&gt;

&lt;p&gt;The Core Architectural Asymmetry&lt;br&gt;
In any secure enterprise system, actors must be authenticated and authorized. However, there is a massive difference between traditional deterministic systems and modern agentic architectures:&lt;/p&gt;

&lt;p&gt;┌──────────────────────────────────────────────┐&lt;br&gt;
│        DETERMINISTIC MACHINE CLIENT          │&lt;br&gt;
├──────────────────────────────────────────────┤&lt;br&gt;
│ Input (X) ──► [Static Rules] ──► API Call (Y)│&lt;br&gt;
│ Identity: Static API Key / Client Secret     │&lt;br&gt;
│ Audit: HTTP Logs (Static &amp;amp; Predictable)      │&lt;br&gt;
└──────────────────────────────────────────────┘&lt;/p&gt;

&lt;p&gt;┌──────────────────────────────────────────────┐&lt;br&gt;
│        NON-DETERMINISTIC AI AGENT            │&lt;br&gt;
├──────────────────────────────────────────────┤&lt;br&gt;
│ Prompt (X) ──► [Neural Weights] ──► Tool? ──┐│&lt;br&gt;
│                                              ││&lt;br&gt;
│ Input (Z) ◄── [Tool Invocation] ◄────────────┘│&lt;br&gt;
│ Identity: ??? (Shared API key / Anonymous)   │&lt;br&gt;
│ Audit: Complex Chain-of-Thought logs         │&lt;br&gt;
└──────────────────────────────────────────────┘&lt;br&gt;
Traditional API keys and IAM scopes are designed for deterministic paths. If you grant an LLM agent an API key to access your internal database, the LLM has full access to that key’s scopes. If a prompt injection occurs, the agent can be manipulated into executing arbitrary database queries, leading to privilege escalation.&lt;/p&gt;

&lt;p&gt;Kakunin AI’s Solution: Cryptographic Agent Identity (X.509 PKI)&lt;br&gt;
To address this, Kakunin AI proposes extending standard Public Key Infrastructure (PKI) primitives directly to model instances. Instead of authenticating via static API keys, each agent is issued a unique X.509 digital certificate backed by a Hardware Security Module (HSM) or cloud Key Management Service (KMS) like AWS KMS or HashiCorp Vault.&lt;/p&gt;

&lt;p&gt;Biding Identity to Model Provenance&lt;br&gt;
A key innovation in Kakunin’s architecture is binding the certificate directly to the cryptographic hash of the running model’s weights and system prompt.&lt;/p&gt;

&lt;p&gt;If a developer alters the model weights, changes the temperature, or updates the system prompt, the running environment’s model hash changes. This instantly invalidates the certificate, preventing the agent from executing transactions until it is re-credentialed.&lt;/p&gt;

&lt;p&gt;Mock Agent Certificate Metadata (JSON Representation)&lt;br&gt;
Here is an example of what the metadata bound to an agent’s cryptographic identity looks like inside the Kakunin gateway:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "certificate_id": "cert_agent_sha256_8f39b1a2",&lt;br&gt;
  "issuer": "CN=Kakunin Internal Agent CA, O=Enterprise Inc",&lt;br&gt;
  "subject": {&lt;br&gt;
    "agent_name": "ExecutionAgent-ETH-01",&lt;br&gt;
    "environment": "production-eu-west-1",&lt;br&gt;
    "owner_email": "&lt;a href="mailto:compliance-officer@enterprise.io"&gt;compliance-officer@enterprise.io&lt;/a&gt;"&lt;br&gt;
  },&lt;br&gt;
  "validity": {&lt;br&gt;
    "not_before": "2026-05-20T00:00:00Z",&lt;br&gt;
    "not_after": "2026-06-20T00:00:00Z"&lt;br&gt;
  },&lt;br&gt;
  "extensions": {&lt;br&gt;
    "model_provenance": {&lt;br&gt;
      "model_type": "Claude-3.5-Sonnet-v2",&lt;br&gt;
      "model_weights_sha256": "8f39b1a2cf93e8201a756b1f2304918e7e1f4094a9a01f92e8c21a4f028bde44",&lt;br&gt;
      "system_prompt_sha256": "4e1fa0c31ab456de90123f112ab8e89cf12a023b1ab4c089ee21ff34e098df12"&lt;br&gt;
    },&lt;br&gt;
    "authorized_scopes": [&lt;br&gt;
      "query_anonymized_order_book",&lt;br&gt;
      "submit_limit_order"&lt;br&gt;
    ]&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
The Zero-Trust Runtime Flow&lt;br&gt;
When an agent needs to execute an action (e.g., submit a limit order to a matching engine), the request goes through an API Gateway acting as a Kakunin Runtime Enforcement Point:&lt;/p&gt;

&lt;p&gt;CEA (Agent)             Gateway (PEP)             Kakunin OCSP (CA)&lt;br&gt;
     │                         │                           │&lt;br&gt;
     │── 1. Signed Request ───►│                           │&lt;br&gt;
     │   (Cert + payload sig)  │                           │&lt;br&gt;
     │                         │── 2. Validate Cert ──────►│&lt;br&gt;
     │                         │◄── 3. OCSP Valid &amp;amp; Match ─│&lt;br&gt;
     │                         │                           │&lt;br&gt;
     │                         │── 4. Verify Payload Sig ──│&lt;br&gt;
     │                         │── 5. Check Scopes ────────│&lt;br&gt;
     │◄── 6. Order Confirmed ──│                           │&lt;br&gt;
Initiate Request: The agent signs the payload (e.g., order params + timestamp) using its KMS-backed private key and forwards it alongside its X.509 certificate.&lt;/p&gt;

&lt;p&gt;Certificate Validation: The Gateway intercepts the request, runs an Online Certificate Status Protocol (OCSP) query to check revocation status, and verifies that the certificate’s cryptographic signature matches the CA trust chain.&lt;/p&gt;

&lt;p&gt;Model Provance Check: The Gateway verifies that the running agent’s current model weights and system prompt match the hashes embedded in the certificate.&lt;/p&gt;

&lt;p&gt;Scope Verification: The Gateway ensures the requested API endpoint matches the authorized_scopes defined in the certificate metadata.&lt;/p&gt;

&lt;p&gt;Code Example: Validating Agent Signatures &amp;amp; Model Provenance&lt;br&gt;
Here is a Python code blueprint showing how an API Gateway / Enforcement Point can validate an incoming agent request, including verification of its cryptographic signature and model weight provenance:&lt;/p&gt;

&lt;p&gt;import hashlib&lt;br&gt;
from cryptography import x509&lt;br&gt;
from cryptography.hazmat.primitives.asymmetric import padding&lt;br&gt;
from cryptography.hazmat.primitives import hashes&lt;br&gt;
from cryptography.exceptions import InvalidSignature&lt;/p&gt;

&lt;h1&gt;
  
  
  Simple database of active, authorized model hashes in production
&lt;/h1&gt;

&lt;p&gt;AUTHORIZED_MODEL_INVENTORY = {&lt;br&gt;
    "8f39b1a2cf93e8201a756b1f2304918e7e1f4094a9a01f92e8c21a4f028bde44"&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;def calculate_local_prompt_hash(system_prompt: str) -&amp;gt; str:&lt;br&gt;
    """Calculates SHA256 of the system prompt to prevent prompt injection updates."""&lt;br&gt;
    return hashlib.sha256(system_prompt.encode('utf-8')).hexdigest()&lt;/p&gt;

&lt;p&gt;def verify_agent_request(&lt;br&gt;
    cert_pem: bytes, &lt;br&gt;
    signature: bytes, &lt;br&gt;
    request_body: bytes,&lt;br&gt;
    running_model_weights_hash: str,&lt;br&gt;
    running_system_prompt: str&lt;br&gt;
) -&amp;gt; dict:&lt;br&gt;
    """&lt;br&gt;
    Validates the agent's signature, matches its X.509 certificate,&lt;br&gt;
    and ensures model weights and system prompt have not drifted.&lt;br&gt;
    """&lt;br&gt;
    # 1. Load the X.509 Certificate&lt;br&gt;
    try:&lt;br&gt;
        cert = x509.load_pem_x509_certificate(cert_pem)&lt;br&gt;
    except Exception as e:&lt;br&gt;
        raise ValueError("Invalid certificate encoding") from e&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 2. Cryptographically verify the request payload signature
public_key = cert.public_key()
try:
    public_key.verify(
        signature,
        request_body,
        padding.PKCS1v15(),
        hashes.SHA256()
    )
except InvalidSignature as e:
    raise ValueError("Cryptographic signature verification failed") from e

# 3. Simulate parsing custom extensions (Model Hashing)
# On Kakunin, these are embedded using Custom OIDs in X509 Extensions
# Here, we extract and compare the expected hashes from the certificate metadata
expected_model_hash = "8f39b1a2cf93e8201a756b1f2304918e7e1f4094a9a01f92e8c21a4f028bde44"
expected_prompt_hash = "4e1fa0c31ab456de90123f112ab8e89cf12a023b1ab4c089ee21ff34e098df12"

# 4. Check model provenance
if running_model_weights_hash not in AUTHORIZED_MODEL_INVENTORY:
    raise ValueError("Model weights are not in the authorized production inventory!")

if running_model_weights_hash != expected_model_hash:
    raise ValueError("Running model weights do not match the certificate's bound model hash!")

current_prompt_hash = calculate_local_prompt_hash(running_system_prompt)
if current_prompt_hash != expected_prompt_hash:
    raise ValueError("System prompt has drifted from the certified configuration!")

# 5. Extract scoped permissions (Simulating reading extensions)
authorized_scopes = ["query_anonymized_order_book", "submit_limit_order"]

return {
    "verified": True,
    "agent": cert.subject.get_attributes_for_oid(x509.NameOID.COMMON_NAME)[0].value,
    "scopes": authorized_scopes
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Technical Challenges &amp;amp; Strategic Skepticism&lt;br&gt;
While the PKI and signature-verification architecture is elegant, Kakunin faces substantial technical challenges that any developer evaluating the platform must consider.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Latency Overhead of Cryptographic Handshakes
Adding an asymmetric verification step (validating X.509 certificates, decrypting signatures, and performing OCSP checks) before executing database queries or API calls adds latency.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For high-frequency trading (HFT) bots or low-latency matching engines, introducing even 10ms of overhead is a non-starter. Kakunin will need to support fast, cryptographically secure caching strategies (e.g., Ephemeral Session Keys or local CRL caching) to survive in performance-critical environments.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Non-Determinism Dilemma of Behavioral Monitoring
Kakunin claims to go beyond static identity and dynamically monitor “behavioral anomalies” at runtime. But defining what constitutes a behavioral anomaly for a generative agent is extremely difficult.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If an LLM agent alters its tool-calling sequence due to a minor variation in context, does that count as drift?&lt;/p&gt;

&lt;p&gt;If the threshold is too tight, developers face false positives that stop production workflows.&lt;/p&gt;

&lt;p&gt;If the threshold is too loose, malicious prompt injections or silent adversarial drifts will slip through.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Trust Bootstrap Cycle
Trust systems depend heavily on network effects. API providers won’t add verification handlers if agents don’t use them, and developers won’t implement certificate-based signing if APIs don’t check them. Kakunin will have to open-source its integration wrappers and lobby standard groups (such as IETF or W3C) to drive widespread adoption.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The Broader Picture: AI as an Institutional Actor&lt;br&gt;
The underlying premise of Kakunin AI is that we are moving toward a future where AI systems are no longer just “scripts”—they are quasi-operational institutional actors.&lt;/p&gt;

&lt;p&gt;Once an agent can transact money, sign contracts, and access APIs, it requires a verified identity, a human officer of record, and an immutable log of its decisions (the “Rhetoric Audit”).&lt;/p&gt;

&lt;p&gt;Whether Kakunin AI survives to define this category depends on how fast the market for autonomous, high-risk agents matures, and how successfully they solve the latency and non-determinism bottlenecks. However, one thing is certain: legacy IAM is not built for the agentic era, and cryptographic machine identity is a logical path forward.&lt;/p&gt;

</description>
      <category>kyc</category>
      <category>ai</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>From Vibe-Coding to Data-Driven: Bringing Observability to AI-Built Software</title>
      <dc:creator>Palash Bagchi</dc:creator>
      <pubDate>Wed, 13 May 2026 05:28:15 +0000</pubDate>
      <link>https://dev.to/palash_bagchi_cbdebd259d4/from-vibe-coding-to-data-driven-bringing-observability-to-ai-built-software-5863</link>
      <guid>https://dev.to/palash_bagchi_cbdebd259d4/from-vibe-coding-to-data-driven-bringing-observability-to-ai-built-software-5863</guid>
      <description>&lt;p&gt;We’ve all been there. You open &lt;strong&gt;Cursor&lt;/strong&gt;, &lt;strong&gt;Claude Code&lt;/strong&gt;, or &lt;strong&gt;Lovable&lt;/strong&gt;, fire off a prompt like &lt;em&gt;"Build me a Stripe integration with a custom dashboard,"&lt;/em&gt; and watch the magic happen. It feels like flying—until it doesn't.&lt;/p&gt;

&lt;p&gt;Eventually, you hit a wall. Why did that last build break the auth flow? How much did that 4,000-token prompt actually cost you? And more importantly: &lt;strong&gt;Are you actually getting better at prompting, or just getting lucky?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we move into the era of "AI-native" development, we’re missing a critical piece of the stack: &lt;strong&gt;Observability.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enter &lt;a href="https://fabbrik.us/" rel="noopener noreferrer"&gt;Fabbrik&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The "Black Box" Problem in AI Dev
&lt;/h2&gt;

&lt;p&gt;Traditional software has Datadog, New Relic, and Sentry. We monitor our APIs, our databases, and our frontend latency. But when the "developer" is an AI model, the "build process" becomes a black box of prompts, hidden costs, and varying code quality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://fabbrik.us/" rel="noopener noreferrer"&gt;Fabbrik&lt;/a&gt; is the first &lt;strong&gt;End-to-End Observability Platform&lt;/strong&gt; designed specifically for software built with AI. It treats your prompts like code and your AI sessions like production logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works: The Blueprint to Build Pipeline
&lt;/h2&gt;

&lt;p&gt;Fabbrik doesn't just watch you code; it helps you structure the entire lifecycle of a SaaS product.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Build-Ready Blueprint
&lt;/h3&gt;

&lt;p&gt;Before you even touch a code editor, Fabbrik generates a complete technical blueprint. We're talking architecture, stack selection (e.g., Node.js + PostgreSQL + React), and implementation guides. It turns a "vague idea" into a "buildable plan."&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Claude Connect: Terminal-Level Tracing
&lt;/h3&gt;

&lt;p&gt;This is the "killer feature" for power users. By dropping a single command into your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sSL&lt;/span&gt; fabbrik.us/install | bash

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fabbrik hooks into your &lt;code&gt;~/.claude&lt;/code&gt; session. It logs every prompt, response, and token cost in real-time. It then &lt;strong&gt;grades every turn&lt;/strong&gt; against Claude's official best practices, giving you a specificity score and tips to improve.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. GitHub Observability
&lt;/h3&gt;

&lt;p&gt;Every push to GitHub is a data point. Fabbrik connects to your repo (read-only!) to track:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prompt-to-Prod Speed:&lt;/strong&gt; How long did it actually take to ship that feature?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Revision Rates:&lt;/strong&gt; Which features required the most "do-overs"?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost per Feature:&lt;/strong&gt; Exactly how much did that dashboard cost in API credits?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Results: Real Data from the Field
&lt;/h2&gt;

&lt;p&gt;According to Fabbrik’s latest v3 data, developers using the platform see some pretty wild efficiency gains:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Direct AI Prompting&lt;/th&gt;
&lt;th&gt;With Fabbrik v3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Avg. Iterations per MVP&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;4–6&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1–2&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Setup Time (New Dev)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3–5 Days&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;4–8 Hours&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost per SaaS Build&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$40–$60&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$15–$25&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prompt Clarity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Baseline&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+35% Improvement&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;"I stopped guessing. After connecting GitHub, I saw that Fabbrik saved me $247 in Q1 alone. Real numbers, not estimates." — &lt;strong&gt;Sarah Chen, Founder at NovaTech&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  But... Is My Code Safe?
&lt;/h2&gt;

&lt;p&gt;As developers, we’re (rightfully) paranoid about security. Fabbrik is built with a &lt;strong&gt;Privacy-First&lt;/strong&gt; philosophy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read-Only Access:&lt;/strong&gt; It cannot write or delete your code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metadata Only:&lt;/strong&gt; It stores commit messages, file paths, and line counts. &lt;strong&gt;It never stores your actual source code.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Training:&lt;/strong&gt; Your data is never used to train models.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Verdict: Why You Should Care
&lt;/h2&gt;

&lt;p&gt;We are moving away from the "wild west" of AI coding. If you want to build professional-grade software with AI, you need professional-grade tools to measure it.&lt;/p&gt;

&lt;p&gt;Whether you’re a solo founder using &lt;strong&gt;Replit&lt;/strong&gt; or a CTO overseeing a team using &lt;strong&gt;Cursor&lt;/strong&gt;, &lt;a href="https://fabbrik.us/" rel="noopener noreferrer"&gt;Fabbrik&lt;/a&gt; gives you the "Report Card" you need to prove your ROI and ship better code, faster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are you ready to see what’s actually happening inside your AI builds?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://fabbrik.us/" rel="noopener noreferrer"&gt;Check out Fabbrik.us&lt;/a&gt;&lt;/strong&gt; and get your first blueprint started today.&lt;/p&gt;

&lt;p&gt;What’s your current AI coding workflow? Are you team Cursor, Claude Code, or something else? Let’s talk in the comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>webdev</category>
      <category>devops</category>
    </item>
    <item>
      <title>What is the best way to build a simple AI chat support for my website, that can use my website, and blog as a KB, and actively assist customers via a chat interface?</title>
      <dc:creator>Palash Bagchi</dc:creator>
      <pubDate>Fri, 08 May 2026 04:36:30 +0000</pubDate>
      <link>https://dev.to/palash_bagchi_cbdebd259d4/what-is-the-best-way-to-build-a-simple-ai-chat-support-for-my-website-that-can-use-my-website-and-19c7</link>
      <guid>https://dev.to/palash_bagchi_cbdebd259d4/what-is-the-best-way-to-build-a-simple-ai-chat-support-for-my-website-that-can-use-my-website-and-19c7</guid>
      <description></description>
    </item>
    <item>
      <title>Beyond the Fact: Rhetoric Audit as the Forensic Cockpit for Cognitive Defense</title>
      <dc:creator>Palash Bagchi</dc:creator>
      <pubDate>Wed, 22 Apr 2026 04:38:43 +0000</pubDate>
      <link>https://dev.to/palash_bagchi_cbdebd259d4/beyond-the-fact-rhetoric-audit-as-the-forensic-cockpit-for-cognitive-defense-p5o</link>
      <guid>https://dev.to/palash_bagchi_cbdebd259d4/beyond-the-fact-rhetoric-audit-as-the-forensic-cockpit-for-cognitive-defense-p5o</guid>
      <description>&lt;p&gt;In the current era of algorithmic echo chambers and high-velocity narrative drift, the danger to our shared reality is no longer just the "fake fact." We have entered the age of &lt;strong&gt;"Deepfakes of the Mind,"&lt;/strong&gt; where the primary threat is not a forged image or a falsified quote, but the very architecture of the stories we consume. Traditional fact-checking tools, while noble, are increasingly inadequate; they audit the surface-level claims while ignoring the underlying DNA of persuasion[cite: 3126, 3133].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.rhetoricaudit.com/" rel="noopener noreferrer"&gt;Rhetoric Audit&lt;/a&gt; (RA)&lt;/strong&gt;—a PhD-level discourse analysis engine designed to move beyond binary "true/false" markers into the realm of &lt;strong&gt;Qualitative Quantification&lt;/strong&gt;. By framing Rhetoric Audit as an &lt;strong&gt;AI safety layer&lt;/strong&gt;, a &lt;strong&gt;prompt auditing system&lt;/strong&gt;, and a &lt;strong&gt;bias detection pipeline&lt;/strong&gt;, developers and researchers can deploy a "Cognitive Firewall" capable of unmasking state-sponsored spin and corporate narrative manipulation in real-time.&lt;/p&gt;

&lt;h2&gt;
  
  
  I. The Logic of Forensic Media Evaluation (Logos)
&lt;/h2&gt;

&lt;p&gt;At the core of Rhetoric Audit lies the &lt;strong&gt;Forensic Media Evaluation (FME) framework&lt;/strong&gt;. Unlike standard sentiment analysis that merely reads "vibe," the FME framework performs a deep-layer deconstruction of text to identify strategic intent and rhetorical DNA.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The 13-Parameter Audit
&lt;/h3&gt;

&lt;p&gt;Rhetoric Audit does not just "read" an article; it performs an autopsy across 13 distinct parameters. This includes measuring &lt;strong&gt;Logical Consistency&lt;/strong&gt;, &lt;strong&gt;Polemic Intensity&lt;/strong&gt;, and &lt;strong&gt;Empirical Proof&lt;/strong&gt;. By breaking a narrative down into its genetic markers, RA allows analysts to see the psychological levers being pulled before they bypass their cognitive filters[cite: 1436, 11068].&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Webb’s Depth of Knowledge (DOK)
&lt;/h3&gt;

&lt;p&gt;To distinguish between surface-level reporting and deep strategic intelligence, RA integrates &lt;strong&gt;Webb’s Depth of Knowledge (DOK)&lt;/strong&gt; levels. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DOK-1 (Recall):&lt;/strong&gt; Basic reporting of "who, what, where"[.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DOK-2 (Apply):&lt;/strong&gt; Summarization and categorization without deep synthesis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DOK-3 (Strategic Thinking):&lt;/strong&gt; The "sweet spot" for intelligence, requiring causal modeling and the defense of positions against counterarguments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DOK-4 (Extended Thinking):&lt;/strong&gt; High-level synthesis that connects disparate domains, such as linking geopolitical shifts to long-term economic trends.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;[cite_start]This hierarchy allows professional analysts—such as &lt;strong&gt;Geopolitical Risk Consultants&lt;/strong&gt; and &lt;strong&gt;OSINT Specialists&lt;/strong&gt;—to prioritize high-rigor content while filtering out low-value "regurgitated" news[cite: 12631, 7226].&lt;/p&gt;

&lt;h2&gt;
  
  
  II. The Pathos of Cognitive Defense (Pathos)
&lt;/h2&gt;

&lt;p&gt;[cite_start]The information environment of 2026 is a battlefield where "credibility is currency"[cite: 3037]. [cite_start]For the individual, the pain point is &lt;strong&gt;"Source Fatigue"&lt;/strong&gt; and the constant anxiety of being manipulated by unseen hands[cite: 6824, 12666]. &lt;/p&gt;

&lt;p&gt;[cite_start]Rhetoric Audit addresses this emotional friction by providing an &lt;strong&gt;"Aha!" moment&lt;/strong&gt; of clarity[cite: 3727, 4644]. [cite_start]It positions itself as the partner for those tired of "guessing" at bias and ready for "knowing" the truth of a structure[cite: 1453, 3600]. [cite_start]The tool’s &lt;strong&gt;Propaganda Index&lt;/strong&gt; and &lt;strong&gt;Pathos Alerts&lt;/strong&gt; flag emotional loading and coordinated hashtag campaigns, protecting users from the "Disproportionate Contagion" of artificial narratives[cite: 4623, 11068].&lt;/p&gt;

&lt;h2&gt;
  
  
  III. The Ethos of PhD-Level Rigor (Ethos)
&lt;/h2&gt;

&lt;p&gt;Credibility is built on transparency and technical accuracy. Rhetoric Audit establishes its &lt;strong&gt;Ethos&lt;/strong&gt; through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[cite_start]&lt;strong&gt;Academic Grounding:&lt;/strong&gt; The tool is built by &lt;strong&gt;Palash Chandra Bagchi&lt;/strong&gt;, bridging the gap between critical theory and high-speed computation with the analytical rigor of a Humanities PhD[cite: 6681, 11077].&lt;/li&gt;
&lt;li&gt;[cite_start]&lt;strong&gt;Technical Benchmarks:&lt;/strong&gt; RA boasts &lt;strong&gt;96.7% accuracy&lt;/strong&gt; on corpus-validated political leanings[cite: 11067].&lt;/li&gt;
&lt;li&gt;[cite_start]&lt;strong&gt;Institutional Triangulation:&lt;/strong&gt; By cross-referencing high-velocity social signals (the "Adversaries") with institutional ground truths like &lt;strong&gt;SEC EDGAR filings&lt;/strong&gt; and &lt;strong&gt;Yahoo Finance&lt;/strong&gt;, RA detects &lt;strong&gt;"Rhetorical Dissonance"&lt;/strong&gt;[cite: 4622, 4735, 4810]. [cite_start]This source hierarchy (SEC: 98/100 weight, Yahoo: 92/100) ensures that boardroom reality is never drowned out by social media noise[cite: 4334, 7796].&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  IV. RA as an AI Safety Layer
&lt;/h2&gt;

&lt;p&gt;In the development of large language models (LLMs), "alignment" is often synonymous with politeness. However, true AI safety requires a layer that can detect when a model—or the data it is trained on—is being used to disseminate coordinated propaganda.&lt;/p&gt;

&lt;p&gt;Rhetoric Audit acts as this safety layer by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[cite_start]&lt;strong&gt;Detecting Coordinated Behavior:&lt;/strong&gt; RA identifies "temporal clustering" (multiple posts appearing within minutes) to unmask bot-driven amplification campaigns[cite: 4599, 4811].&lt;/li&gt;
&lt;li&gt;[cite_start]&lt;strong&gt;Strategic Silence Detection:&lt;/strong&gt; Perhaps its most powerful feature, RA doesn't just audit what is present; it identifies what has been &lt;strong&gt;tactically omitted&lt;/strong&gt; to shape public opinion[cite: 3039, 11069]. [cite_start]Identifying what is missing is the hallmark of professional intelligence work[cite: 7216].&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  V. RA as a Prompt Auditing System
&lt;/h2&gt;

&lt;p&gt;[cite_start]For developers building agentic workflows, Rhetoric Audit serves as a &lt;strong&gt;Universal Normalizer&lt;/strong&gt; and logic auditor[cite: 4628, 4709].&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[cite_start]&lt;strong&gt;The Universal Schema:&lt;/strong&gt; Every signal, whether from X, Reddit, or SEC filings, is reshaped into a strict &lt;strong&gt;NormalizedSignal schema&lt;/strong&gt; before touching the LLM[cite: 4369, 7822]. [cite_start]This prevents "Schema Chaos" and ensures the analysis engine receives clean, high-fidelity data[cite: 4632].&lt;/li&gt;
&lt;li&gt;[cite_start]&lt;strong&gt;Dissonance Gauges:&lt;/strong&gt; The system can be programmed to flag "High Rhetorical Dissonance" when social sentiment (e.g., "Anger" on Reddit) clashes with corporate stability reported in official filings[cite: 4721, 4811].&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  VI. RA as a Bias Detection Pipeline
&lt;/h2&gt;

&lt;p&gt;[cite_start]The RA &lt;strong&gt;Bias Spectrum Mapping&lt;/strong&gt; provides a granular look at the ideological framework of any text, moving from "Far Left" to "Far Right" with precision[cite: 11067]. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[cite_start]&lt;strong&gt;Ideological Coding:&lt;/strong&gt; The pipeline identifies the underlying worldview (e.g., Neoliberalism, Realism) used by an author to filter facts[cite: 3984, 7437].&lt;/li&gt;
&lt;li&gt;[cite_start]&lt;strong&gt;The "Expert vs. Adversary" Polarity:&lt;/strong&gt; By calculating a &lt;strong&gt;"Narrative Asymmetry" score&lt;/strong&gt;, RA determines if the news cycle is ignoring a risk that is already trending in "adversarial" social communities[cite: 4643, 4772].&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion: The Expert in the Room
&lt;/h2&gt;

&lt;p&gt;[cite_start]Rhetoric Audit is not just another browser extension; it is a &lt;strong&gt;Forensic Cockpit&lt;/strong&gt; for the information age[cite: 12706, 7799]. [cite_start]It transforms a "Report" into a "Forensic Presentation," providing the "So what?" that high-stakes decision-makers—from &lt;strong&gt;Portfolio Managers&lt;/strong&gt; to &lt;strong&gt;PR Strategists&lt;/strong&gt;—require to navigate a volatile world[cite: 4047, 4053, 7600]. &lt;/p&gt;

&lt;p&gt;[cite_start]For the developer, RA offers a stable, &lt;strong&gt;provider-agnostic architecture&lt;/strong&gt; (utilizing Supabase, Apify, and RapidAPI) that can out-iterate competitors by focusing on the "logic pathology" of persuasion[cite: 3825, 8705, 8710]. In a world of noise, Rhetoric Audit is the tool for those who refuse to be manipulated. &lt;strong&gt;Stop Reading. [cite_start]Start Auditing.&lt;/strong&gt;[cite: 3127, 6581].&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>api</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
