<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gurjot Singh on Medium]]></title>
        <description><![CDATA[Stories by Gurjot Singh on Medium]]></description>
        <link>https://medium.com/@gurjot.chadha?source=rss-6afb8622b299------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Lr7F6mqVmyje7pNdroxE1w.jpeg</url>
            <title>Stories by Gurjot Singh on Medium</title>
            <link>https://medium.com/@gurjot.chadha?source=rss-6afb8622b299------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 06:31:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gurjot.chadha/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Generative Engine Optimization (GEO): An Engineering Playbook for AI Visibility]]></title>
            <link>https://medium.com/@gurjot.chadha/generative-engine-optimization-geo-an-engineering-playbook-for-ai-visibility-6c5d542910e8?source=rss-6afb8622b299------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c5d542910e8</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[geo]]></category>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[content-strategy]]></category>
            <dc:creator><![CDATA[Gurjot Singh]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 14:48:21 GMT</pubDate>
            <atom:updated>2026-10-06T14:48:21.496Z</atom:updated>
            <content:encoded><![CDATA[<p><em>What GEO really is, what is proven versus experimental, and how organizations can effectively implement it in regulated industries such as healthcare and banking.</em></p><blockquote>GEO is not a replacement for SEO. It is an operating model for making authoritative content easier to retrieve, interpret and support in AI-generated answers. Protect the SEO foundation, engineer clarity into pages and structured data, and prove trust with evidence and governance.</blockquote><h3>Search is moving from links to answers</h3><p>For two decades, digital visibility meant ranking a page for a keyword. That still matters, but the interface is changing. People now ask long, multi-part questions in AI search and assistant experiences. The system retrieves from many sources, synthesizes one answer, and shows a handful of supporting links.</p><p>The implication for engineering teams: <strong><em>a page has to do more than rank</em></strong><em>.</em> Its purpose, facts, entities, evidence and relationships must be explicit enough for a machine to interpret correctly, down to a single passage. That is the problem<em> </em><strong><em>Generative Engine Optimization (GEO)</em></strong> addresses.</p><h3>What is GEO?</h3><p>GEO is the practice of improving content, technical accessibility, semantic structure, entity clarity and trust signals so that AI discovery and answer systems can find, understand and responsibly use your site’s information. It is not a shortcut for influencing a model. It reduces ambiguity in the information available for retrieval.</p><p>A GEO-ready site should make important information easy to discover, interpret, verify and measure:</p><figure><img alt="GEO ready site markers" src="https://cdn-images-1.medium.com/max/1024/1*lPjOOCr_Vi8cCKD2h7e5Hg.png" /><figcaption>GEO ready site markers</figcaption></figure><h3>How generative discovery works</h3><p>Most AI answer experiences follow four broad stages:</p><ol><li><strong><em>Discover</em></strong><em>:</em> crawlers and search indexes find eligible pages.</li><li><strong><em>Retrieve</em></strong><em>:</em> the engine runs the user’s query and related sub-queries against its index.</li><li><strong><em>Synthesize</em></strong><em>:</em> a model assembles a grounded answer from selected passages.</li><li><strong><em>Cite or refer</em></strong><em>:</em> supporting pages may receive links, mentions or referral traffic.</li></ol><p>Two practical consequences follow: prioritize complete, passage-level answers rather than isolated keywords, and treat crawlability and indexability as prerequisites for retrieval.</p><blockquote>Google’s guidance is consistent with this: optimizing for its generative AI search features continues to rely on established SEO practices; it does not require special AI text files or special schema.</blockquote><h3>GEO vs. SEO: different outcomes, shared foundations</h3><p><strong>Primary outcome</strong></p><ul><li>SEO: visibility in search results and qualified organic traffic.</li><li>GEO: eligibility for retrieval, accurate interpretation, and possible inclusion or citation in generated answers.</li></ul><p><strong>Unit of optimization</strong></p><ul><li>SEO: keywords, pages, links, search intent.</li><li>GEO: passages, questions, facts, entities, evidence, relationships.</li></ul><p><strong>Core requirement</strong></p><ul><li>SEO: crawlable, useful, authoritative pages.</li><li>GEO: the same SEO foundation, plus answer clarity, entity consistency and machine-readable context.</li></ul><p><strong>Typical measures</strong></p><ul><li>SEO: index coverage, rankings, impressions, clicks, conversions.</li><li>GEO: crawler access, retrieval of priority pages, AI referrals, source mentions or citations where measurable, factual accuracy, entity consistency.</li></ul><blockquote>SEO remains essential. GEO broadens the goal from ranking to retrieval quality, factual clarity and supportability.</blockquote><h3>Evidence-led implementation order</h3><p>Use a practical order of operations:</p><p>🟢 <strong>Proven</strong>, prioritize now: foundational SEO, crawlability, indexability, unique and helpful content, semantic HTML structure.</p><p>🔵 <strong>Supported</strong>, scale by context: accurate structured data that matches visible content and clarifies entities.</p><p>🟠 <strong>Contextual</strong>, govern and never manufacture: Wikipedia / Wikidata presence, <em>only where notability and independent sourcing legitimately exist</em>.</p><p>🔴 <strong>Experimental</strong>, optional: llms.txt as a curated map for some tools, with no universal crawler obligation and no Google ranking benefit.Make the site crawlable, indexable and useful.</p><h3>A practical GEO implementation framework</h3><h3>1. Technical discoverability</h3><p>Clean crawl paths, correct status codes, canonical URLs, accurate XML sitemaps, deliberate robots policy and content that renders reliably are the foundation. Avoid blocked resources, soft 404s, login walls and bot mitigation that accidentally blocks the discovery you intend to permit.</p><p><strong><em>robots.txt</em></strong> controls access by user agent. Review search, training and archival crawlers separately. A blanket “block all AI bots” or “allow all AI bots” rule is never the right policy; legal, security and search teams should agree on the decision. <em>Analyze your incoming traffic and pattern, that holds the key.</em></p><p>An illustrative starting point follows. Verify current user-agent names in each vendor’s documentation before using it:</p><pre># Traditional search and AI-search retrieval: allow<br>User-agent: Googlebot<br>Allow: /</pre><pre>User-agent: Bingbot<br>Allow: /</pre><pre>User-agent: OAI-SearchBot<br>Allow: /</pre><pre>User-agent: Claude-SearchBot<br>Allow: /</pre><pre># Model-training crawlers: decide under legal and content policy<br>User-agent: GPTBot<br>Disallow: /</pre><pre>User-agent: ClaudeBot<br>Disallow: /</pre><pre>User-agent: Google-Extended<br>Disallow: /</pre><pre>User-agent: CCBot<br>Disallow: /<br>Sitemap: <a href="https://www.example.com/sitemap.xml">https://www.example.com/sitemap.xml</a></pre><blockquote>Remember that robots.txt is advisory. It does not stop bots that ignore it. Enforcement happens at the CDN or WAF.</blockquote><p><strong><em>XML sitemaps</em></strong> should list canonical, indexable URLs only. Update lastmod only when substantive content changes; inflating it erodes trust in the signal.</p><h3>2. Clear, accessible content structure</h3><p>Make each important page understandable in the initial response or in reliably rendered HTML. Use one descriptive primary heading where appropriate, logical H2 and H3 headings, direct answers near the questions they address, descriptive internal links and breadcrumbs.</p><p>Do not depend on client-side JavaScript to inject the page’s only H1, section headings, key explanatory copy or links. <em>Some AI crawlers and other agents do not execute JavaScript</em>. Google can render JavaScript, but it processes JavaScript pages through crawl, render and index stages rather than seeing every client-rendered element immediately. For high-value content, prefer server-rendered or statically generated HTML, or ensure reliable hydration and meaningful fallback content.</p><p>If headings or other essential text are generated in the browser, verify the final rendered HTML with representative user agents and a rendering tool.</p><h4>Typical enterprise-template findings and fixes:</h4><ul><li><strong>Missing or non-descriptive primary heading:</strong> Provide a clear, page-level &lt;h1&gt; that accurately represents the page’s primary subject and aligns with the page structure.</li><li><strong>Missing meaningful category description:</strong> Add a concise introduction below the primary heading that establishes the category’s purpose, scope, and intended audience.</li><li><strong>“No results found” messages in rendered content:</strong> Avoid exposing empty-state messaging as part of the primary page content when it is not the page’s actual purpose. Render or position it appropriately so content extraction systems/bots do not interpret it as substantive page content.</li><li><strong>Generic or duplicate meta descriptions:</strong> Generate a unique, page-specific &lt;meta name=&quot;description&quot;&gt; that accurately summarizes the page rather than reusing boilerplate content.</li><li><strong>Empty meta tags:</strong> Omit metadata elements when their underlying values are unavailable instead of emitting empty or placeholder tags.</li><li><strong>Generic or duplicate </strong><strong>og:image:</strong> Use a relevant, page-specific Open Graph image that accurately represents the content being shared.</li><li><strong>Inaccurate </strong><strong>og:type:</strong> Set og:type according to the actual semantic type of the page rather than relying on a default value across templates.</li></ul><h3>3. Answer-ready content, not thin FAQ SEO</h3><p>A strong answer block contains:</p><ul><li>The question in the user’s own language.</li><li>A direct, accurate answer.</li><li>An eligibility or audience boundary.</li><li>Evidence and date context.</li><li>Safety or risk qualification where required.</li><li>A link to deeper product, procedure or support content.</li></ul><p>Extend Schema by adding FAQ content when questions are real and answers are visible, maintained, non-duplicative and approved. Do not assume FAQPage markup guarantees a rich result or an AI citation. Treat FAQ as a content-design pattern first and markup second.</p><h3>4. Structured data, entities and governance</h3><p>The rule for Schema.org is simple: <strong><em>accurate, page-aligned and modest.</em></strong> Markup must match visible content. Unsupported properties, hidden claims and generic types are worse than no markup.</p><p>Suggested mapping by page type:</p><ul><li><strong><em>Homepage</em></strong><em>:</em> Organization, plus WebSite. Key relationships: sameAs, contactPoint, parentOrganization, Wikidata.</li><li><strong><em>Product page:</em></strong> Product, linked via @graph and shared @id. Key relationships: brand, manufacturer, audience,attributes .</li><li><strong><em>Product listing or category page:</em></strong> CollectionPage plus ItemList, aligned to visible items.</li><li><strong><em>Blog page:</em></strong><em> </em>BlogPosting, author,publisher,id, about etc.</li><li><strong><em>Breadcrumb navigation:</em></strong> BreadcrumbList, matching visible navigation exactly.</li></ul><pre>{<br>  &quot;@context&quot;: &quot;https://schema.org&quot;,<br>  &quot;@graph&quot;: [<br>    {<br>      &quot;@type&quot;: &quot;Organization&quot;,<br>      &quot;@id&quot;: &quot;https://www.example.com/#organization&quot;,<br>      &quot;name&quot;: &quot;Example Organization&quot;,<br>      &quot;url&quot;: &quot;https://www.example.com&quot;,<br>      &quot;sameAs&quot;: [<br>        &quot;https://www.wikidata.org/wiki/QXXXXXX&quot;,<br>        &quot;https://www.linkedin.com/company/example&quot;<br>      ]<br>    },<br>    {<br>      &quot;@type&quot;: &quot;Person&quot;,<br>      &quot;@id&quot;: &quot;https://www.example.com/authors/jane-smith#author&quot;,<br>      &quot;name&quot;: &quot;Jane Smith&quot;,<br>      &quot;jobTitle&quot;: &quot;Digital Strategy Lead&quot;,<br>      &quot;worksFor&quot;: {<br>        &quot;@id&quot;: &quot;https://www.example.com/#organization&quot;<br>      }<br>    },<br>    {<br>      &quot;@type&quot;: &quot;WebSite&quot;,<br>      &quot;@id&quot;: &quot;https://www.example.com/#website&quot;,<br>      &quot;url&quot;: &quot;https://www.example.com&quot;,<br>      &quot;name&quot;: &quot;Example Website&quot;,<br>      &quot;publisher&quot;: {<br>        &quot;@id&quot;: &quot;https://www.example.com/#organization&quot;<br>      }<br>    },<br>    {<br>      &quot;@type&quot;: &quot;BlogPosting&quot;,<br>      &quot;@id&quot;: &quot;https://www.example.com/insights/geo-best-practices#article&quot;,<br>      &quot;headline&quot;: &quot;Generative Engine Optimization: A Practical Guide&quot;,<br>      &quot;description&quot;: &quot;Best practices to improve content discoverability and comprehension by AI-powered search and answer systems.&quot;,<br>      &quot;author&quot;: {<br>        &quot;@id&quot;: &quot;https://www.example.com/authors/jane-smith#author&quot;<br>      },<br>      &quot;publisher&quot;: {<br>        &quot;@id&quot;: &quot;https://www.example.com/#organization&quot;<br>      },<br>      &quot;mainEntityOfPage&quot;: {<br>        &quot;@id&quot;: &quot;https://www.example.com/insights/geo-best-practices#webpage&quot;<br>      },<br>      &quot;datePublished&quot;: &quot;2026-10-01&quot;,<br>      &quot;dateModified&quot;: &quot;2026-10-01&quot;,<br>      &quot;keywords&quot;: [<br>        &quot;GEO&quot;,<br>        &quot;Generative Engine Optimization&quot;,<br>        &quot;AI Search&quot;,<br>        &quot;Structured Data&quot;,<br>        &quot;Knowledge Graphs&quot;<br>      ]<br>    },<br>    {<br>      &quot;@type&quot;: &quot;WebPage&quot;,<br>      &quot;@id&quot;: &quot;https://www.example.com/insights/geo-best-practices#webpage&quot;,<br>      &quot;url&quot;: &quot;https://www.example.com/insights/geo-best-practices&quot;,<br>      &quot;name&quot;: &quot;Generative Engine Optimization: A Practical Guide&quot;,<br>      &quot;isPartOf&quot;: {<br>        &quot;@id&quot;: &quot;https://www.example.com/#website&quot;<br>      },<br>      &quot;about&quot;: {<br>        &quot;@type&quot;: &quot;Thing&quot;,<br>        &quot;name&quot;: &quot;Generative Engine Optimization&quot;<br>      },<br>      &quot;mainEntity&quot;: {<br>        &quot;@id&quot;: &quot;https://www.example.com/insights/geo-best-practices#article&quot;<br>      },<br>      &quot;breadcrumb&quot;: {<br>        &quot;@id&quot;: &quot;https://www.example.com/insights/geo-best-practices#breadcrumb&quot;<br>      }<br>    },<br>    {<br>      &quot;@type&quot;: &quot;BreadcrumbList&quot;,<br>      &quot;@id&quot;: &quot;https://www.example.com/insights/geo-best-practices#breadcrumb&quot;,<br>      &quot;itemListElement&quot;: [<br>        {<br>          &quot;@type&quot;: &quot;ListItem&quot;,<br>          &quot;position&quot;: 1,<br>          &quot;name&quot;: &quot;Insights&quot;,<br>          &quot;item&quot;: &quot;https://www.example.com/insights&quot;<br>        },<br>        {<br>          &quot;@type&quot;: &quot;ListItem&quot;,<br>          &quot;position&quot;: 2,<br>          &quot;name&quot;: &quot;Generative Engine Optimization&quot;,<br>          &quot;item&quot;: &quot;https://www.example.com/insights/geo-best-practices&quot;<br>        }<br>      ]<br>    }<br>  ]<br>}</pre><p>A healthcare device page can connect the product, manufacturer, intended audience and approved evidence. A banking mortgage page can describe the organization and page while keeping rates, eligibility, fees and disclosures in visible, current copy. Structured data does not replace those details or guarantee a rich result or AI citation.</p><p>Generate JSON-LD from the same governed content fields that render the visible page. Validate it, compare it with the rendered page during testing, and do not add unsupported, hidden or promotional claims.</p><p>Use stable identifiers and consistent names for organizations, products, conditions, procedures, specialties and locations. <strong>Earn consistency; do not manufacture it.</strong></p><ul><li><strong><em>Wikipedia</em></strong><em>:</em> an independent encyclopedia, not controlled brand copy. Correct factual errors through policy-compliant, disclosed participation; do not use it for promotional rewriting.</li><li><strong><em>Wikidata</em></strong><em>:</em> structured identifiers and statements can support entity reconciliation when claims are sourced and policy-compliant.</li><li><strong><em>Clinical, regulatory and standards sources</em></strong><em>:</em> use relevant regulator databases, peer-reviewed research, guidelines and approved instructions for use as evidence targets.</li></ul><p>In regulated industries like finance and healthcare, GEO succeeds or fails on governance. Link claims to approved, current evidence; assign an accountable owner; record publication and review dates; preserve warnings, contraindications, eligibility boundaries and disclosures; and align visible copy, PDFs, schema, regional pages and evidence sources.</p><blockquote>GEO must never simplify away required clinical nuance, disclosures or safety information.</blockquote><h3>5. AI traffic intelligence</h3><p>Maintain access-log and analytics monitoring as a standard operational practice. Review which declared search and AI crawlers request which URLs, whether requests succeed, and whether security controls or rate limits are preventing intended discovery.</p><p>A sample Splunk query to segment declared AI user agents follows. Adapt the fields and user-agent patterns to your environment:</p><pre>index=web sourcetype=access_combined_CDN<br>| eval ai_bot=case(<br>    match(http_user_agent,&quot;(?i)GPTBot|OAI-SearchBot|ChatGPT-User&quot;),&quot;OpenAI&quot;,<br>    match(http_user_agent,&quot;(?i)ClaudeBot|Claude-User|Claude-SearchBot&quot;),&quot;Anthropic&quot;,<br>    match(http_user_agent,&quot;(?i)PerplexityBot|Perplexity-User&quot;),&quot;Perplexity&quot;,<br>    match(http_user_agent,&quot;(?i)Google-Extended|Googlebot&quot;),&quot;Google&quot;,<br>    match(http_user_agent,&quot;(?i)bingbot&quot;),&quot;Microsoft&quot;,<br>    match(http_user_agent,&quot;(?i)Amazonbot&quot;),&quot;Amazon&quot;,<br>    match(http_user_agent,&quot;(?i)Bytespider&quot;),&quot;ByteDance&quot;,<br>    true(),null())<br>| where isnotnull(ai_bot)<br>| stats count AS hits dc(uri_path) AS unique_urls BY ai_bot, status<br>| sort - hits</pre><p>Recommended practice:</p><ul><li>Segment declared crawler traffic by user agent, verified source where available, status code, URL, response time and request rate.</li><li>Investigate abnormal volume, failed responses, repeated paths and access-control events.</li><li>Do not trust a user-agent string alone; combine it with reverse DNS or published IP ranges where available, request-rate analysis and behavioural signals.</li><li>Apply security, rate-limit and access policies according to crawler purpose and organizational policy.</li><li>Re-test important URLs after changes and record the effect on status codes, rendering and access.</li></ul><h3>6. Enterprise GEO tooling</h3><p>GEO should be measured through a combination of first-party telemetry, technical validation, search data and AI-visibility platforms — not through a single GEO score.</p><p>A practical enterprise stack spans five complementary areas:</p><ul><li><strong>Search:</strong> Google Search Console, Bing Webmaster Tools</li><li><strong>Technical:</strong> Screaming Frog, Sitebulb, Lighthouse</li><li><strong>AI visibility:</strong> Adobe Brand Visibility / Semrush</li><li><strong>Analytics:</strong> Adobe Analytics, GA4</li><li><strong>Telemetry:</strong> CDN/WAF logs, Splunk</li></ul><p>Use AI-visibility platforms to monitor priority prompts, mentions, citations, source URLs and competitors. Treat these as <strong>directional signals</strong>, while first-party search, analytics and access-log data remain the stronger evidence.</p><p>The objective is not to maximize a GEO score. It is to verify that important content is <strong>discoverable, interpretable, supportable and measurable</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NsO69jKZ9dRmxepBY219DA.png" /><figcaption>GEO Tooling Process</figcaption></figure><h3>7. Measurement and continuous improvement</h3><p>Measure outcomes, not GEO activity. Group KPIs into four families:</p><ul><li><strong><em>Visibility:</em></strong> source presence or citations for a governed set of priority prompts; AI-feature impressions where platforms report them; third-party AI-visibility tools used as directional indicators.</li><li><strong><em>Discoverability:</em></strong> index coverage, crawler access success rate, canonical health and sitemap freshness.</li><li><strong><em>Understanding</em></strong><em>:</em> valid page-aligned schema, stable entity IDs and completeness of required attributes.</li><li><strong><em>Trust and action:</em></strong> evidence coverage, freshness SLA, factual consistency, qualified referral traffic and downstream engagement, interpreted within privacy, consent and regulatory rules.</li></ul><p>Citation reporting varies by platform. Do not present one metric as the whole picture.</p><h3>Myths to retire</h3><ul><li><em>“</em><strong><em>We need </em></strong>llms.txt<em> </em><strong><em>to be cited.</em></strong><em>”</em> It is an optional experiment, not an access control, ranking factor or universal standard.</li><li><em>“</em><strong><em>FAQ schema guarantees an AI citation.</em></strong><em>”</em> It does not. Write useful, visible and maintained answers first.</li><li><em>“</em><strong><em>We should rewrite everything for AI.</em></strong><em>”</em> Clear, useful and accurate writing beats keyword-style rewriting.</li><li><em>“</em><strong><em>More schema is better.</em></strong><em>”</em> Only accurate, page-aligned schema helps.</li><li><em>“</em><strong><em>Manufacture mentions and Wikipedia entries.</em></strong><em>”</em> Inauthentic mentions are unlikely to help, and policy violations create real risk.</li><li><em>“</em><strong><em>Block or allow all AI bots.</em></strong><em>”</em> Decide per crawler and purpose.</li></ul><h3>Final takeaway</h3><p>The strongest GEO programs are not built on tricks. They combine three disciplines:</p><ul><li><strong><em>Protect the foundation:</em></strong> indexability, canonicalization, performance and internal links remain prerequisites.</li><li><strong><em>Engineer clarity:</em></strong> answer blocks, consistent entities, semantic HTML and page-aligned structured data make content easier to retrieve and interpret.</li><li><strong><em>Prove trust:</em></strong> claims need approved evidence, ownership, review dates and regulatory context.</li></ul><p>In healthcare, that means preserving clinical nuance, safety context and controlled labeling. In banking, it means transparent definitions, eligibility, fees, risks and disclosures. SEO earns discoverability; GEO makes that information easier for AI systems to retrieve, verify and support in an answer.</p><p><em>Disclaimer: Examples are illustrative and do not constitute medical, legal, regulatory or financial advice. Product claims, eligibility criteria and regulated statements must be reviewed against your organization’s approved content and current policy. Crawler user-agent names and platform guidance change often.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c5d542910e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Search to Trusted Answers: Enterprise Lessons from Coveo RGA on AEM]]></title>
            <link>https://medium.com/@gurjot.chadha/from-search-to-trusted-answers-enterprise-lessons-from-coveo-rga-on-aem-a1c980ca2b3f?source=rss-6afb8622b299------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1c980ca2b3f</guid>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[aem]]></category>
            <category><![CDATA[crga]]></category>
            <category><![CDATA[coveo]]></category>
            <category><![CDATA[coveo-search]]></category>
            <dc:creator><![CDATA[Gurjot Singh]]></dc:creator>
            <pubDate>Sun, 05 Jul 2026 12:40:57 GMT</pubDate>
            <atom:updated>2026-07-05T12:59:34.338Z</atom:updated>
            <content:encoded><![CDATA[<h4>Lessons from implementing Coveo Relevance Generative Answering (CRGA) on top of an AEM-authored content ecosystem — and why retrieval engineering, not prompt engineering, decides whether it works</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CDPk_ns6ijEcJOIzSHqMGQ.png" /><figcaption>CRGA</figcaption></figure><p>Search is no longer just about finding a document. Users expect a direct, contextual answer — and Coveo Relevance Generative Answering (CRGA) is Coveo’s answer to that expectation, sitting alongside Smart Snippets as one of two distinct ways Coveo can surface an answer instead of just a ranked list.</p><p>But there’s a wide gap between a CRGA demo and a CRGA production rollout, especially when the content sits behind AEM authoring workflows and the domain is regulated (healthcare, finance, insurance).</p><p>The clearest lesson from implementation:</p><blockquote><em>Enterprise generative search is a retrieval engineering and governance problem. The LLM is the easy part.</em></blockquote><p>This piece covers the architecture, the AEM-specific wrinkles, the governance model, and the operational discipline required to run CRGA in production — not in a sandbox — plus where Smart Snippets fits alongside it.</p><h3>Why CRGA Demos Don’t Survive Contact with Production</h3><p>Demos work because the content is curated, the taxonomy is clean, and governance hasn’t been switched on yet.</p><p>Production AEM environments are the opposite:</p><ul><li>Years of legacy and migrated pages with inconsistent authoring standards</li><li>Multiple content authors tagging the same page type differently</li><li>Overlapping taxonomies from repeated site relaunches</li><li>Multilingual variants with inconsistent metadata parity</li><li>Compliance-sensitive content living next to marketing content in the same repository</li></ul><p>In this environment, the risk isn’t just hallucination. <strong>The risk is CRGA confidently retrieving the wrong content</strong> — an outdated product page, an unrelated article, or content never approved for AI synthesis.</p><p><em>That last one matters most</em> in regulated industries: a query that looks harmless can surface content that turns into a compliance issue the moment it’s synthesized into a generated answer with a confident tone.</p><p>Success with CRGA depends on retrieval precision, metadata hygiene, governance workflows, and monitoring — not just a well-written prompt.</p><h3>The Architecture: Query Pipeline as Orchestration Layer</h3><p>A typical enterprise CRGA flow, from an AEM-sourced content base, moves through nine stages:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ci2ZOJIJrAcxk8X1oVgDCg.png" /><figcaption>CRGA flow</figcaption></figure><p>Two decisions matter more than the rest:</p><p><strong>1. AEM metadata discipline determines Coveo metadata quality.</strong> AEM’s component-based authoring lets the same field — product line, region, content type — get tagged inconsistently across templates and authors, and Coveo’s field mapping only inherits what AEM gives it. Enforcing tagging at the AEM dialog level (mandatory fields, tag pickers instead of free text) fixes this upstream, before it becomes a Coveo problem.</p><p><strong>2. Source eligibility, not prompt instructions, controls what CRGA is allowed to answer from.</strong> Limiting the RGA model to approved sources and page types is a Coveo-side configuration, and it’s the real guardrail — prompt instructions are guidance the LLM can be nudged off of; source eligibility is a hard boundary it can’t retrieve past.</p><h3>Retrieval Is the Core Discipline — Not the Prompt</h3><p>CRGA’s answer generation runs through five stages: lexical retrieval → semantic vector retrieval → chunk-level relevancy scoring → prompt assembly → generation.</p><p>Chunk selection quality is the single biggest lever on citation relevance and hallucination risk — more than any prompt rewrite — and <strong>chunk relevancy thresholds</strong> are the control most teams underuse.</p><blockquote><em>Answer suppression is a feature, not a failure. A low-confidence synthesized answer creates more risk than showing no answer at all.</em></blockquote><p>In practice, tuning thresholds and query pipeline rules moved answer quality further than any prompt iteration did.</p><h3>What Discovery Actually Surfaced</h3><p>A few patterns repeated across implementation:</p><ul><li><strong>Broad terms fail semantically.</strong> Queries like “resources” or “support” lack the specificity CRGA needs, producing diluted citations and low-confidence answers.</li><li><strong>Legacy content surfaces without being relevant.</strong> Old educational pages and archived documentation get retrieved because of overlapping terminology and weak metadata — not because they’re actually the right answer.</li><li><strong>Mixed-keyword queries are where CRGA earns its keep.</strong> A query like “cryoablation resources” fragments badly in pure lexical search but resolves well once the Semantic Encoder is in the loop, because it can match on meaning rather than exact terms.</li><li><strong>Citation quality drives trust more than answer quality.</strong> Users judge a generated answer by where it points. A well-written summary with a weak or unrelated citation loses credibility faster than a mediocre summary with a strong one.</li></ul><h3>Governance: Business, Tech, and Compliance Have Different Jobs</h3><p>Prompts guide behavior. Enforcement comes from configuration. Splitting responsibility clearly avoids the common failure mode of trying to solve a retrieval boundary problem with a prompt instruction.</p><ul><li><strong>Business owns:</strong> approved answer scope, prohibited content categories, prompt behavior sign-off, answer quality review</li><li><strong>Tech (AEM + Coveo) owns:</strong> query pipeline rules, source eligibility filters, chunk thresholds, metadata mapping from AEM to Coveo fields, Answer Manager rule configuration</li><li><strong>Compliance owns:</strong> regulatory boundary validation, review of prohibited-answer categories, sign-off on governance workflow changes</li></ul><p><strong>Enforcing regulated-content boundaries.</strong> For regulated content specifically, categories like diagnosis guidance, treatment recommendations, off-label interpretation, or unsupported clinical claims need to be blocked operationally — through Coveo’s Answer Manager rules and source eligibility, not through a prompt instruction asking the LLM not to answer them. Rules created in the Answer Manager can prevent an answer from generating at all based on query content, which is the actual enforcement layer prompts can’t provide.</p><p><strong>Treating prompt changes like code changes.</strong> Prompt edits should go through the same discipline as code changes, not content edits. A versioned prompt change should follow the same approval and rollback path as a pipeline rule change — proposed change → business/compliance review → staged rollout → feedback monitoring → rollback if suppression rates or negative feedback spike. Skipping this is how a well-intentioned prompt tweak becomes an unreviewed policy change.</p><h3>Hard Guardrails vs. Soft Guidance</h3><p>Enterprise CRGA needs layered controls, and only one of them is a prompt:</p><ul><li><strong>Prompt instructions</strong> (soft) — tone, style, behavioral guidance</li><li><strong>Metadata filters</strong> (hard) — retrieval boundaries</li><li><strong>Query pipelines</strong> (hard) — orchestration and routing</li><li><strong>Chunk relevancy thresholds</strong> (hard) — confidence-based suppression</li><li><strong>Answer Manager rules</strong> (hard) — query-level answer blocking</li><li><strong>Source eligibility</strong> (hard) — which content CRGA can touch at all</li></ul><p>Only the top layer is a prompt — its job is tone and behavior, not enforcement. Everything else is configuration, which is why teams that try to govern CRGA through prompt engineering alone keep hitting the same wall.</p><h3>Operating CRGA, Not Just Deploying It</h3><p>Go-live is the start of an operational responsibility, not the end of a project. The recurring monitoring loop:</p><ul><li>Answer generation vs. suppression rate</li><li>Citation audits (are citations pointing to approved, current content?)</li><li>Feedback analytics (thumbs up/down and comment patterns)</li><li>Search ID-level debugging — tracing a specific query through applied filters, retrieved chunks, and the generated response</li></ul><p>Negative feedback is a governance signal, not just a UX metric — it routinely exposes retrieval gaps or content gaps before anything else does.</p><h3>Metadata: The Dependency Everyone Underrates</h3><p>Semantic retrieval doesn’t hide weak metadata — it amplifies it. Bad metadata produces answers that are confident and wrong, which is worse than answers that are obviously incomplete.</p><p>The highest-leverage fixes, in order of typical impact:</p><ol><li>Enforce structured tagging at the AEM authoring level (dialogs, mandatory fields) rather than fixing it downstream in Coveo</li><li>Normalize language fields across markets</li><li>Standardize page-type taxonomy across templates and site relaunches</li><li>Clean up source configuration so legacy/archived content isn’t silently eligible for retrieval</li></ol><h3>Standard Search, Smart Snippets, and CRGA — the Full Query Path</h3><p>All three experiences share the same starting infrastructure — one query pipeline, one set of security trimming and synonym rules, one ranking layer — before they diverge into three different endings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T2jywR5meibQwQGQWCx5Sg.png" /><figcaption>Standard Search, Smart Snippets &amp; CRGA</figcaption></figure><ul><li><strong>Standard Search:</strong> query received → query pipeline (conditions, filters, security trimming, synonyms, thesaurus, QREs) → ranking layer (ART, usage analytics, Coveo ML ranking, manual boosting) → ranked results → title-and-summary excerpts → user opens a document</li><li><strong>Smart Snippets:</strong> the identical query pipeline and ranking layer feed into a Smart Snippet model that locates the single best-matching passage in the top documents and displays it verbatim, with ranked results still shown below</li><li><strong>CRGA:</strong> the same query pipeline branches into two paths at once — one still produces traditional ranked results, and the other runs stage-1 retrieval (lexical plus Semantic Encoder vector search) → the RGA model’s second-stage chunk retrieval → chunk ranking and relevance validation → governed prompt assembly → LLM generation → a synthesized answer with citations</li></ul><p>Two details are worth calling out explicitly:</p><p><strong>Traditional results and the generated answer are parallel, not sequential.</strong> The ranked results don’t wait for the LLM — both branch off the same query pipeline and run at the same time. Diagramming the traditional results as something that appears <em>after</em> the answer misrepresents the architecture.</p><p><strong>The Semantic Encoder works at the document level, not the chunk level.</strong> It’s what makes stage-1 retrieval semantic instead of purely lexical. Finding the specific passages within those already-retrieved documents is a separate step handled by the RGA model’s own embeddings — what Coveo calls second-stage retrieval.</p><h3>CRGA vs. Smart Snippets</h3><p>These solve different problems and are frequently confused.</p><p><strong>Smart Snippets</strong> return a single, deterministic excerpt already present in indexed content. No synthesis. Best for FAQs, policy answers, and high-compliance, exact-answer scenarios — the answer is exactly what’s in the source, which is precisely why it’s lower risk.</p><p><strong>CRGA</strong> retrieves across multiple chunks and sources and generates a synthesized answer with citations. Best for multi-document discovery, mixed-keyword queries, and product/solution research where no single page has the full answer.</p><p>Side by side:</p><ul><li><strong>Retrieval style</strong> — Smart Snippets: direct excerpt. CRGA: semantic synthesis.</li><li><strong>Determinism</strong> — Smart Snippets: high. CRGA: medium.</li><li><strong>Governance complexity</strong> — Smart Snippets: lower. CRGA: higher.</li><li><strong>Multi-document reasoning</strong> — Smart Snippets: limited. CRGA: strong.</li><li><strong>Ideal for regulated content</strong> — Smart Snippets: strong on its own. CRGA: requires guardrails.</li></ul><p>Most mature implementations run both side by side — Smart Snippets for the stable, high-compliance answers, CRGA for the open-ended discovery queries.</p><h3>A Three-Phase Operating Model</h3><p><strong>Phase 1 — Controlled MVP:</strong> Approved content only, narrow answer scope, governance-first rollout, initial threshold tuning.</p><p><strong>Phase 2 — Governed Expansion:</strong> Prompt versioning discipline, Answer Manager rule workflows, compliance review cadence, feedback monitoring at scale.</p><p><strong>Phase 3 — Enterprise AI Operations:</strong> Continuous chunk analytics, recurring citation audits, quarterly prompt and metadata governance reviews.</p><p>CRGA isn’t a project you finish. It’s a capability you operate.</p><h3>The Real Takeaway</h3><p>The LLM is the least differentiated part of a CRGA implementation — every vendor is working with comparable foundation models. What actually separates a trustworthy rollout from a risky one is:</p><ul><li>How disciplined your AEM metadata and tagging enforcement is</li><li>How tightly your source eligibility and chunk thresholds are configured</li><li>How clearly governance responsibility is split across business, tech, and compliance</li><li>How seriously prompt changes are versioned and reviewed rather than edited ad hoc</li></ul><p>Get the retrieval and governance right, and the generative layer mostly takes care of itself.</p><p><em>Written from hands-on implementation work spanning AEM content architecture and Coveo CRGA configuration.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1c980ca2b3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring AEM: Engineer to Architect]]></title>
            <link>https://medium.com/@gurjot.chadha/exploring-aem-engineer-to-architect-2906ff32c7ef?source=rss-6afb8622b299------2</link>
            <guid isPermaLink="false">https://medium.com/p/2906ff32c7ef</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <category><![CDATA[aem-architect]]></category>
            <category><![CDATA[fundamentals]]></category>
            <category><![CDATA[aem-sling-models]]></category>
            <dc:creator><![CDATA[Gurjot Singh]]></dc:creator>
            <pubDate>Sat, 11 Apr 2026 12:39:03 GMT</pubDate>
            <atom:updated>2026-04-12T05:45:23.787Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>A practical backend, architecture, and real‑world AEM series.<br>Let’s revisit AEM in 2026 — not just as developers, but as engineers building systems to scale.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*5rIjCM4T-fYgNQHReIiigA.png" /></figure><blockquote>The Goal: Adobe ecosystem should feel like your home turf, not a black box.</blockquote><p>📚 This series is intentionally designed to:</p><ul><li>Move away from blind <em>copy‑paste from AI, and </em>understand <strong>why</strong> something exists, when not to use it, and what it costs.</li><li>Start with foundational concepts and progressively connect them to integration patterns, performance, and the wider Adobe stack (AEP, Target, etc.).</li></ul><h3>Playbook — Backend Internals</h3><blockquote>Sling Models — Beyond @Model Annotation</blockquote><p>We all know@Model tells Sling that a plain class can be adapted from a specific context and used as a model. But do you know <strong><em>how</em> </strong>each attribute shapes your model?</p><pre>//Decompiled @Model Annotation for reference<br>public @interface Model {<br>   Class&lt;?&gt;[] adaptables();<br>   Class&lt;?&gt;[] adapters() default {};<br>   DefaultInjectionStrategy defaultInjectionStrategy() default DefaultInjectionStrategy.REQUIRED;<br>   String condition() default &quot;&quot;;<br>   ValidationStrategy validation() default ValidationStrategy.DISABLED;<br>   String[] resourceType() default {};<br>   boolean cache() default false;<br>}</pre><ul><li>adaptables — defines what the model is created from. <br>- This choice directly controls what you can inject and how cacheable the output is (for example, Resource vs SlingHttpServletRequest)</li></ul><p>💡If your model’s output should only depend on the content node, prefer <strong>Resource</strong>. If it depends on incoming request params or context, use <strong>Request.</strong></p><ul><li>adapters — defines what type this model can adapt to. <br>- It is about defining a <em>Contract</em>.<br>- Multiple adapters let a single model serve different contracts, so the same Resource can adapt to Hero for rendering and Serializable for JSON export.</li></ul><p>💡Always Use Interfaces, not Implementations in adapters. This hides the implementation details and enables loose coupling.</p><pre>adapters = {HeroComponent.class, ComponentExporter.class}</pre><ul><li>defaultInjectionStrategy — Controls how strictly injections are validated.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/04ca1fbddbe608ce8e2ce2cdcca86270/href">https://medium.com/media/04ca1fbddbe608ce8e2ce2cdcca86270/href</a></iframe><p>💡Make the model’s <strong>defaultInjectionStrategy</strong> OPTIONAL and mark only truly critical fields as REQUIRED so they explicitly stand out. This keeps optional author fields from breaking the model, lets you handle them in getters or an isValid() method and avoids adaptTo()returning null.</p><ul><li>Cache — Caches the model instance for the same adaptable. It is only helpful if the model is adapted more than once, such as resource.adaptTo(model) multiple times in a single request.</li></ul><p>Imagine a <strong>Product Listing Page</strong> where search and facet data come from <strong>Coveo</strong> and descriptive content comes from <strong>AEM.</strong> Multiple components require the same combined data — x results found text, seo, pagination, localized intro text etc.</p><ul><li>Instead of each component calling Coveo separately or pushing all aggregation to clientside(causing flicker and complexity), the <strong>first</strong> component triggers the Coveo search in @PostConstruct.</li><li>All subsequent components on that page get the <strong>same cached context</strong>, so the Coveo API is called only once per page request.</li><li>Coveo response can also be cached server‑side (e.g., in an application layer or at the Dispatcher/CDN layer) to reduce repeated API calls and limit over‑utilization from scrapers and bot traffic.</li></ul><pre>@Model(<br>    adaptables = SlingHttpServletRequest.class,<br>    adapters = ListingContext.class,<br>    cache = true<br>)<br>public class CoveoListingContext implements ListingContext {<br><br>    @Self<br>    private SlingHttpServletRequest request;<br>    @OSGiService<br>    private CoveoSearchService coveoSearchService;<br>    <br>    @ValueMapValue<br>    @Via(&quot;resource&quot;)<br>    private String defaultSort;<br><br>    private SearchResult coveoResult;<br><br>    @PostConstruct<br>    protected void init() {<br>        // One expensive call per HTTP request<br>        this.coveoResult = coveoSearchService.search(buildQueryFrom(request, defaultSort));<br>    }<br><br>    @Override<br>    public SearchResult getResult() {<br>        return coveoResult;<br>    }<br><br>    @Override<br>    public int getTotalCount() {<br>        return coveoResult.getTotal();<br>    }<br><br>    @Override<br>    public List&lt;Product&gt; getProducts() {<br>        return coveoResult.getProducts();<br>    }<br>}</pre><p>💡If a project uses parallel rendering (such as a custom async parsys or ParSys configuration), multiple threads can hold a reference to the same cached Resource-adapted model simultaneously.</p><blockquote>Binding Models to the Component Hierarchy</blockquote><p>ResourceType— Binds the model to a <strong>specific component. </strong>Auto-wires model in HTL:</p><pre>data-sly-use.model=&quot;com.project.HeroModel&quot;</pre><p>resourceSuperType -Allows the model to apply to components <strong>inheriting from another component. <br>- </strong>We can <strong>delegate</strong> to the super‑component’s model (via @Via + delegation pattern)to reuse its properties and methods, and only override what you need.</p><blockquote>Critical Sling Model Annotations</blockquote><ul><li>@Self — Injects the current adaptable itself (Resource or Request).</li><li>@OSGiService — Injects an OSGi service. Use it to fetch business data or reuse logic.</li><li>@Via – Changes<strong> </strong>injection source<strong>. </strong>It can silently change data source which is a powerful and dangerous if not monitored.</li><li>@ValueMapValue— Injects property directly from the resource, providing type safety as well.</li><li>@PostConstruct — Executes after all dependencies are injected and the model has been fully initialized.</li><li>@SlingObject — Provided by the Sling Models API and directly injects frequently used objects like Resource, SlingHttpServletRequest, SlingHttpServletResponse.</li></ul><pre>//Find any issues below?<br>@Model(adaptables = SlingHttpServletRequest.class)<br>public class ProductModel {<br>  @Self<br>  private SlingHttpServletRequest request; // &gt;&gt; Is this Required?<br><br>  @ScriptVariable<br>  private Page currentPage;<br><br>  @ValueMapValue<br>  private String title;<br><br>  @OSGiService<br>  private ProductService productService;<br><br>  private String price;<br><br>  @PostConstruct<br>  protected void init() {<br>    this.price = productService.getPrice(title); // &gt;&gt; Service call inside init()<br>    //custom logic<br>  }<br>}<br>-------------------------------------------------------------------<br>@Model(adaptables = SlingHttpServletRequest.class)<br>public class MyModel {<br><br>    @ValueMapValue<br>    @Via(&quot;resource&quot;)                // Reads from the resource&#39;s ValueMap<br>    private String title;<br><br>    @ValueMapValue                  // Reads from request params— probably not what you want<br>    private String otherProp;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVEgkdTo6SbM_DcpFryuxg.png" /><figcaption>Model Life cycle</figcaption></figure><blockquote>OSGi — Understanding What “Dynamic Module System” Actually Means at Runtime</blockquote><p>We all know <strong>Open Service Gateway Initiative</strong> is a dynamic module system that allows you to build applications as loosely coupled, reusable services, <strong>but how?</strong></p><ul><li>You write services instead of tightly coupled classes<strong>.</strong></li><li>These services are:<br>- Managed by the runtime(lifetime, activation or deactivation).<br>- Configurable without code changes.<br>- Injectable into models, servlets, and other services.</li></ul><h4>Let’s check it out</h4><pre>//Configuration Definition<br>@ObjectClassDefinition(name = &quot;Pricing Configuration&quot;)// Define Structure of Configuration. Strongly Typed. Editable via console<br>public @interface PricingConfig {<br>  String apiEndpoint() default &quot;https://pricing.gs.com&quot;;<br><br>  int timeout() default 3000;<br>}<br>//Service Implementation<br>@Component(service = PricingService.class)//registering as OSGi Service. Managed by AEM and Injected elsewhere<br>@Designate(ocd = PricingConfig.class)// &gt;&gt;Binds the configuration to the service.<br>public class PricingServiceImpl implements PricingService {<br>  private String apiEndpoint;<br>  private int timeout;<br><br>  @Activate// Runs when Service starts, conf is updated. Initialize fields.<br>  protected void activate(PricingConfig config) {<br>    this.apiEndpoint = config.apiEndpoint();<br>    this.timeout = config.timeout();<br>  }<br><br>  @Override public String getPrice(String productId) <br>  { <br>    // Example logic using config <br>   return apiEndpoint + &quot; with timeout &quot; + timeout; <br>  } <br>}</pre><p>@Activate fires when the component starts.<br>@Modified fires when its configuration changes at runtime.<br>If we only annotate with @Activate, a configuration change will deactivate and reactivate the entire component — potentially dropping in-flight requests or resetting state.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5af73ef4c6897429c96a0185d847e69/href">https://medium.com/media/b5af73ef4c6897429c96a0185d847e69/href</a></iframe><p>💡Consider Lazy activation for non-critical services and refrain from using static variable in OSGi.</p><blockquote>Runmodes in AEM</blockquote><p>A runmode is a string label associated with the JVM process at startup that tells AEM what role this instance plays. Multiple runmodes can be active simultaneously — AEM merges their OSGi configurations at runtime, with more specific folder combinations taking precedence over broader ones.</p><p>In AEM as a Cloud Service, the core runmodes for instance type (author/publish) and environment (dev/stage/prod) are injected and owned by the platform — you cannot override. Traditional custom runmodes are effectively unsupported beyond these two dimensions. Instead, you express brand, region, or feature variance through OSGi $[env:VAR] placeholders resolved via Cloud Manager environment variables, secrets, or context-aware configurations (/conf-based CAConfig) that resolve against the content path rather than the instance identity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*TIGbcsDI-eEZaGbK-7878Q.png" /><figcaption>OSGi config resolution</figcaption></figure><p><em>Next in the series:</em> Servlets — resource-type vs path-based, why the choice affects your security surface. AEM versus React components.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2906ff32c7ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ACS Commons MCP for AEM Taxonomy Reporting]]></title>
            <link>https://medium.com/@gurjot.chadha/acs-commons-mcp-for-aem-taxonomy-reporting-a6e3ed5f8ea5?source=rss-6afb8622b299------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6e3ed5f8ea5</guid>
            <category><![CDATA[aem]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[taxonomy]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <category><![CDATA[acs-aem-commons]]></category>
            <dc:creator><![CDATA[Gurjot Singh]]></dc:creator>
            <pubDate>Thu, 05 Mar 2026 20:47:19 GMT</pubDate>
            <atom:updated>2026-03-05T20:47:19.380Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why OOTB Tools Fall Short — and How Custom MCP Saved the Day</em></p><h3>Introduction</h3><p>Enterprise AEM implementations often require complex, long-running content operations that go beyond standard authoring workflows. Organizations need to process large volumes of content, perform bulk operations, and execute custom business logic all while maintaining system stability and providing real-time progress visibility.</p><p>This post walks through a real-world challenge: building a comprehensive Taxonomy Reporting solution in AEM that audits tag usage across sites, Content Fragments (CFs), and DAM assets — including those with custom metadata schemas. Standard tools like Groovy scripts, Java workflows, and OOTB AEM reports couldn’t fully address the requirements. The answer was the AEM Managed Controlled Process (MCP) framework, extended with custom logic.</p><h3>The Business Problem</h3><p>The core need was a reliable audit capability to track tag usage system-wide and assess impacts of changes, specifically answering:</p><ul><li>Where a specific tag is used.</li><li>Most frequently used tags, and those carrying regression risks when changed.</li><li>Filtered reports scoped to specific tags or content paths.</li></ul><blockquote><strong>The critical complication</strong>: assets used a custom metadata schema with multiple tag-type fields beyond the standard cq:tags field. This meant content-fragments and DAM assets had tag data spread across fields like brand, language, and feature — none of which any OOTB tool was aware of.</blockquote><h3>OOB Options: What Was Tried and Why It Failed</h3><p>Before building anything custom, I evaluated every available OOTB and ACS Commons option. Each fell short in a meaningful way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*00EiLa8ikcyZC0WtAJfCYw.png" /><figcaption>ACS AEM Commons</figcaption></figure><p><strong>1. CSV Exporter — Tags to CSV</strong></p><p>A simple utility that fetches all tags in AEM and exports them to CSV. While quick to set up, it only reports on tag definitions — not where tags are actually used across content. It was abandoned immediately as it didn’t address the core use case.</p><p><strong>2. ACS commons — Reports</strong></p><p>This approach used AEM’s built-in reporting infrastructure to generate tag reference CSVs. Two fundamental problems ended it:</p><ul><li>Complex setup required for custom report logic.</li><li>CSV generation timed out — the scan volume was simply too large for a synchronous HTTP request lifecycle.</li></ul><p><strong>3. Why Not Groovy or Workflow?</strong></p><ul><li>Groovy scripts work well for quick ad-hoc queries but have no built-in progress tracking and are prone to timeouts on large datasets.</li><li>Workflows are event-driven by design — not suited for long-running analytical scans on a frequent basis. Providing user input for different use cases were complicated.</li></ul><h3>Enter MCP: Managed Controlled Processes</h3><p>MCP is both a dashboard for performing complex tasks and a rich API for defining these tasks as process definitions. In addition to kicking off new processes, users can monitor running tasks, retrieve information about completed tasks, halt work, and resume interrupted scans — all from a unified interface.</p><blockquote><strong>ACS Commons Tag Report — The Closest Fit</strong></blockquote><blockquote>Among all options evaluated, the ACS Commons MCP Tag Report came closest to meeting the requirements. It covered both content and DAM assets, generated structured output, and completed scans for 1,000+ items within a matter of seconds. For standard implementations relying solely on cq:tags, it works well. However, it hit a hard wall with custom schemas. DAM assets using fields like language, brand, and 10+ additional custom tag-type properties were invisible to the report even with Deeper Search option which queries all nt:base nodes using an SQL2 CONTAINS() expression.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*D7AUn_EH41TPXpgcc3NeTg.png" /><figcaption>Why MCP Was the Right Call?</figcaption></figure><h3>Custom MCP Design</h3><p>The approach was to extend the ACS Commons MCP Tag Report process and augment it with custom traversal logic for the unique schema requirements.</p><h4>Core Design Decisions</h4><h4>1. Schema-Aware Path Traversal</h4><p>Rather than performing a single broad scan, the process customizes its search query based on the user-provided path, applying schema-specific field logic accordingly.</p><h4>2. Selective Property Search</h4><p>Instead of a full-text CONTAINS search across all node properties with Deeper Search option. I tweaked the code to look for specific known Tag fields, then validate and surface the Tags in the report. This improved the accuracy and time.</p><h4>3. Lean Code</h4><p>Unused logic from the ACS Commons base was removed — specifically the reference-count-only fetch and the Status field — keeping the process focused and efficient.</p><p>DIY — Create a quick custom Process</p><ol><li>Create a Definition Factory to register the process.</li><li>Create the Process and add your business logic.</li></ol><pre>package com.self.slingmodels.mcp;<br><br>import com.adobe.acs.commons.mcp.ProcessDefinitionFactory;<br>import org.osgi.service.component.annotations.Component;<br><br>@Component(service = ProcessDefinitionFactory.class)<br>public class TagReportProcessFactory extends ProcessDefinitionFactory&lt;TagReportsProcess&gt; {<br><br>  @Override<br>  public String getName() {<br>    return &quot;Custom Tag Usage Report - GS&quot;;<br>  }<br><br>  @Override<br>  protected TagReportsProcess createProcessDefinitionInstance() {<br>    return new TagReportsProcess();<br>  }<br>}</pre><pre><br>package com.self.slingmodels.mcp;<br><br>import com.adobe.acs.commons.fam.ActionManager;<br>import com.adobe.acs.commons.mcp.ProcessDefinition;<br>import com.adobe.acs.commons.mcp.ProcessInstance;<br>import com.adobe.acs.commons.mcp.form.*;<br>import com.adobe.acs.commons.mcp.model.GenericBlobReport;<br>import com.day.cq.dam.api.Asset;<br><br>import java.util.ArrayList;<br>import java.util.EnumMap;<br>import java.util.Iterator;<br>import java.util.List;<br><br>import lombok.extern.slf4j.Slf4j;<br>import org.apache.commons.lang3.tuple.Pair;<br>import org.apache.sling.api.resource.*;<br><br>@Slf4j<br>public class TagReportsProcess extends ProcessDefinition {<br><br>    @FormField(<br>            name = &quot;Content Root&quot;,<br>            description = &quot;Root path to scan pages/assets&quot;,<br>            component = PathfieldComponent.NodeSelectComponent.class,<br>            required = true,<br>            options = {&quot;default=/content&quot;, &quot;base=/content&quot;})<br>    public String contentRootPath = null;<br><br>    @FormField(<br>            name = &quot;Tag Root&quot;,<br>            description = &quot;Tag library root (e.g. /Tags/)&quot;,<br>            component = PathfieldComponent.NodeSelectComponent.class,<br>            options = {&quot;default=/content/cq:tags&quot;, &quot;base=/content/cq:tags&quot;})<br>    public String tagRootPath = com.day.cq.tagging.TagConstants.TAG_ROOT_PATH;<br><br>    private final transient List&lt;EnumMap&lt;ReportColumns, Object&gt;&gt; reportRows;<br>    private final List&lt;Pair&lt;String, String&gt;&gt; tags;<br>    private final transient GenericBlobReport report;<br><br>    public TagReportsProcess() {<br>        this.report = new GenericBlobReport();<br>        this.reportRows = new ArrayList&lt;&gt;();<br>        this.tags = new ArrayList&lt;&gt;();<br>    }<br><br>    public void buildProcess(ProcessInstance instance, ResourceResolver rr) throws LoginException {<br>        instance<br>                .getInfo()<br>                .setDescription(<br>                        String.format(<br>                                &quot;Custom Tags Report for-[ %s ], referenced from [ %s ]&quot;,<br>                                this.tagRootPath, this.contentRootPath));<br>        instance.defineCriticalAction(&quot;Something fun in custom function.&quot;, rr, this::findAllDeepReferences);<br>//build Report<br>    }<br><br>    /**<br>     * Fetch all references via searching tags in all stated properties<br>     * With additional business<br>     *<br>     * @param manager ActionManager<br>     */<br>    private void findAllDeepReferences(ActionManager manager) throws Exception {<br>        String query =<br>                String.format(<br>                        &quot;SELECT * FROM [dam:Asset] AS asset &quot; + &quot;WHERE ISDESCENDANTNODE(asset, &#39;%s&#39;)&quot;,<br>                        contentRootPath);<br>        manager.withResolver(<br>                resolver -&gt; {<br>                    Iterator&lt;Resource&gt; results = resolver.findResources(query, &quot;JCR-SQL2&quot;);<br>                    while (results.hasNext()) {<br>                        Resource assetResource = results.next();<br>                        Asset asset = assetResource.adaptTo(Asset.class);<br>                        if (asset == null) continue;<br>                        //traverse the asset properties for required fields<br>                    }<br><br>                });<br>    }<br><br>    public enum ReportColumns {<br>        REFERENCE_COUNT,<br>        REFERENCES,<br>        TAG_ID,<br>        TAG_TITLE,<br>        ReportColumns() {}<br>    }<br>}</pre><p>Reference — <a href="https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp/subpages/process-manager.html">MCP — Process Manager</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6e3ed5f8ea5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>