Posts

Showing posts with the label genAI

RAG / Vector Search on AEM Content

Image
  Building a RAG Chatbot on AEM Content using LangChain + OpenAI Introduction Imagine a chatbot that can answer questions like "What is our return policy?" or "How do I configure the Dispatcher?" — drawing answers directly from your AEM-managed content. This is exactly what Retrieval-Augmented Generation (RAG) enables. RAG combines a vector database (to store and search your content semantically) with an LLM (to generate natural language answers). The result is an AI assistant grounded in your actual AEM content, not hallucinated facts. In this post, we'll build a complete RAG pipeline that ingests AEM content fragments, stores them in a vector database, and serves answers via a chatbot API. Architecture AEM Content Fragments / Pages ↓ AEM Content API (JSON exporter) ↓ Python Ingestion Pipeline (chunking + embedding) ↓ Vector Database (Pinecone / ChromaDB) ↓ Query → Semantic Search → Top-K chunks ↓ ...

AI-Powered Dispatcher & CDN Optimization for AEM

Image
  AI-Powered Dispatcher & CDN Optimization for AEM Introduction AEM's Dispatcher and CDN layer is the frontline of performance and security. Traditionally, caching rules, TTLs, and security filters are all manually configured. But with AI and machine learning entering the infrastructure space, it's now possible to make smarter, dynamic decisions — from predicting cache invalidation patterns to detecting bot traffic and anomalous requests automatically. In this post, we'll cover practical ways to integrate AI/ML into your AEM Dispatcher and CDN stack.           1. AI-Based Anomaly Detection in Access Logs The first and most immediately useful application is analyzing Dispatcher/Apache access logs using AI to detect DDoS patterns, credential stuffing, or scraping bots. Log Parser Script (Python + OpenAI) Instead of manually writing regex rules, feed your access logs to an LLM to identify suspicious patterns: # log_analyzer.py import openai import...

AEM + AI Content Generation Workflows

Image
  AEM + AI Content Generation Workflows: Automate Content at Scale Introduction Content teams using AEM are under constant pressure to produce more content, faster, and in multiple languages. With the rise of LLMs like OpenAI's GPT-4 and Anthropic's Claude, it is now practical to integrate AI content generation directly into AEM workflows — automating first drafts, metadata, translations, and content fragment creation. In this post, we'll build a practical AEM Workflow that calls an external AI API, generates content, and writes it back into AEM Content Fragments. Architecture AEM Workflow Trigger (Page / Asset event) ↓ Custom Workflow Process Step (OSGi) ↓ HTTP Call → OpenAI / Claude API ↓ Parse AI Response ↓ Write to AEM Content Fragment / Page Properties          Step 1: Store Your API Key Securely in AEM Never hardcode API keys. Store them as Cloud Manager environment variables and read them via OSGi config. OS...

Adobe Sensei GenAI & AEM

Image
      ## 1. Smart Tagging in AEM Assets Smart Tags use a machine learning model trained on Adobe's Sensei framework to automatically tag assets uploaded to the DAM. ### How it Works When an asset is uploaded, AEM sends it to the Sensei Smart Tagging service, which returns a set of predicted tags. These are written back to the asset metadata under `dam:suggestedTags`. ### Enable Smart Tags — OSGi Configuration Navigate to: ``` /system/console/configMgr → Adobe CQ DAM Smart Tags Workflow Process ``` Ensure the Smart Tag workflow is linked to the **DAM Update Asset** workflow: ```xml <!-- /apps/your-project/config/com.adobe.cq.dam.smarttagging.impl.SmartTagsManagerImpl.xml --> <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"           xmlns:jcr="http://www.jcp.org/jcr/1.0"     jcr:primaryType="sling:OsgiConfig"     trainedTagsEnabled="{Boolean}true"     a...