Gemini Intelligence altyapısı ilk aşamada üst seviye cihazlara özel olacak

Gemini Intelligence altyapısı ilk aşamada üst seviye cihazlara özel olacak

Gemini Intelligence altyapısı ilk aşamada üst seviye cihazlara özel olacakDetaylarına buradaki haberimizde yer verdiğimiz Gemini Intelligence altyapısı, ilk aşamada üst seviye cihazlara özel olacak. Bu konuda resmi sitesinde, “Gemini Intelligence özellikleri yalnızca en gelişmiş yeteneklere ve teknik gereksinimlere sahip Android cihazlarda kullanılabilecek” diyen Google, altyapının cihaz üzerinde çalışan Nano AI modellerinden güç alacağını (AI Core ile Nano v3 veya daha yeni bir sürüm gerekiyor), sistemin 12 GB ya da daha fazla RAM’e ihtiyaç duyduğunu ve amiral gemisi seviyesinde bir işlemci gerektirdiğini aktarıyor. Teknik olarak çok sayıda başka gereksinim de taşıyan altyapı, orta seviye Android cihazlara geniş çaplı olarak ancak 2027’nin sonuna doğru açılacak gibi görünüyor. -Nano v3 modelinin kullanılabildiği akıllı telefonlar-

Gemini Intelligence altyapısı ilk aşamada üst seviye cihazlara özel olacak yazısı ilk olarak Teknoloji haberleri – LOG üzerinde yayınlandı.

Event-Driven Ransomware Detection with ONTAP ARP + Datadog

ARP event in Datadog Log Explorer

TL;DR

ONTAP’s Autonomous Ransomware Protection (ARP) detects encryption patterns at the storage layer. When ARP fires, an EMS event is pushed via webhook to API Gateway → Lambda → Datadog. In my validation environment, end-to-end latency was around 30 seconds. This post shows how to wire it up, what the alert looks like, and how to respond.

The Threat Model

Ransomware encrypts files at hundreds or thousands of files per minute. Traditional detection — antivirus signatures, host-based EDR — often catches it after significant damage is done.

What if your storage could detect the encryption pattern before the host-based tools react?

That’s exactly what ONTAP Autonomous Ransomware Protection (ARP) does. It runs ML-based entropy analysis at the storage layer, detecting:

  • Sudden spikes in file entropy (encryption)
  • Mass file extension changes (.docx → .encrypted)
  • Abnormal write patterns inconsistent with normal workload behavior

When ARP detects an attack, it changes the volume state to attack-detected and fires an EMS event. Our job is to get that event to the security team in seconds, not hours.

The Detection Pipeline

In Part 2, we built the audit log pipeline and showed Datadog search queries for file access events. Now we turn those patterns into event-driven security alerting — starting with ONTAP’s most powerful detection signal: Autonomous Ransomware Protection.

ONTAP ARP detects encryption behavior
    │
    ▼ EMS event: arw.volume.state (severity: alert)
ONTAP EMS Webhook (HTTPS POST)
    │
    ▼
API Gateway (REST endpoint)
    │
    ▼
Lambda (EMS handler)
    │
    ▼ normalize → format → ship
Datadog Logs API v2 (source:fsxn-ems)
    │
    ▼
Datadog Monitor → PagerDuty / Slack / Email

End-to-end latency: around 30 seconds in my validation environment (ap-northeast-1). Your latency will vary depending on ONTAP event delivery, API Gateway/Lambda behavior, Datadog ingest latency, and notification routing.

Compare this to the audit log path (Part 2), which depends on rotation interval + scheduler frequency. EMS webhooks are event-driven rather than scheduled, delivering alerts within seconds rather than minutes.

Deploying the EMS Integration

The EMS Lambda is deployed alongside the FPolicy shipping Lambda in a single stack. Note that the FPolicy TCP listener itself remains a separate ECS Fargate-based path (as described in Part 1) because ONTAP FPolicy requires a persistent TCP connection.

aws cloudformation deploy 
  --template-file integrations/datadog/template-ems-fpolicy.yaml 
  --stack-name fsxn-datadog-ems-fpolicy 
  --parameter-overrides 
    DatadogApiKeySecretArn=arn:aws:secretsmanager:ap-northeast-1:123456789012:secret:fsxn-datadog-api-key 
    DatadogSite=ap1.datadoghq.com 
  --capabilities CAPABILITY_NAMED_IAM 
  --region ap-northeast-1

What Gets Created

Resource Purpose
EMS Lambda Receives EMS webhooks, normalizes, ships to Datadog
FPolicy Lambda Receives FPolicy events from SQS, ships to Datadog
API Gateway (from shared EMS webhook stack) HTTPS endpoint for ONTAP EMS webhooks
IAM Roles Least-privilege for each Lambda
CloudWatch Log Groups Execution logs

Webhook Security

For production, do not expose an unauthenticated webhook endpoint. ONTAP EMS webhook destinations support HTTPS and mutual authentication options. Use HTTPS for the API Gateway endpoint, restrict access where possible, and consider validating a shared secret or header in the Lambda handler.

ONTAP EMS Configuration

After deployment, configure ONTAP EMS to forward ARP-related events to the API Gateway endpoint. At minimum, include arw.volume.state and other arw.* events you want to monitor. Refer to the NetApp EMS webhook documentation for destination and filter configuration.

The EMS Lambda Handler

The handler receives an API Gateway proxy event containing the EMS webhook payload:

def lambda_handler(event: dict, context: Any) -> dict:
    """Process EMS webhook from ONTAP via API Gateway."""
    api_key = get_api_key()
    request_id = _get_request_id(event)

    logger.info("EMS handler invoked: requestId=%s", request_id)

    # Extract EMS events from webhook body
    ems_events = _extract_ems_events(event)
    logger.info("Parsed %d EMS event(s)", len(ems_events))

    # Normalize to common schema
    normalized = _normalize_ems_events(ems_events)

    # Format for Datadog
    dd_logs = _format_for_datadog(normalized)

    # Ship to Datadog
    shipped = _ship_to_datadog(dd_logs, api_key)

    return _api_response(200, {
        "message": "EMS events processed",
        "total_events": len(ems_events),
        "shipped": shipped,
    })

EMS Event Normalization

ONTAP EMS events arrive with fields like messageName, severity, node, svmName, parameters. The handler normalizes them:

def _normalize_ems_events(events: list[dict]) -> list[dict]:
    """Normalize raw EMS events to internal schema."""
    normalized = []
    for event in events:
        normalized.append({
            "event_name": event.get("messageName", "unknown"),
            "severity": event.get("severity", "info"),
            "source_node": event.get("node", ""),
            "svm": event.get("svmName", ""),
            "message": event.get("message", json.dumps(event)),
            "parameters": event.get("parameters", {}),
            "timestamp": event.get("time", datetime.now(timezone.utc).isoformat()),
        })
    return normalized

Datadog Formatting (source:fsxn-ems)

def _format_for_datadog(events: list[dict]) -> list[dict]:
    """Format normalized EMS events for Datadog Logs API v2."""
    dd_logs = []
    for event in events:
        dd_logs.append({
            "ddsource": "fsxn-ems",
            "ddtags": f"source:fsxn-ems,service:{DD_SERVICE},env:{DD_ENV}",
            "hostname": event["source_node"],
            "service": DD_SERVICE,
            "message": event["message"],
            "date": event["timestamp"],
            "attributes": {
                "event_name": event["event_name"],
                "severity": event["severity"],
                "source_node": event["source_node"],
                "svm": event["svm"],
                "parameters": event["parameters"],
            },
        })
    return dd_logs

ARP Event Payload (Normalized by Lambda)

ONTAP EMS webhooks deliver event notifications to the API Gateway endpoint. The Lambda’s _extract_ems_events() function parses the incoming API Gateway proxy event body, then _normalize_ems_events() produces the following internal schema:

{
  "event_name": "arw.volume.state",
  "severity": "alert",
  "source_node": "fsxn-node-01",
  "svm": "svm-prod-01",
  "timestamp": "2026-05-17T01:04:22Z",
  "message": "Anti-ransomware: Volume vol_data state changed to attack-detected",
  "parameters": {
    "volume_name": "vol_data",
    "state": "attack-detected"
  }
}

In Datadog, this arrives as:

source:fsxn-ems
host:fsxn-node-01
service:fsxn-ontap
@attributes.event_name:arw.volume.state
@attributes.severity:alert
@attributes.svm:svm-prod-01
@attributes.parameters.volume_name:vol_data
@attributes.parameters.state:attack-detected

ARP event in Datadog Log Explorer

ARP event detail panel

Setting Up the Datadog Monitor

Create a Monitor that triggers on any ARP alert:

Monitor Configuration

Log Explorer search query:

source:fsxn-ems @attributes.event_name:arw.volume.state @attributes.parameters.state:attack-detected

Datadog Monitor API JSON:

{
  "name": "🚨 FSx for ONTAP: Ransomware Detected (ARP)",
  "type": "log alert",
  "query": "logs("source:fsxn-ems @attributes.event_name:arw.volume.state @attributes.parameters.state:attack-detected").index("*").rollup("count").last("5m") > 0",
  "message": "🚨 ONTAP Autonomous Ransomware Protection detected suspicious activity.nn**Volume**: {{attributes.parameters.volume_name}}n**SVM**: {{attributes.svm}}n**Node**: {{host}}n**Time**: {{date}}nn## Recommended Actionsn1. Verify the ARP event in ONTAP and Datadog.n2. Check FPolicy/audit logs for user/client IP correlation.n3. Follow the approved storage incident response runbook for snapshot, access restriction, or recovery actions.nn@pagerduty @slack-security-alerts",
  "options": {
    "thresholds": { "critical": 0 },
    "notify_no_data": false,
    "evaluation_delay": 0
  }
}

What This Monitor Does

  • Triggers on: Any arw.volume.state event with state:attack-detected
  • Threshold: Critical when count > 0 in a 5-minute window
  • Notification: PagerDuty + Slack with volume name, SVM, and response steps
  • No-data handling: Disabled (absence of ARP events is normal)

Adjust template variables ({{attributes.*}}, {{host}}, {{date}}) based on how your Datadog site renders log attributes in monitor notifications. Test with a simulated event before relying on production alerts.

FPolicy: The Complementary Signal

While ARP detects the encryption pattern, FPolicy provides the file-level detail. Together they answer:

Question Source
Is ransomware active? ARP (EMS)
Which files are affected? FPolicy
Who is doing it? FPolicy (user field)
From where? FPolicy (client_ip field)
What operations? FPolicy (operation: create, write, rename, delete)

FPolicy Event in Datadog

source:fsxn-fpolicy
@attributes.operation:create
@attributes.file_path:/vol/data/finance/confidential_report.xlsx
@attributes.user:[email protected]
@attributes.client_ip:10.0.1.55
@attributes.protocol:cifs

FPolicy events in Datadog

Correlation Query

After an ARP alert, investigate with FPolicy data:

source:fsxn-fpolicy @attributes.svm:svm-prod-01 @attributes.operation:(create OR write OR rename)

This shows all file modifications on the affected SVM, helping identify the responsible user and client.

Incident Response Workflow

1. ARP fires → EMS webhook → Datadog alert (around 30 seconds)
     │
2. Responder receives PagerDuty/Slack notification
     │
3. Verify in Datadog and ONTAP:
   - source:fsxn-ems → confirm ARP event details
   - source:fsxn-fpolicy → identify user, IP, affected files
   - ONTAP: security anti-ransomware volume show
     │
4. Correlate and assess:
   - Is this a true positive or legitimate bulk operation?
   - What is the blast radius (volumes, files, users)?
     │
5. Containment (only after verification, per approved runbook):
   - Create snapshot (preserve recovery point)
   - Restrict volume access if confirmed malicious
   - Review ARP suspect list
     │
6. Recovery:
   - Restore from snapshot (pre-attack state)
   - Re-enable access after containment
   - Update audit policies if gaps found

Important: ARP alerts are high-confidence signals, but false positives can occur (e.g., legitimate backup encryption, bulk file operations). Always verify before applying disruptive containment actions such as restricting volume access. Follow your organization’s incident response process.

For a more detailed role-based runbook, see the repository’s ARP Incident Response Guide.

Beyond ARP: Other EMS Use Cases

The same EMS webhook pipeline handles other critical ONTAP events:

EMS Event Severity Use Case
arw.volume.state alert Ransomware detection
wafl.quota.softlimit.exceeded warning Capacity planning
wafl.quota.hardlimit.exceeded error Immediate capacity action
cf.fsm.takeover alert HA failover notification
sms.vol.full error Volume full — data at risk
net.linkDown warning Network connectivity issue

All arrive in Datadog as source:fsxn-ems with the event name in @attributes.event_name, enabling targeted Monitors for each scenario. For the full cross-vendor field mapping (Datadog, Splunk, Elastic, OpenTelemetry), see the Normalized Event Schema.

Validation Results

This integration was validated end-to-end:

Test Result Latency
ARP event → Datadog ✅ Arrived ~30 seconds
Quota exceeded → Datadog ✅ Arrived ~30 seconds
FPolicy file create → Datadog ✅ Arrived (via SQS → Lambda path) ~30 seconds
Lambda error handling ✅ DLQ capture —
API key from Secrets Manager ✅ Cached —

Validation performed in ap-northeast-1 with the deployed fsxn-datadog-ems-fpolicy stack.

Lambda execution logs

Design Considerations for Security Teams

Webhook security: Use HTTPS for EMS webhook delivery. Do not expose an unauthenticated API Gateway endpoint in production. Validate a shared secret, header, or mTLS identity where possible.

Detection latency: EMS webhooks are event-driven. ARP detection itself depends on ONTAP’s ML model — it typically fires within seconds of detecting the pattern, not after a fixed interval. End-to-end latency from ARP detection to Datadog visibility depends on webhook delivery, Lambda processing, and Datadog ingest.

False positives: ARP can trigger on legitimate bulk encryption operations (e.g., backup software encrypting files). Design your response workflow to include a verification step before disruptive actions like restricting volume access.

Coverage: ARP behavior depends on your ONTAP version, volume type, and whether ARP/AI is available. Older NAS FlexVol configurations may start in learning mode before active detection, while newer ONTAP versions (9.16.1+ with ARP/AI) can become active immediately for supported volumes. Always verify security anti-ransomware volume show before relying on alerts.

Audit trail: The EMS event in Datadog serves as the detection timestamp for incident timelines. FPolicy events provide the forensic detail. Together they form a complete audit trail from detection to response.

Cost profile: EMS events are usually low-volume and alert-oriented, while FPolicy can be high-volume depending on policy scope. Treat their Datadog ingest and alerting cost profiles separately.

Try It Yourself

If you want the shortest path to a first successful ARP alert test, see the repository’s minimum quick start.

The following simulated event exercises the Lambda normalization and Datadog shipping path. Your actual ONTAP EMS webhook payload may differ depending on EMS webhook configuration, so validate with a real EMS event before production use.

# Deploy EMS + FPolicy integration
aws cloudformation deploy 
  --template-file integrations/datadog/template-ems-fpolicy.yaml 
  --stack-name fsxn-datadog-ems-fpolicy 
  --parameter-overrides 
    DatadogApiKeySecretArn=<your-secret-arn> 
    DatadogSite=ap1.datadoghq.com 
  --capabilities CAPABILITY_NAMED_IAM

# Create a test event file
cat > arp-test-event.json <<EOF
{
  "body": "{"messageName":"arw.volume.state","severity":"alert","node":"fsxn-node-01","svmName":"svm-prod-01","time":"$(date -u +%Y-%m-%dT%H:%M:%SZ)","message":"Anti-ransomware: Volume vol_data state changed to attack-detected","parameters":{"volume_name":"vol_data","state":"attack-detected"}}",
  "requestContext": {"requestId": "test"}
}
EOF

# Invoke Lambda with the test event
aws lambda invoke 
  --function-name fsxn-datadog-ems-fpolicy-ems 
  --payload file://arp-test-event.json 
  --cli-binary-format raw-in-base64-out 
  --region ap-northeast-1 
  arp-test-output.json

# Check Datadog: source:fsxn-ems @attributes.event_name:arw.volume.state

What’s Next

This completes the Datadog series:

  • Part 1: Architecture and project introduction
  • Part 2: Audit log pipeline implementation
  • Part 3: Event-driven ransomware detection (this post)

Coming up next in the series:

  • Splunk: Replacing EC2 + Universal Forwarder with Lambda + HEC
  • OpenTelemetry: The vendor-neutral escape hatch
  • Grafana Cloud: Loki Push API with label cardinality guidance

Each will follow the same pattern: deploy, validate, document the gotchas.

Have questions about ARP detection or the EMS pipeline? Drop a comment below.

Previous: Part 2 — Shipping FSx for ONTAP Logs to Datadog, The Serverless Way

GitHub: github.com/Yoshiki0705/fsxn-observability-integrations

Shipping FSx for ONTAP Logs to Datadog — The Serverless Way

TL;DR

Deploy a CloudFormation stack, configure ONTAP audit logging, and see structured file access events in Datadog Log Explorer within minutes — no EC2, no NFS mounts, no agents. This post walks through the full implementation: CloudFormation template, Lambda handler code, Datadog field mapping, and operational validation.

What We’re Building

In Part 1, I introduced the architecture: FSx for ONTAP audit volume → S3 Access Point → EventBridge Scheduler → Lambda → Datadog. Now let’s build it.

By the end of this post, you’ll have:

  • A deployed CloudFormation stack with Lambda, Scheduler, DLQ, and alarms
  • ONTAP audit events flowing into Datadog Log Explorer
  • Structured attributes (@attributes.svm, @attributes.user, @attributes.operation, @attributes.path, @attributes.client_ip, @attributes.result) ready for search, filtering, and Datadog facet creation
  • An operational CloudWatch dashboard monitoring pipeline health

Prerequisites

Before deploying, you need:

  1. FSx for ONTAP file system with an SVM configured for audit logging
  2. FSx for ONTAP S3 Access Point attached to the audit volume
  3. Datadog account (free trial works) with an API Key
  4. API Key in Secrets Manager:
aws secretsmanager create-secret 
  --name fsxn-datadog-api-key 
  --secret-string '{"api_key":"<your-dd-api-key>"}' 
  --region ap-northeast-1
  1. ONTAP audit logging enabled:
# Time-based rotation for quick validation
vserver audit create -vserver <svm-name> -destination /audit_log 
  -events file-ops 
  -format evtx 
  -rotate-schedule-minute 0,5,10,15,20,25,30,35,40,45,50,55
vserver audit enable -vserver <svm-name>

For quick validation, use time-based rotation. If you only use -rotate-size, low-volume environments may not produce rotated audit files within the expected validation window. Adjust the -events list based on what you want to audit.

Important: Enabling vserver audit is only one part of file access auditing. Make sure the target SMB folders have SACLs configured, or NFSv4 ACL audit flags are set for NFS workloads. Otherwise, the audit pipeline may be healthy but no file access events will be generated.

For detailed ONTAP-side setup, including audit volume sizing, SACL/NFSv4 ACL examples, and source health checks, see the repository’s ONTAP Audit Setup Guide and Operational Guide.

  1. Verify how audit files appear via S3 API (to set AuditLogPrefix correctly):
aws s3api list-objects-v2 
  --bucket <fsx-s3-access-point-arn-or-alias> 
  --max-keys 10 
  --region ap-northeast-1

Set AuditLogPrefix to match the key prefix you see. If the access point is attached directly to the audit volume root, this may be empty.

Note: /audit_log is the ONTAP namespace path. The S3 object key prefix can differ depending on the access point attachment, so always verify with list-objects-v2.

The CloudFormation Stack

The Datadog integration deploys as a single self-contained stack:

aws cloudformation deploy 
  --template-file integrations/datadog/template.yaml 
  --stack-name fsxn-datadog-integration 
  --parameter-overrides 
    FsxS3AccessPointArn=arn:aws:s3:ap-northeast-1:123456789012:accesspoint/fsxn-audit-ap 
    DatadogApiKeySecretArn=arn:aws:secretsmanager:ap-northeast-1:123456789012:secret:fsxn-datadog-api-key 
    DatadogSite=ap1.datadoghq.com 
    AuditLogPrefix=<prefix-from-list-objects-v2> 
    ScheduleRate="rate(5 minutes)" 
  --capabilities CAPABILITY_NAMED_IAM 
  --region ap-northeast-1

What Gets Created

Resource Purpose
Lambda Function Reads audit logs from S3 AP, parses EVTX/XML, ships to Datadog
EventBridge Scheduler Invokes Lambda every 5 minutes
Scheduler IAM Role Allows Scheduler to invoke Lambda
Lambda Execution Role S3 AP read, Secrets Manager read, CloudWatch Logs, DLQ send permissions
Dead Letter Queue (SQS) Captures failed events for replay
CloudWatch Alarms (3) Errors, throttles, DLQ depth
CloudWatch Dashboard Operational health: errors, duration, invocations, DLQ
CloudWatch Log Group Lambda execution logs (30-day retention)

Key Parameters

Parameter Required Description
FsxS3AccessPointArn ✅ FSx for ONTAP S3 Access Point ARN
DatadogApiKeySecretArn ✅ Secrets Manager ARN for the API key
DatadogSite ❌ Datadog site (default: ap1.datadoghq.com)
ScheduleRate ❌ Processing frequency (default: rate(5 minutes))
AuditLogPrefix ❌ Object key prefix as seen via S3 API. Leave empty if audit files appear at the access point root.
VpcEnabled ❌ Enable VPC config — requires NAT Gateway

The Lambda Handler

The handler follows a straightforward flow:

Scheduled invocation
  → List objects from FSx for ONTAP S3 AP (via S3 ListObjectsV2)
  → Filter by checkpoint (skip already-processed files)
  → For each new file:
      → Read via S3 GetObject
      → Detect format (EVTX magic bytes or XML declaration)
      → Parse into normalized events
      → Format for Datadog Logs API v2
      → Batch (≤5MB, ≤1000 items per request)
      → Ship with exponential backoff (max 3 attempts)
  → Update checkpoint

Datadog API Limits

The Datadog Logs API v2 enforces the following per-request limits (docs):

  • Maximum payload size (uncompressed): 5MB
  • Maximum size for a single log: 1MB (larger logs are truncated, not rejected)
  • Maximum array size: 1000 entries

The shipper batches conservatively below these limits.

Core Shipping Logic

def _ship_to_datadog(logs: list[dict], api_key: str) -> int:
    """Ship normalized logs to Datadog Logs Intake API v2.

    If any batch fails after retries, raise an exception so the Lambda
    invocation is treated as failed and the checkpoint is not advanced.
    """
    shipped = 0
    failed_batches = 0

    for batch in _create_batches(logs):
        if _send_batch(batch, api_key):
            shipped += len(batch)
        else:
            failed_batches += 1

    if failed_batches:
        raise RuntimeError(f"{failed_batches} batch(es) failed after retries")

    return shipped

Checkpoint Semantics

The checkpoint is advanced only after all batches for an audit log file are successfully delivered to Datadog. If any batch fails after retries, the Lambda invocation fails (raises an exception) and the checkpoint is not updated.

This makes the pipeline at-least-once: the same audit file may be retried on the next scheduled invocation, so downstream queries should tolerate duplicate events. For production, consider adding a deterministic event ID derived from the audit file key and event record offset to support deduplication where your observability platform supports it.

Because EventBridge Scheduler invokes Lambda asynchronously, a failed invocation (unhandled exception) triggers Lambda’s built-in retry behavior (up to 2 retries by default). After all retries are exhausted, the event payload is sent to the configured DLQ.

Retry with Exponential Backoff

def _send_batch(batch: list[dict], api_key: str) -> bool:
    """Send a single batch with retry on 429/5xx, up to MAX_RETRIES attempts."""
    for attempt in range(MAX_RETRIES):
        response = http.request(
            "POST",
            DATADOG_LOGS_URL,
            body=json.dumps(batch).encode("utf-8"),
            headers={
                "Content-Type": "application/json",
                "DD-API-KEY": api_key,
            },
        )
        if response.status < 300:
            return True
        if response.status == 429 or response.status >= 500:
            time.sleep(2 ** attempt + random.uniform(0, 1))  # jitter
            continue
        # Client error (4xx) — don't retry
        return False
    return False

The implementation uses exponential backoff with jitter (2^attempt + random) to avoid synchronized retries when multiple Lambda invocations hit vendor-side throttling simultaneously. Note that MAX_RETRIES in the code represents the total number of attempts, not retries after an initial attempt.

API Key Caching

The API key is fetched from Secrets Manager once per Lambda execution context (cold start) and cached in a module-level variable. This avoids per-invocation Secrets Manager calls:

_api_key_cache: str | None = None

def get_api_key() -> str:
    global _api_key_cache
    if _api_key_cache:
        return _api_key_cache
    response = secrets_client.get_secret_value(SecretId=API_KEY_SECRET_ARN)
    secret = json.loads(response["SecretString"])
    _api_key_cache = secret.get("api_key", secret.get("dd_api_key", response["SecretString"]))
    return _api_key_cache

Datadog Field Mapping

Every audit event arrives in Datadog with structured attributes. The Lambda sends these via the Datadog Logs API v2 payload fields (ddsource, hostname, service, message) and custom attributes nested under attributes:

Datadog Log Explorer Payload Field ONTAP Source Example
source ddsource Configured fsxn
service service Configured fsxn-ontap
host hostname SVM name svm-prod-01
@attributes.svm attributes.svm SVMName / Computer svm-prod-01
@attributes.user attributes.user UserName / SubjectUserName [email protected]
@attributes.client_ip attributes.client_ip ClientIP / IpAddress 10.0.1.50
@attributes.operation attributes.operation Operation / ObjectType ReadData
@attributes.path attributes.path ObjectName /vol/data/reports/q4.xlsx
@attributes.result attributes.result Result / Keywords Success
@attributes.event_type attributes.event_type EventID 4663
@attributes._pipeline.processed_at attributes._pipeline.processed_at Lambda timestamp 2026-05-17T01:30:00Z
@attributes._pipeline.source_file attributes._pipeline.source_file S3 object key audit_log/audit_svm_20260517.evtx

Set DatadogSite to your Datadog site, such as datadoghq.com (US1), datadoghq.eu (EU1), or ap1.datadoghq.com (AP1/Tokyo). The site determines the API endpoint.

For the full cross-vendor mapping (Datadog, Splunk, Elastic, OpenTelemetry), see the Normalized Event Schema.

Datadog Search Queries

# All FSx for ONTAP audit events
source:fsxn

# Failed access attempts
source:fsxn @attributes.result:Failure

# Specific user activity
source:fsxn @attributes.user:"[email protected]"

# Delete operations on sensitive paths
source:fsxn @attributes.operation:delete @attributes.path:"/vol/data/confidential/*"

# Pipeline processing metadata
source:fsxn @attributes._pipeline.source_file:*

In Part 3, we’ll turn these queries into Datadog Monitors for ARP ransomware detection and suspicious file activity alerting.

Investigation Query Starters

When investigating an incident, start with these patterns:

Question Search query Then group by
What did this user do? source:fsxn @attributes.user:"[email protected]" @attributes.operation or @attributes.path
Who accessed this file? source:fsxn @attributes.path:"/vol/data/secret.pdf" @attributes.user
Which clients generated failures? source:fsxn @attributes.result:Failure @attributes.client_ip
Where are deletes concentrated? source:fsxn @attributes.operation:delete @attributes.path or a path prefix
What happened on this SVM in the last hour? source:fsxn @attributes.svm:svm-prod-01 @attributes.operation

For high-volume environments, avoid grouping by full file path unless needed. Consider deriving a lower-cardinality field such as a path prefix or data area classification.

Operational Validation

Quick Validation (5–10 minutes)

With a 5-minute audit rotation and 5-minute Scheduler interval, the first events typically appear within a few minutes, but allow up to 10 minutes depending on timing.

Before waiting for logs, generate a test file operation on the audited SMB/NFS share — such as creating and deleting a small test file — to ensure ONTAP produces an audit event.

# 0. Get stack outputs (log group name, DLQ URL, etc.)
aws cloudformation describe-stacks 
  --stack-name fsxn-datadog-integration 
  --query 'Stacks[0].Outputs' 
  --region ap-northeast-1

# 1. Confirm Scheduler is invoking Lambda
aws logs filter-log-events 
  --log-group-name <LambdaLogGroupName from outputs> 
  --start-time $(python3 -c "import time; print(int((time.time()-300)*1000))") 
  --region ap-northeast-1

# 2. Confirm DLQ is empty
aws sqs get-queue-attributes 
  --queue-url <dlq-url> 
  --attribute-names All 
  --query 'Attributes.ApproximateNumberOfMessages'

# 3. Search in Datadog
#    source:fsxn

CloudWatch Dashboard

The stack includes a pre-built dashboard (fsxn-datadog-integration-health) with:

  • Lambda Errors & Throttles
  • Lambda Duration (avg/max)
  • Lambda Invocations
  • DLQ Depth

For production, consider publishing custom metrics such as files processed, events shipped, batch failures, and checkpoint lag to gain deeper pipeline observability beyond Lambda-level metrics.

What to Watch For

Symptom Likely Cause Fix
No logs in Datadog Scheduler not running, or no new audit files Check CloudWatch Logs for Lambda invocations
Logs arrive but fields are empty EVTX/XML parsing issue Check @attributes.event_type — if “unknown”, parser needs tuning
DLQ messages appearing Datadog API rejection Check API key validity, site configuration, timestamp age
Lambda timeout S3 AP access issue (VPC Gateway EP?) Verify NAT Gateway or deploy Lambda outside VPC

Troubleshooting

Old Timestamps May Not Appear in Log Explorer

The Datadog Logs API accepts log events with timestamps up to 18 hours in the past. If your audit files are rotated or processed too late, older events may not appear as expected in Log Explorer.

Fix: Use a time-based ONTAP audit rotation schedule and a Scheduler frequency that keeps processing well within the 18-hour window.

Gzip Compression Issue (AP1 Site)

During E2E validation, gzip-compressed payloads were accepted (HTTP 202) but not indexed on the AP1 site. The ENABLE_GZIP parameter defaults to false for this reason.

S3 Access Point Timeout in VPC

If Lambda is in a VPC with only an S3 Gateway Endpoint, reads from FSx for ONTAP S3 Access Points will timeout. Add NAT Gateway or deploy Lambda outside VPC.

Day-2 Operations

DLQ Replay

This stack uses an SQS queue as the Lambda asynchronous invocation DLQ. Because the DLQ is attached to Lambda (not an SQS source queue), sqs start-message-move-task cannot redrive messages automatically.

For replay, inspect the DLQ message, identify the failed invocation payload, and re-invoke Lambda manually:

# Inspect failed messages
aws sqs receive-message 
  --queue-url <dlq-url> 
  --max-number-of-messages 1 
  --attribute-names All 
  --message-attribute-names All

After fixing the root cause (e.g., expired API key, Datadog site misconfiguration), re-run the scheduled processor:

aws lambda invoke 
  --function-name <lambda-function-name> 
  --cli-binary-format raw-in-base64-out 
  --payload '{}' 
  --region ap-northeast-1 
  replay-output.json

In this pattern, replay usually means re-running the scheduled processor after fixing the root cause. Because the checkpoint is not advanced on failed delivery, the same audit file remains eligible for processing on the next invocation. This does not re-submit the DLQ message itself — it re-runs the processor so files whose checkpoints were not advanced can be picked up again.

For production, consider adding a dedicated replay Lambda that reads DLQ messages, validates the payload, and re-submits failed processing requests in a controlled way.

Checkpoint Reset (Reprocess All Files)

⚠️ Warning: Resetting the checkpoint causes previously processed audit files to be eligible for reprocessing. This can generate duplicate logs in Datadog. Use only for controlled replay or testing.

aws dynamodb delete-item 
  --table-name fsxn-observability-audit-checkpoint 
  --key '{"svm_name": {"S": "svm-prod-01"}, "file_key": {"S": "LATEST"}}'

Teardown

aws cloudformation delete-stack 
  --stack-name fsxn-datadog-integration 
  --region ap-northeast-1

Deleting the stack does not affect ONTAP audit logging or data on the FSx for ONTAP volume.

Cost Estimate

For a typical deployment (1 SVM, 100MB audit logs/day, 5-minute schedule):

Component Monthly Cost
Lambda (288 invocations/day × 5s avg) ~$0.50
EventBridge Scheduler ~$0.01
DynamoDB (checkpoint) ~$0.01
Secrets Manager ~$0.40
CloudWatch Logs (30-day) ~$1.00
NAT Gateway (if VPC) Region-dependent hourly + per-GB
Total (no VPC) ~$2/month
Total (with VPC/NAT) ~$30–50+/month depending on Region

Cost numbers are illustrative. Assume a 5-minute schedule, 5-second average runtime, and 100MB/day of audit logs. NAT Gateway pricing is regional and includes hourly charges plus per-GB data processing charges. Check the AWS Pricing Calculator for your target Region.

Important: Datadog ingest and retention costs are not included in this AWS-side estimate and can become the dominant cost driver for high-volume audit policies, especially when read auditing is enabled.

Evidence retention: This pipeline optimizes search and alerting via normalized events in Datadog. If you need audit evidence retention for compliance, design raw EVTX/XML retention separately on the audit volume or in an archive path.

Cost control: For high-volume environments, consider a tiered strategy: send security-relevant operations such as deletes, permission changes, and failed access to indexed logs; reduce, archive, or exclude noisy read events only if your audit and compliance requirements allow it.

Compare this to an always-on EC2 collector instance, plus EBS, patching labor, and agent licensing.

What’s Next

In Part 3, we’ll add event-driven security alerting:

  • ONTAP Autonomous Ransomware Protection (ARP) detection
  • EMS webhook → API Gateway → Lambda → Datadog
  • Datadog Monitor configuration for instant alerts
  • Incident response workflow

Datadog is the first E2E-verified integration in this pattern library; the same structure will be used for the remaining vendor integrations as they are validated.

Questions about the Datadog integration? Drop a comment below.

Previous: Part 1 — Why Your FSx for ONTAP Audit Logs Deserve Better Than EC2
Next: Part 3 — Event-Driven Ransomware Detection with ONTAP ARP + Datadog

Reducing LLM Hallucinations in 2026: LoRA, F-DPO, and the Math That Actually Works

It is May 2026, and the field has stopped pretending hallucinations are going to disappear.

What has happened instead is more interesting. Researchers have spent the last eighteen months building an entire toolkit — fine-tuning methods, low-rank adaptation techniques, preference optimization frameworks, image-grounded decoders, multi-adapter compositions — designed not to eliminate hallucinations but to bound them. To calibrate models so that when they are uncertain, they say so. To constrain them so that when they answer, the answer is grounded in something verifiable.

This is a different mindset from “fix the model.” It is closer to how engineers approach any probabilistic system: you cannot eliminate error. You measure it, you bound it, you make it visible. The question stops being is the model truthful and becomes is this model’s error rate acceptable for this use case, given these guardrails, against this ground truth.

This article goes through what is actually working — for text, for images, across foundation models, language models, and specialized models. The math, the methods, the benchmarks. What companies have tried in the past, what they are doing now, and what the May 2026 state of the art actually looks like.

How We Got Here: A Short History

The first generation of attempts to reduce hallucinations was essentially “tell the model not to hallucinate.” Prompt engineering. System messages. Chain-of-thought reasoning. Companies wrote elaborate instructions: “If you do not know the answer, say so.” The model would say so — sometimes — and then continue to hallucinate confidently in the next sentence.

The second generation was Retrieval-Augmented Generation, introduced in production around 2023. Connect the model to a knowledge base. Retrieve relevant documents. Ground the response in retrieved context. This worked, and continues to work — but the 2025 Stanford HAI study showed even specialized legal AI tools built on RAG hallucinated more than 17% of the time. RAG reduces hallucination. It does not eliminate it. The retrieval can fail. The retrieved documents can be irrelevant. The model can ignore them.

The third generation, which is where we are now, accepts that hallucinations are structural and attacks them at multiple levels simultaneously: at training time through fine-tuning, at the parameter level through low-rank adaptation, at the preference level through DPO and its variants, at the decoding level through grounded inference, and at the architectural level through multi-adapter composition. These techniques are not alternatives. They compose.

Let me walk through the mathematics.

The Mathematics of the Problem

A language model parameterized by weights θ generates tokens by sampling from a probability distribution:

P(y | x; θ) = ∏ P(y_t | y_<t, x; θ)

Where x is the input prompt, y is the output sequence, and each token y_t is sampled conditioned on the input and the previously generated tokens. The model selects each next token by computing logits over the vocabulary and applying softmax to obtain probabilities, then sampling (or taking the argmax for greedy decoding).

The hallucination problem in this framework is precise: the model has been trained to maximize the likelihood of plausible-sounding text given its training distribution. When the input x is in the distribution it learned from, this works well. When x is out of distribution — or when the answer requires factual recall that the training did not provide — the model still produces high-probability tokens, but those tokens trace a path through the vocabulary that may have no relationship to truth.

The MIT 2025 finding sharpens this: models use more confident language when hallucinating than when stating facts. This is not a bug. It is a property of how probability flows. When the model has high entropy over plausible continuations, it tends to commit to whichever happens to win the sampling — and the language patterns associated with confident assertions (“definitely,” “certainly,” “without a doubt”) are common in the training data of confident assertions, regardless of whether those assertions were correct.

To reduce hallucination, you need to do one of three things mathematically:

  1. Change the distribution the model is sampling from (fine-tuning).
  2. Add an auxiliary signal that down-weights non-factual continuations (preference optimization, grounded decoding).
  3. Detect when the model’s distribution is unreliable and abstain (calibration, refusal training).

The current state-of-the-art combines all three.

Method 1: LoRA — The Surgical Tool

Low-Rank Adaptation, introduced by Hu et al. in 2021, is now the workhorse of fine-tuning at scale.

The mathematics is elegant. Instead of fine-tuning all parameters of a weight matrix W ∈ ℝ^(d×k), LoRA freezes W and learns two small matrices A ∈ ℝ^(r×k) and B ∈ ℝ^(d×r), where r is much smaller than d or k:

W_new = W + ΔW = W + BA

The update ΔW is constrained to be rank r, dramatically reducing the number of trainable parameters. For LLaMa-3.1-70B, full fine-tuning requires approximately 1,120 GB of GPU memory for model states alone. LoRA with rank 16 introduces only 0.29% additional parameters, reducing GPU memory usage to 142 GB while preserving model quality.

Why this matters for hallucination reduction: LoRA lets you fine-tune cheaply on factuality-focused data without rebuilding the entire model. You can train one base model, then attach many small LoRA adapters — each calibrated to a different domain, each grounded in a different curated dataset.

┌─────────────────────────────────────────────────────────┐
│        Base Model (frozen, 70B params)                  │
│                                                         │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐ │
│  │ Medical  │  │  Legal   │  │ Coding   │  │ Customer │ │
│  │  LoRA    │  │  LoRA    │  │  LoRA    │  │   LoRA   │ │
│  │ (140M)   │  │ (140M)   │  │ (140M)   │  │  (140M)  │ │
│  └──────────┘  └──────────┘  └──────────┘  └──────────┘ │
└─────────────────────────────────────────────────────────┘
        ↑              ↑              ↑              ↑
    Grounded in    Grounded in    Grounded in    Grounded in
    medical docs   case law       codebase       help center

PREREQ-Tune, published at ICLR 2025, took this further. It uses a dual-LoRA architecture: one LoRA absorbs synthetic factual knowledge during a pre-training adaptation phase, and is then frozen. A second “skill” LoRA is trained on top to learn the actual task. The knowledge LoRA can be removed or swapped, leaving the skill LoRA generalizable. This disentangles what the model knows from what the model does, which is precisely the architectural separation hallucination research has been trying to achieve.

PREREQ-Tune significantly outperforms existing state-of-the-art hallucination reduction algorithms in improving LLM factuality across both short QA and long-form generation tasks. The framework enables a modular design with plug-and-play knowledge modules that control knowledge access and a skill module that works generically with any knowledge sources.

LoRA ensembles take a different angle. Train multiple LoRA adapters on the same task with different initializations or hyperparameters, then average their predictions. This produces measurably better-calibrated outputs — the ensemble’s confidence more closely matches its actual accuracy. The few-shot baseline is well-calibrated but often wrong; a single fine-tuned LoRA is more accurate but overconfident in its wrong predictions; the LoRA ensemble provides improvements in both accuracy and calibration in terms of Expected Calibration Error.

Method Memory Cost Calibration Hallucination Rate
Full fine-tuning 100% Poor Variable
Single LoRA (r=16) ~0.3% Overconfident Reduced
LoRA Ensemble (M=5) ~1.5% Well-calibrated Significantly reduced
PREREQ-Tune (dual LoRA) ~0.6% Strong State-of-the-art

Method 2: DPO and F-DPO — Preference at the Source

Direct Preference Optimization, introduced by Rafailov et al. in 2023, has largely replaced reinforcement learning from human feedback (RLHF) as the standard alignment method for production models in 2026.

The math of DPO is a clever reformulation. RLHF requires training a reward model on preference data, then using reinforcement learning (typically PPO) to optimize the policy against that reward. This is unstable, expensive, and sensitive to hyperparameters. DPO observes that you can derive an analytical relationship between the optimal policy and the reward function, and then optimize the policy directly against preference pairs without ever training a separate reward model.

The DPO loss for a preference pair (x, y_w, y_l) — where y_w is preferred and y_l is dispreferred — is:

L_DPO = -log σ(β · log[π_θ(y_w|x) / π_ref(y_w|x)] - β · log[π_θ(y_l|x) / π_ref(y_l|x)])

Where π_θ is the model being trained, π_ref is the reference model (typically the SFT-tuned base), σ is the sigmoid function, and β is a temperature parameter controlling how strongly the model diverges from the reference. The loss pushes the model to increase the relative likelihood of preferred responses while staying close to the reference model.

Why this matters for hallucination: standard DPO optimizes for whatever preferences humans express. If humans prefer fluent, confident-sounding responses over uncertain ones — which they do — DPO will train the model to be more fluent and more confident, whether or not its responses are factual. RLHF and DPO can therefore actively increase hallucination if the preference data rewards fluency over truth.

F-DPO, published in January 2026 and updated in April 2026, fixes this with a simple modification.

F-DPO uses binary factuality labels (factual vs. hallucinated). It applies a label-flipping transformation that corrects misordered preference pairs so the chosen response is never less factual than the rejected one. It adds a factuality-aware margin that emphasizes pairs with clear correctness differences, reducing to standard DPO when both responses share the same factuality.

The mathematical addition is a factuality margin term:

L_F-DPO = -log σ(β · [log ratio(y_w) - log ratio(y_l)] + α · m(y_w, y_l))

Where m(y_w, y_l) is the factuality margin — non-zero only when y_w and y_l differ in factuality — and α controls its strength.

The empirical results on Qwen3-8B are striking: F-DPO reduces hallucination rates by 5x — from 0.424 to 0.084 — while improving or preserving helpfulness across all seven evaluated models from 1B to 14B parameters. The method requires no auxiliary reward model, no token-level annotations, and no multi-stage training.

Hallucination Rate Reduction (Qwen3-8B)
═══════════════════════════════════════════════
Base model     ████████████████████████  0.424
Standard DPO   ███████████████████░░░░░  0.378
F-DPO          ████░░░░░░░░░░░░░░░░░░░░  0.084 (5x reduction)
                0         0.2        0.4

Method 3: Vision — When the Ground Truth Is the Image

Vision-Language Models face a specific version of the hallucination problem: object hallucination. The model describes an image but mentions objects that are not in it. This has been a persistent failure mode and is one of the most actively researched areas in 2025-2026.

The cleanest 2025 work is MARINE — Mitigating hallucinAtion via image-gRounded guIdaNcE — published as an ICML 2025 spotlight. The approach is training-free and API-free. MARINE incorporates a pre-trained object grounding vision encoder to extract object-level information from the image, then uses classifier-free guidance during text generation to bias the model toward grounded outputs.

Mathematically, classifier-free guidance modifies the logits during decoding:

logits_guided = logits_unconditional + γ · (logits_grounded - logits_unconditional)

Where γ is the guidance strength. The “grounded” logits are conditioned on the explicit object list extracted by the auxiliary vision encoder. The “unconditional” logits are the model’s natural output. Higher γ pulls the model harder toward what is actually in the image.

MARINE works on multiple LVLM architectures, requires no fine-tuning, requires no API access to large models, and demonstrates significant reduction in object hallucination on POPE, MME, and CHAIR benchmarks. The auxiliary grounding model — typically DETIC or Grounding DINO — provides the ground truth that the LVLM is held against.

CHAIR-DPO takes a complementary approach for fine-tuning. The CHAIR (Caption Hallucination Assessment with Image Relevance) metric measures the fraction of mentioned objects that are not present in the image. CHAIR-DPO uses this metric to construct preference pairs: given two image captions, the one with the lower CHAIR_i score (fewer hallucinated objects) becomes the preferred response. The model is then fine-tuned with DPO on these preference pairs, becoming object-aware in the process.

The newer CoFi-Dec framework, published in January 2026 by researchers at the University of Minnesota and Lenovo, integrates multi-level visual processing: a coarse-to-fine attention pattern that mimics human visual processing, starting with scene-level understanding before focusing on details. This training-free decoding method significantly reduces both factual errors and semantic inconsistencies across challenging benchmarks.

Method Approach Training Required Hallucination Reduction (POPE)
MARINE Inference-time grounding No ~6-9 percentage points
CHAIR-DPO Fine-tuning with preferences Yes (DPO) ~9.8 percentage points
CoFi-Dec Multi-level decoding No Significant on multiple benchmarks
Uncertainty Re-attention Calibrated decoding No 9.8 points (Qwen2.5-VL-7B)

A critical 2024 paper deserves mention: “Does Object Grounding Really Reduce Hallucination?” The authors offer the first systematic analysis of fine-grained object grounding on LVLM hallucination under an evaluation protocol that more realistically captures open-ended generation. Their finding: many earlier “reductions” relied on evaluation protocols using MSCOCO data extensively present in LVLM training. Under stricter evaluation, grounding objectives have little to no effect on object hallucination in open caption generation.

This is the kind of self-correction that mature fields do. The takeaway is not that grounding doesn’t work — it does, but only when evaluated honestly, on data the model has not seen, in tasks that reflect actual deployment conditions.

Method 4: Multi-Adapter Composition

The most architecturally interesting development of the last year is the rise of multi-LoRA systems — frameworks that compose multiple specialized adapters at inference time.

LoraMap, published in 2024 and refined in 2025, creates dedicated reasoning LoRAs trained on fact-checking from different perspectives. Three LoRAs, each fine-tuned on a different reasoning dataset, then mapped to coordinate at inference. The paper shows LoraMap outperforms LoraHub (the previous standard for LoRA composition) with significantly fewer parameters than LoraConcat (which concatenates LoRAs and further fine-tunes them).

AutoRAG-LoRA, published in 2025, takes the integration further. It is a hallucination-aware RAG framework that combines:

  • Automated prompt rewriting
  • Hybrid retrieval (dense + sparse)
  • LoRA-based generation adapters
  • A dual-mode hallucination detection module (classifier-based plus self-reflective)
  • A KL-regularized contrastive feedback correction loop that enables targeted fine-tuning on hallucination outputs

The KL regularization is the mathematically interesting part: it prevents the corrective fine-tuning from drifting the model too far from its original distribution, avoiding overfitting to edge hallucination cases. The model improves on factual alignment over time without degrading on the rest.

LoRAFusion, accepted at EuroSys 2026, focuses on the systems engineering of running multiple LoRAs efficiently — achieving up to 1.96× end-to-end speedup compared to Megatron-LM. This matters because the cost of running many small specialized adapters has historically been the bottleneck. When that cost drops, the practical viability of multi-adapter systems goes up.

The architectural picture that emerges:

                    ┌────────────────────────┐
                    │   User Query           │
                    └───────────┬────────────┘
                                │
                                ▼
                    ┌────────────────────────┐
                    │  Router / Classifier   │
                    │  (which domain?)        │
                    └───────────┬────────────┘
                                │
              ┌─────────────────┼─────────────────┐
              ▼                 ▼                 ▼
        ┌──────────┐      ┌──────────┐      ┌──────────┐
        │   RAG    │      │  LoRA-A  │      │  LoRA-B  │
        │ Retrieval│      │ (domain) │      │ (skill)  │
        └────┬─────┘      └─────┬────┘      └─────┬────┘
             │                  │                  │
             └──────────────────┼──────────────────┘
                                ▼
                    ┌────────────────────────┐
                    │   Base Model (frozen)   │
                    │   + Adapters Composed   │
                    └───────────┬────────────┘
                                │
                                ▼
                    ┌────────────────────────┐
                    │  Hallucination Detector │
                    │  (CLAP / MetaQA / etc.) │
                    └───────────┬────────────┘
                                │
                                ▼
                    ┌────────────────────────┐
                    │  Output (with refusal   │
                    │  if confidence too low) │
                    └────────────────────────┘

This is not the simple “one model, one fine-tune” architecture of 2023. This is a stack — specialized at each layer, calibrated at each transition.

What the Numbers Say

Here is the May 2026 picture, drawn from current benchmarks and published research:

Hallucination Rate by Method (TruthfulQA-style benchmarks)
═══════════════════════════════════════════════════════════
Base LLM (no intervention)        ████████████████████  60-80%
+ Prompt engineering              ███████████████░░░░░  45-65%
+ Standard RAG                    █████████░░░░░░░░░░░  17-35%
+ RAG + DPO alignment             ██████░░░░░░░░░░░░░░  10-20%
+ Full F-DPO + grounded RAG       ███░░░░░░░░░░░░░░░░░  5-12%
+ Multi-adapter + detection layer ██░░░░░░░░░░░░░░░░░░  3-8%
                                  0%      25%     50%

The trajectory is real. The numbers continue to drop. The asymptote — what the lowest achievable hallucination rate actually is — remains unknown, and may be non-zero by architectural necessity. But what was a 60-80% problem in 2023 is now, with proper engineering, a 3-8% problem in production deployments at the state of the art.

Three caveats are important.

First, these numbers are benchmark-dependent. A model that scores well on TruthfulQA can still fail on a specific niche domain it was never tuned for. Domain-specific evaluation matters more than general benchmarks.

Second, calibration matters as much as accuracy. A model that hallucinates 5% of the time and says “I’m not sure” appropriately is far more useful than a model that hallucinates 3% of the time and sounds equally confident in every response. The Expected Calibration Error metric is now widely reported alongside accuracy in serious evaluations.

Third, the cost-quality tradeoff is non-trivial. Full F-DPO plus grounded RAG plus multi-adapter inference is expensive. For many production use cases, the right answer is a careful single LoRA plus a good retrieval system — not the cutting edge of every available method stacked together.

What Companies Are Doing Now

The pattern across industries in 2026:

Healthcare has moved aggressively toward CHAIR-DPO-style grounded fine-tuning for clinical report generation, and toward MARINE-style image-grounded inference for radiology applications. RRG-DPO (Radiology Report Generation with DPO) specifically addresses the false-positive / false-negative tradeoff that classical RLHF struggled with in medical settings.

Legal tech companies have largely abandoned the “general LLM for legal work” approach and moved to retrieval-grounded systems with specialized adapters. The 17% hallucination rate Stanford reported in 2025 was the wakeup call. Modern legal AI products explicitly cite source paragraphs for every claim, abstain when retrieval confidence is below threshold, and run multi-model verification on high-stakes outputs.

Enterprise knowledge bases have converged on RAG + structured retrieval + small specialized adapters for each domain. The base model is rented from a provider (Claude, GPT, Gemini). The differentiation is in the adapter layer and the retrieval system.

Marketing and creative tools use grounded generation: a digital twin of the product (as in INDG/Grip), brand-approved claim libraries, controlled diffusion with depth and segmentation guidance. The AI is constrained to operate within structures defined by the brand team.

Coding assistants have moved to test-grounded generation: the LoRA is fine-tuned on code from the specific codebase, the output is validated against the existing test suite, and the model is calibrated to refuse rather than guess when uncertain.

The common pattern: in every domain, the production answer is not a single technique. It is a stack — a base model plus retrieval plus fine-tuning plus preference alignment plus inference-time guardrails plus structural constraints. Each component reduces hallucination at a different layer. Together they produce systems that are bounded, calibrated, and accountable in ways that single-model deployments never were.

The Honest Bottom Line

The mathematics of probabilistic generation imply that hallucination cannot be reduced to zero by training methods alone. The model is, fundamentally, a function that produces plausible continuations of its input. The plausibility space and the truth space are not the same space and cannot be made the same space by any amount of fine-tuning.

What the methods of 2025-2026 have shown is that the gap between plausibility and truth can be narrowed substantially — through fine-tuning that disentangles knowledge from skill (PREREQ-Tune), through preference learning that rewards factuality over fluency (F-DPO), through inference-time grounding (MARINE, CoFi-Dec), through multi-adapter composition (LoraMap, AutoRAG-LoRA), and through systems engineering that makes all of the above run at acceptable cost (LoRAFusion).

The shift in the industry is from chasing the dream of a truthful model to building the architecture of a truthful system. The model is a component. The system includes retrieval, validation, calibration, and structural constraints. The system has a hallucination budget. The system reports its uncertainty. The system abstains when it cannot answer with sufficient grounding.

This is how every other probabilistic technology has matured. Cars do not have zero accident rates. Networks do not have zero packet loss. Financial systems do not have zero fraud. Each of these is bounded by engineering — measurement, calibration, monitoring, controls — that converts a wild probabilistic process into a predictable production capability.

AI is now passing through the same transition. May 2026 is the moment where the engineering caught up with the ambition. The methods are real. The math is solid. The benchmarks are dropping. The systems are shipping.

The honest version of the next decade in AI is not “we solved hallucination.” It is “we learned how to build systems that bound it well enough to deploy them responsibly in more and more domains.” Which is, in the end, what engineering has always been.

By Soumia, a developer advocate focused on making complex infrastructure legible — through writing, speaking, and helping technical and non-technical audiences find common ground. I work at the intersection of cloud-native systems, AI, and editorial craft. — LinkedIn · Portfolio

Mental Algorithms: How AI Changes the Cost of Thinking

Most people assume the difference between good thinking and bad thinking is intelligence.

It isn’t.

More often, it comes down to cost — how much mental effort it takes to arrive at a useful answer. Some answers require slow, deliberate reasoning. Others emerge almost instantly through pattern recognition or experience.

Human thinking isn’t a single process. It’s a collection of reusable patterns — some fast, some careful, some surprisingly fragile depending on context.

AI doesn’t replace these patterns. It changes what they cost to use.

1. Structured Thinking (Slow, Deliberate Reasoning)

This is the kind of thinking people usually mean when they talk about “deep work” or “careful reasoning”. It prioritises correctness over speed, and it tends to feel effortful.

Decomposition

Large problems rarely stay large once you start breaking them apart. Splitting something into smaller components makes it easier to understand, reason about, and eventually solve. In software, this is the difference between an overwhelming system and a set of manageable modules.

AI is especially good at this first pass. It can outline a system or break down a problem in seconds — something that would normally take a whiteboard session and some back-and-forth.

Abstraction

Abstraction is the act of ignoring detail on purpose. You don’t need to understand everything to use something effectively — just the parts that matter.

Good engineers instinctively group things that change together and separate things that don’t. That decision — what to include and what to ignore — is still very human. AI can assist with structure, but judgment still sits on your side.

Iteration

Most real progress doesn’t happen in one leap. It happens through repeated cycles: try something, observe what breaks, adjust, repeat.

What AI changes here is speed. Iteration cycles that once took hours or days can now happen in minutes. The loop stays the same — it just becomes much cheaper to run.

Hypothesis Testing

Good debugging isn’t guessing randomly. It’s forming small, testable ideas and checking them one at a time.

AI helps by suggesting likely causes or next steps, but the grounding still comes from reality — logs, outputs, behaviour. It can accelerate thinking, but it can’t replace validation.

Systems Thinking

At some point, you stop looking at parts and start looking at interactions. Changing one thing affects others in ways that aren’t always obvious — performance, reliability, consistency.

AI can map dependencies reasonably well, but real systems tend to reveal their complexity only when they’re running under pressure. That’s where intuition still matters.

Edge Cases

Most real bugs don’t come from the “normal path”. They appear at the edges — empty inputs, failed requests, race conditions, unexpected states.

AI can suggest some of these, but domain-specific edge cases usually come from experience rather than inference.

2. Fast Thinking (Heuristics and Shortcuts)

Fast thinking is what gets used most of the time in real life. It’s not careful — it’s efficient. It trades precision for speed.

Heuristics

Rules of thumb like “start simple”, “avoid premature optimisation”, or “readability over cleverness” exist because they work often enough to be useful.

AI tends to generate a default version of these heuristics, which is helpful — but also risky if you accept them without thinking. The baseline gets easier, but that also makes it easier to stop questioning it.

Satisficing

Most decisions aren’t about finding the best option. They’re about finding one that’s good enough to move forward.

AI lowers the threshold for “good enough” dramatically. That changes behaviour: people stop searching earlier because acceptable solutions appear faster.

Anchoring

The first answer you see tends to shape everything that follows.

With AI, that anchor is often the first generated response — fluent, confident, and structured. That makes it especially sticky, even when it’s not optimal.

Availability Bias

We tend to estimate likelihood based on what comes to mind easily.

AI shifts what becomes “easy to recall” toward patterns it has seen most often in its training data. That subtly biases thinking toward common solutions.

Narrative Thinking

Humans like stories. We compress complexity into something linear and understandable.

AI is extremely good at producing narratives, even when reality is messy. That makes explanations clearer — but also sometimes cleaner than reality actually is.

3. Simulation and Future Thinking

Mental Simulation

We constantly run mental “what if” scenarios before acting.

AI expands this space dramatically. Instead of imagining two or three outcomes, you can explore dozens in seconds.

Regret Minimisation

Many decisions are really about avoiding future regret.

When alternatives are easy to generate, comparing outcomes becomes more explicit — and sometimes more overwhelming.

Opportunity Cost

Every decision excludes others, but we don’t usually feel that cost clearly.

AI makes execution cheaper, which ironically makes decision-making more important. When doing is easy, choosing becomes the real bottleneck.

4. The Meta Layer — Thinking About Thinking

The hardest shift isn’t technical. It’s awareness.

It’s knowing when you’re reasoning carefully versus when you’re just following a fluent suggestion that feels like reasoning.

AI blurs that boundary. You can easily feel like you’ve thought something through when you’ve actually just selected from a well-phrased option.

That makes feedback loops more important than ever — checking, testing, and re-evaluating what you assume is true.

Closing Thought

Thinking isn’t a single skill. It’s a set of patterns we switch between constantly, usually without noticing.

Most errors don’t come from lack of intelligence. They come from using the wrong pattern for the situation.

AI doesn’t change that.

It just makes every pattern cheaper — and the switching between them less visible.

Which means the real skill is no longer just thinking well.

It’s noticing what kind of thinking you’re doing while it’s happening.

Why Your FSx for ONTAP Audit Logs Deserve Better Than EC2

TL;DR

FSx for ONTAP file access audit logs are usually consumed through EC2-based patterns — mounted audit volumes and agent-based forwarders such as Splunk Universal Forwarder. This series explores an EC2-free alternative: configure ONTAP to write audit logs to an audit volume, expose that volume through an FSx for ONTAP S3 Access Point, use EventBridge Scheduler to invoke Lambda, and ship normalized events to observability platforms such as Datadog, Splunk, New Relic, Grafana Cloud, Elastic, and OpenTelemetry-compatible backends.

What This Post Covers

This post introduces the architecture and the open-source pattern library. It does not yet cover:

  • Full Datadog deployment walkthrough (Part 2)
  • Vendor-specific field mappings
  • Cost/performance benchmarking
  • ARP + EMS webhook + Datadog alerting (Part 3)
  • FPolicy binary protocol internals (future post)

The Problem Nobody Talks About

You’re running Amazon FSx for NetApp ONTAP. You’ve enabled file access auditing because compliance requires it — or because you genuinely want to know who’s accessing what on your file shares.

But where do those audit logs go?

If you followed the official AWS blog post, you likely ended up with EC2-based collectors: syslog-ng for cluster/admin audit forwarding, and a mounted audit volume plus Splunk Universal Forwarder for file access audit logs. It works. But now you have:

  • EC2 instances to patch and maintain
  • NFS mounts to the audit volume
  • syslog-ng configuration for admin audit forwarding
  • Splunk Universal Forwarder configuration for file access logs
  • A single point of failure unless you build your own HA pattern
  • Vendor lock-in to Splunk’s agent-based model

What if you could replace that EC2-based collector pattern with managed services — Lambda reads audit logs via S3 APIs, no NFS mount required — and ship to any observability platform?

That’s the goal of this project.

Important Distinction: Two Types of ONTAP Audit

Before diving in, a clarification. FSx for ONTAP has two distinct audit mechanisms:

  1. Cluster/admin activity audit logs — Administrative operations (CLI/API commands). These are forwarded via syslog to a log destination, as described in the AWS blog.

  2. File access audit logs — SMB/NFS file operations (open, read, write, delete, permission changes). These are recorded based on ONTAP audit policies and SACLs/NFSv4 ACLs, stored in EVTX or XML format, depending on your ONTAP audit configuration, on an audit volume inside the SVM.

In this series, “audit logs” refers to file access audit logs (type 2). The cluster admin audit forwarding via syslog is a separate concern.

The EC2-Free Alternative

I’m building an open-source pattern library that targets 9 observability vendors using Lambda, EventBridge Scheduler, and ECS Fargate — eliminating the need for self-managed EC2 instances.

This is EC2-free, not necessarily Lambda-only:

  • The audit-log and EMS paths are Lambda patterns (scheduled and event-driven respectively).
  • The FPolicy path uses ECS Fargate because ONTAP FPolicy requires a persistent TCP listener.

How Audit Logs Flow

ONTAP’s file access auditing writes rotated audit log files to a configured destination path inside the SVM. In this project, that destination is an audit volume exposed through an FSx for ONTAP S3 Access Point. Lambda does not mount NFS or SMB; it reads the rotated audit log files through S3 APIs.

Because this pattern does not rely on S3 ObjectCreated events from FSx for ONTAP S3 Access Points, the audit processor is invoked on a schedule and uses checkpointing to process only newly rotated log files.

FSx for ONTAP audit configuration (`vserver audit`)
    │
    ▼ audit logs written to /audit volume
Audit volume exposed via FSx for ONTAP S3 Access Point
    │
    ▼ EventBridge Scheduler (periodic invocation)
Lambda audit processor (Python 3.12)
    │
    ▼ parse EVTX/XML → normalize → vendor API
Datadog / Splunk / New Relic / Grafana / Elastic / ...

The key shift from the EC2 pattern: Lambda does not mount the audit volume over NFS or SMB. It reads rotated ONTAP audit log files through an FSx for ONTAP S3 Access Point using S3 APIs, while the data itself remains on the FSx for ONTAP file system.

A note on FSx for ONTAP S3 Access Points: FSx for ONTAP S3 Access Points let applications use S3 APIs to access data that still resides on FSx for ONTAP volumes. They are excellent as a serverless access boundary, but they are not the same as standard S3 buckets. In particular, you should not rely on S3 ObjectCreated notifications from an FSx for ONTAP S3 Access Point. Instead, this project uses EventBridge Scheduler plus checkpointing to discover and process newly rotated audit log files.

Three Event Sources, One Architecture

FSx for ONTAP generates observability data through three distinct channels:

1. File Access Audit Logs (FSx for ONTAP S3 AP)

Depending on your ONTAP audit configuration and SACL/NFSv4 ACL settings, file operations such as create, delete, read, write, and permission changes can be recorded as ONTAP audit logs in EVTX or XML format.

  • Delivery: ONTAP writes rotated audit log files to an audit volume inside the SVM
  • Access path: Lambda reads those files through an FSx for ONTAP S3 Access Point
  • Trigger: EventBridge Scheduler invokes Lambda periodically; Lambda uses checkpointing to process newly rotated files
  • Compute: Lambda (scheduled, pay-per-invocation)
  • Latency: Near-real-time rather than sub-second streaming. End-to-end latency depends on your ONTAP audit log rotation interval and the EventBridge Scheduler frequency.
  • Use case: Compliance auditing, access pattern analysis, data governance

2. EMS (Event Management System) Webhooks

ONTAP’s built-in event system can push critical alerts via HTTP webhooks. This includes:

  • Autonomous Ransomware Protection (ARP) alerts — ONTAP detects encryption patterns and fires an event
  • Quota threshold violations
  • Hardware failures
  • Replication issues

  • Delivery: ONTAP pushes HTTPS webhook to API Gateway

  • Trigger: API Gateway invocation (event-driven)

  • Compute: Lambda (behind API Gateway)

  • Use case: Security alerting, operational monitoring

3. FPolicy (File Policy) Events

FPolicy intercepts file operations at the protocol level (CIFS/NFS) and forwards them in real-time via a proprietary TCP protocol. Unlike the other two sources, FPolicy requires a persistent TCP listener — which is why this path uses ECS Fargate rather than Lambda.

  • Delivery: ONTAP connects to Fargate task via TCP:9898
  • Trigger: Fargate receives FPolicy events → enqueues to SQS → Lambda processes
  • Compute: ECS Fargate (TCP listener) + Lambda (vendor shipping)
  • Use case: File activity monitoring, DLP, suspicious behavior detection

Note: The FPolicy path is the one exception to the “pure Lambda” model. ONTAP’s FPolicy protocol is a proprietary binary format over TCP — it cannot be received by API Gateway or Lambda directly. Fargate handles the protocol translation, then hands off to Lambda via SQS for the vendor-specific shipping. It’s still EC2-free, but not entirely serverless in the strictest sense.

The Architecture

Each event source feeds into the same delivery pattern:

┌─────────────────────────────────────────────────────────────────┐
│                    FSx for ONTAP                                │
├──────────────┬──────────────────────┬───────────────────────────┤
│ File Access  │   EMS Webhook        │   FPolicy (TCP:9898)      │
│ Audit Logs   │                      │                           │
└──────┬───────┴──────────┬───────────┴───────────┬───────────────┘
       │                  │                       │
       ▼                  ▼                       ▼
  FSx S3 AP +        API Gateway            ECS Fargate
  Scheduler               │                       │
       │                  ▼                       ▼
       ▼             Lambda (EMS)           SQS → Lambda
  Lambda (parser)         │                       │
       │                  │                       │
       └──────────────────┼───────────────────────┘
                          ▼
              Observability Vendor API
              (Datadog, Splunk, New Relic, ...)

Each integration packages the parser and vendor shipper together in a single Lambda, but the pattern is the same: normalize ONTAP events, then send them to the vendor API. Swap the integration Lambda, and you switch vendors. Vendor-specific Lambdas are optimized for quick adoption and native API behavior, while the OpenTelemetry integration provides a vendor-neutral path for organizations standardizing on OTLP.

The Gotcha That Cost Me a Day

Here’s something that isn’t immediately obvious from the documentation:

In my validation, a Lambda function placed in a VPC with only an S3 Gateway Endpoint could not read from the FSx for ONTAP S3 Access Point and timed out. Adding NAT Gateway egress resolved the issue.

This gotcha matters because this project intentionally reads audit logs through FSx for ONTAP S3 Access Points rather than mounting the audit volume over NFS/SMB from an EC2 instance.

Tested with:

  • Lambda in private subnets (ap-northeast-1)
  • FSx for ONTAP S3 Access Point attached to an FSx volume
  • S3 Gateway VPC Endpoint only
  • No NAT Gateway
  • Failure mode: timeout (no response, not AccessDenied)

Your options:

Lambda Placement FSx for ONTAP S3 AP Access Recommendation
Outside VPC ✅ Works Simplest for read-only access
VPC + NAT Gateway ✅ Works Production recommended
VPC + S3 Gateway EP only ❌ Timeout Not recommended based on this validation

This is based on my validation environment (ap-northeast-1). Always test the network path in your own account and Region, as AWS may update this behavior.

Target Vendors

The project targets 9 observability platforms. Datadog is fully verified end-to-end (the subject of Parts 2 and 3 of this series). The remaining vendors have initial implementations that I’ll be verifying and writing about in upcoming posts:

Vendor Delivery Method Status
Datadog Logs API v2 ✅ E2E verified
Splunk HEC (HTTP Event Collector) 🧪 Implementation ready, verification planned
New Relic Log API v1 🧪 Implementation ready, verification planned
Grafana Cloud Loki Push API 🧪 Implementation ready, verification planned
Elastic Bulk API 🧪 Implementation ready, verification planned
Dynatrace Log Ingest API v2 🧪 Implementation ready, verification planned
Sumo Logic HTTP Source 🧪 Implementation ready, verification planned
Honeycomb Events Batch API 🧪 Implementation ready, verification planned
OpenTelemetry OTLP/HTTP (vendor-neutral) 🧪 Implementation ready, verification planned

Status definitions:

  • ✅ E2E verified — Deployed and validated with real FSx for ONTAP audit logs
  • 🧪 Implementation ready — Code and CloudFormation available; E2E validation pending
  • 🚧 Planned — Design exists; implementation pending

Each vendor integration is designed as a self-contained CloudFormation stack with its own Lambda, IAM roles, DLQ, and CloudWatch alarms. As I verify each one, I’ll publish a dedicated article with the results and any vendor-specific gotchas I encounter.

What’s in the Repo

The project is structured for easy adoption:

fsxn-observability-integrations/
├── integrations/
│   ├── datadog/           # ✅ Verified: Lambda + CFn + tests + docs
│   ├── splunk-serverless/ # 🧪 Implementation ready
│   ├── new-relic/         # 🧪 Implementation ready
│   ├── grafana/           # 🧪 Implementation ready
│   ├── elastic/           # 🧪 Implementation ready
│   ├── dynatrace/         # 🧪 Implementation ready
│   ├── sumo-logic/        # 🧪 Implementation ready
│   ├── honeycomb/         # 🧪 Implementation ready
│   └── otel-collector/    # 🧪 Implementation ready
├── shared/
│   ├── lambda-layers/     # Reusable log parser (EVTX/XML) + S3 AP reader
│   ├── templates/         # Prerequisites CFn (EventBridge Scheduler, IAM)
│   └── scripts/           # Deploy + test utilities
└── docs/                  # Bilingual (EN/JA) documentation

The shared infrastructure (EventBridge Scheduler, log parser layer, IAM roles) is vendor-agnostic and already proven through the Datadog verification. Each vendor directory follows the same structure, so once you understand one, you understand them all. Each stack is designed to include DLQ, CloudWatch alarms, and operational visibility out of the box; the Datadog stack also includes the verified CloudWatch operational dashboard used during E2E validation.

GitHub: github.com/Yoshiki0705/fsxn-observability-integrations

Related Posts

If you’ve been following my FSx for ONTAP S3 Access Points series, this project builds directly on those foundations:

This observability integrations project is the natural next step: taking those serverless patterns and applying them specifically to audit log shipping across multiple vendors.

Design Considerations

Based on early feedback, here are key points for different audiences:

Design philosophy: The goal is not just to remove EC2. The goal is to move undifferentiated collector operations into managed services, make failures observable and replayable, and keep the integration layer small enough for customers to operate themselves.

Where this pattern matters: This pattern is especially useful for enterprise file workloads where auditability matters but EC2-based collectors add operational overhead —
departmental file shares, enterprise application interface directories such as SAP, Oracle, or SQL Server adjacent file shares, VDI/EUC home directories, engineering and design repositories, regulated file repositories, and ransomware investigation workflows.

Non-intrusive by design: This pipeline observes audit logs after ONTAP records them; it does not sit in the application data path. NFS/SMB access patterns are unchanged. No application code changes are required.

Telemetry ownership: This pattern treats ONTAP as the authoritative source of file activity telemetry, while AWS managed services provide the event processing and delivery layer.

Compliance note: This pattern helps centralize and analyze audit events, but retention, immutability, and regulatory controls should be designed according to your organization’s compliance requirements. This is an audit log delivery pattern, not a compliance certification. For audit evidence, consider separately how long raw EVTX/XML files should be retained on the audit volume or archived outside the observability pipeline.

Audit policy dependency: The quality and volume of events depend heavily on your ONTAP audit policy, SACLs, NFSv4 ACLs, and rotation interval. Enabling read auditing on high-traffic volumes can produce significant log volume — design your audit policy carefully.

Cost variables: The biggest cost factors are audit event volume, log rotation frequency, EventBridge Scheduler frequency, Lambda runtime, NAT Gateway usage (if Lambda is in VPC), and vendor ingest pricing. Compared to the EC2 pattern, you trade always-on instance cost for pay-per-invocation compute and vendor-ingest-driven cost.

Multi-account deployment: This pattern can be deployed per workload account or centralized into a logging/security account, depending on your organization’s landing zone design.

Reliability: The stack includes DLQ for failed events, CloudWatch alarms for error/throttle detection, and checkpointing to avoid reprocessing already completed audit log files. Delivery to external vendor APIs should be treated as at-least-once; DLQ messages can be replayed after resolving the root cause.

What’s Coming Next

This is Part 1 of a series. In the upcoming posts, I’ll deep-dive into:

  • Part 2: Implementing the Datadog integration end-to-end — from CloudFormation to seeing logs in the Datadog Log Explorer
  • Part 3: Event-driven ransomware detection using ONTAP’s Autonomous Ransomware Protection (ARP) + EMS webhooks + Datadog alerting

Beyond this Datadog series, I’ll be verifying and writing about each vendor integration as I go:

  • Replacing the EC2-based Splunk pattern with Lambda + HEC
  • OpenTelemetry as the vendor-neutral escape hatch
  • Grafana Cloud + Loki for the open-source stack
  • And more — each with its own E2E verification and lessons learned

The goal is to build a comprehensive, battle-tested pattern library where you can pick your vendor and deploy with confidence. Follow along as I work through each one.

Try It Yourself

The Datadog integration is fully verified and ready to deploy. You’ll need:

  • An FSx for ONTAP file system with audit logging enabled
  • An FSx for ONTAP S3 Access Point attached to the audit volume
git clone https://github.com/Yoshiki0705/fsxn-observability-integrations.git
cd fsxn-observability-integrations

# Deploy Datadog integration
# (FsxS3AccessPointArn = your FSx for ONTAP S3 Access Point ARN)
aws cloudformation deploy 
  --template-file integrations/datadog/template.yaml 
  --stack-name fsxn-datadog-integration 
  --parameter-overrides 
    FsxS3AccessPointArn=<your-fsx-s3-ap-arn> 
    DatadogApiKeySecretArn=<your-secret-arn> 
  --capabilities CAPABILITY_NAMED_IAM

This stack deploys the scheduled Lambda processor, IAM permissions for reading from the FSx for ONTAP S3 Access Point, checkpoint storage, DLQ, CloudWatch alarms, and the Datadog shipping logic. The processor keeps track of already-processed audit log files so each scheduled invocation only ships newly rotated logs.

After deployment, you should see:

  • EventBridge Scheduler invoking the Lambda processor on your configured interval
  • Checkpoint storage updated after processing rotated audit logs
  • Parsed FSx for ONTAP audit events arriving in Datadog Logs (source:fsxn)
  • CloudWatch alarms and DLQ ready for operational visibility

Full setup guide in the repo’s Prerequisites doc.

Have questions or want to see a specific vendor integration verified next? Drop a comment below — it’ll help me prioritize the series.

Next up: Shipping FSx for ONTAP Logs to Datadog — The Serverless Way

Xiaomi, yeni işlemcisi XRING 03’ü yıl sonunda pazara sunmaya hazırlanıyor

Xiaomi

XiaomiXiaomi, yapılan doğrulamaya göre XRING 01’in yerini alacak yeni işlemcisi XRING 03’ü yıl sonunda pazara sunmaya hazırlanıyor. Henüz teknik olarak detaylandırılmayan işlemcinin, TSMC’nin 3nm “N3P” üretim sürecinden çıkarılacağı aktarılıyor. Şirketin güncel 2 nm üretim süreci kullanılmayacağı için üst seviyede rekabet edemeyecek işlemci, birden fazla kaynak tarafından elde edilen bilgiye göre yalnızca akıllı telefon ve tablet gibi cihazlarda kullanılmayacak, otomobillere de entegre edilecek. İlk aşamada yalnızca Çin’e özel olması beklenen işlemci, detaylarına burada yer verdiğimiz XRING 01’e kıyasla çok büyük performans artışı ortaya koyabilir.

Xiaomi, yeni işlemcisi XRING 03’ü yıl sonunda pazara sunmaya hazırlanıyor yazısı ilk olarak Teknoloji haberleri – LOG üzerinde yayınlandı.

Vue 2 vs Vue 3 and Composition API vs Options API: complete comparison

Vue 3 launched in late 2020. Five years later, Vue 2 has been officially end-of-life since December 2023, yet migration is still dragging in many projects. Between the reactivity rewrite, the Composition API that throws people off at first, and Vite replacing webpack — there’s plenty of reason to stall. Here’s what actually changed, what it means for your code, and how to choose between the two APIs.

Vue 2 vs Vue 3: what changed in practice

The reactivity system

This is the deepest change. Vue 2 uses Object.defineProperty to observe mutations — with its well-known limitations: no detection of dynamically added properties, no detection on array indexes. Hence the Vue.set() and this.$set() calls that clutter Vue 2 code.

Vue 3 uses ES2015 Proxy. The entire object is intercepted, not property by property. No more $set, direct mutations are detected natively:

// Vue 2 — adding a reactive property after creation
this.$set(this.user, 'email', '[email protected]') // required

// Vue 3 — works directly
this.user.email = '[email protected]' // reactive automatically

Performance and bundle size

Vue 3 is tree-shakable. Unused features (Transition, KeepAlive, Teleport…) are not included in the final bundle if they aren’t imported. Vue 2 included the full runtime regardless.

In practice on an average project: runtime bundle reduced by roughly 40% with Vue 3 vs Vue 2. The reactive diff is also faster thanks to a rewritten virtual DOM patching strategy (static template analysis at compile time).

TypeScript

Vue 2 had a patched-together TypeScript support via vue-class-component and decorators. Functional, but tedious. Vue 3 was rewritten in TypeScript from scratch — types are native, inference works without any special configuration in components.

Fragments, Teleport, Suspense

Three structural additions that were missing in Vue 2:

  • Fragments: a component can return multiple root elements — no more pointless wrapper <div>
  • Teleport: render HTML into another DOM node (modals, tooltips) without working around CSS with fragile position: fixed hacks
  • Suspense: handle async component loading states natively

What breaks during migration

The Vue 3 breaking changes that cause the most damage during migration:

  • $listeners removed — merged into $attrs
  • $children removed — use ref or provide/inject
  • filters removed — use methods or computed properties
  • v-model: the event is now update:modelValue instead of input
  • Vuex → Pinia (Vuex 5 never shipped)
  • Vue Router 4 with some API changes

On a large Vue 2 project with lots of filters, $listeners, and Vuex everywhere, migration takes time. The automated migration via @vue/compat helps but doesn’t solve everything.

Options API vs Composition API

This is the question that comes up most often when moving to Vue 3. The short answer: both are officially supported, permanently. It’s not a replacement but an alternative.

Options API — quick reminder

export default {
  name: 'UserProfile',
  props: {
    userId: String,
  },
  data() {
    return {
      user: null,
      loading: false,
    }
  },
  computed: {
    displayName() {
      return this.user?.name ?? 'Unknown'
    },
  },
  methods: {
    async fetchUser() {
      this.loading = true
      this.user = await api.getUser(this.userId)
      this.loading = false
    },
  },
  mounted() {
    this.fetchUser()
  },
  watch: {
    userId(newId) {
      this.fetchUser()
    },
  },
}

Composition API — same component

import { ref, computed, watch, onMounted } from 'vue'
import { useUserApi } from '@/composables/useUserApi'

export default {
  name: 'UserProfile',
  props: {
    userId: String,
  },
  setup(props) {
    const user = ref(null)
    const loading = ref(false)

    const displayName = computed(() => user.value?.name ?? 'Unknown')

    async function fetchUser() {
      loading.value = true
      user.value = await api.getUser(props.userId)
      loading.value = false
    }

    watch(() => props.userId, fetchUser)
    onMounted(fetchUser)

    return { user, loading, displayName }
  },
}

Or with <script setup> (the recommended syntax in Vue 3):

// <script setup>
import { ref, computed, watch, onMounted } from 'vue'

const props = defineProps({ userId: String })
const user = ref(null)
const loading = ref(false)

const displayName = computed(() => user.value?.name ?? 'Unknown')

async function fetchUser() {
  loading.value = true
  user.value = await api.getUser(props.userId)
  loading.value = false
}

watch(() => props.userId, fetchUser)
onMounted(fetchUser)

Everything declared inside <script setup> is automatically exposed to the template — no more return {}.

Strengths and weaknesses

Options API

Strengths

  • Rigid and predictable structure — everyone knows where to find data, methods, computed properties
  • Low learning curve — ideal for onboarding junior devs or devs coming from other frameworks
  • Very readable on small components — everything is organized by option type
  • Abundant documentation, examples everywhere on Stack Overflow and legacy projects

Weaknesses

  • Business logic gets fragmented across data, methods, computed, watch — impossible to keep one “feature” coherent in a single block
  • Reusing logic between components forces you through mixins — which create naming collisions and make dependencies opaque
  • Tedious TypeScript: this inside methods doesn’t infer well, annotations everywhere
  • On large components (200+ lines), navigation becomes painful: data is at the top, the method that modifies it is at the bottom, the watcher is somewhere else

Composition API

Strengths

  • Business logic can be co-located: everything related to fetchUser (state, method, watcher) stays together
  • Composables cleanly replace mixins: reusable logic is an explicitly imported function, no magic, no collisions
  • Native TypeScript: ref<User | null>(null), no this, full inference
  • More effective tree-shaking: only the Vue functions you use are imported

Weaknesses

  • More verbose on small components — importing ref, computed, onMounted explicitly for 20 lines of logic
  • The .value on refs is constant friction, a source of bugs (forgetting .value in JS but not in the template)
  • Without discipline, <script setup> can turn into a grab-bag — structural freedom has a cost if the team doesn’t enforce conventions
  • Less intuitive for someone coming from Vue 2 or React Class Components — the learning curve is real

Direct comparison on concrete cases

Logic reuse: mixins vs composables

This is where the Composition API wins most clearly. A Vue 2 mixin to handle pagination:

// Vue 2 — mixin
export const paginationMixin = {
  data() {
    return {
      page: 1,
      perPage: 10,
      total: 0,
    }
  },
  computed: {
    totalPages() {
      return Math.ceil(this.total / this.perPage)
    },
  },
  methods: {
    nextPage() { this.page++ },
    prevPage() { this.page-- },
  },
}

// Usage — where data.page comes from is not obvious
export default {
  mixins: [paginationMixin],
  // where does this.page come from? mystery for a new dev
}
// Vue 3 — composable
export function usePagination(initialPerPage = 10) {
  const page = ref(1)
  const perPage = ref(initialPerPage)
  const total = ref(0)

  const totalPages = computed(() => Math.ceil(total.value / perPage.value))

  function nextPage() { page.value++ }
  function prevPage() { page.value-- }

  return { page, perPage, total, totalPages, nextPage, prevPage }
}

// Usage — explicit
const { page, total, nextPage } = usePagination(20)
// we know exactly where page comes from

TypeScript: the concrete difference

// Options API with TypeScript — tedious
export default defineComponent({
  data(): { user: User | null; loading: boolean } { // manual annotation
    return { user: null, loading: false }
  },
  methods: {
    async fetchUser(id: string): Promise<void> {
      this.user = await getUser(id) // this isn't always inferred
    },
  },
})

// Composition API — native inference
const user = ref<User | null>(null)
const loading = ref(false) // inferred as ref<boolean>

async function fetchUser(id: string) {
  user.value = await getUser(id) // correctly typed without annotation
}

Conclusion: when to choose which

Options API if:

  • You’re migrating a Vue 2 project and want to minimize change
  • The team is junior or comes from other MVC frameworks
  • Components are small and logic isn’t reused
  • You want a framework-enforced structure without the discipline overhead

Composition API if:

  • You’re starting a new Vue 3 project — it’s the ecosystem’s default choice
  • You’re using TypeScript seriously
  • You have complex logic to reuse across components
  • Components are growing — logic co-location becomes a real advantage

What I wish I’d known when starting with Vue 3: both APIs coexist in the same project. A simple form component can stay in Options API while a complex component with 5 composables switches to Composition API. No need to choose once and for all.

On my recent projects, I use the Composition API by default with <script setup> — TypeScript demands it — and composables for everything touching API calls, complex local state management, and DOM interactions (resize observer, intersection observer, etc.). Options API stays for simple presentational components where the rigid structure is an advantage rather than a constraint.

A tmux sidecar for repeatable Claude/Codex workflows

claude-adjunct

I realized that I keep repeating almost the same workflow in my daily programming with Codex/Claude and OpenSpec:

create proposal → review → implement → review code → write tests → update specs → close proposal.

The workflow in general is the same, but the prompts are slightly different each time and require task specific edits.

So I have created an app: a simple tmux sidecar that lets you define a workflow, track its status, reuse prompts between runs, edit them when needed, and send them to a coding agent in another tmux pane.

It is intentionally not a full automation/orchestration framework. The goal is to reduce prompt copy-pasting while keeping you in control of each step.

claude-adjunct

Hope, it may makes your coding workflow a little easier, and I’d appreciate any feedback.

GitHub link

PKM vs RAG vs Wiki vs Memory Systems Explained Clearly

PKM, RAG, wikis, and AI memory systems are often discussed as if they solve the same problem.
They do not.
They all deal with knowledge, but they operate at different layers:

  • PKM helps humans think.
  • Wikis help groups preserve shared knowledge.
  • RAG helps machines retrieve external knowledge.
  • Memory systems help AI agents persist context over time.

Confusing these systems leads to bad architecture.

You get wikis full of personal scratch notes, RAG systems without a source of truth, memory layers pretending to be databases, and PKM tools overloaded with automation they were never designed to handle.

A better model is to see them as different parts of a knowledge systems spectrum.

This article compares PKM, RAG, wikis, and AI memory systems by structure, retrieval, ownership, evolution, and real-world use cases.

The short version

System Primary user Main purpose Best for
PKM Individual Develop personal knowledge Thinking, learning, synthesis
Wiki Team or public group Maintain shared knowledge Documentation, policies, reference
RAG Machine system Retrieve context for generation AI answers over external data
AI memory AI agent Persist context over time Long-running agents and personalization

The most important distinction is this:

PKM and wikis structure knowledge. RAG retrieves knowledge. Memory systems evolve agent context.

That is the core mental model.

Why these systems are confused

They overlap in visible behavior.

All of them can:

  • store notes
  • retrieve information
  • answer questions
  • organize references
  • connect ideas

But they differ in intent.

A PKM system is not just a private wiki.
A wiki is not just a RAG database.
A RAG pipeline is not an AI memory.
An AI memory system is not a replacement for structured documentation.

The confusion comes from treating “knowledge” as one thing.

In practice, knowledge has multiple layers:

  1. Capture
  2. Structure
  3. Retrieval
  4. Interpretation
  5. Reuse
  6. Evolution

Different systems optimize different stages.

The four paradigms

1. PKM

PKM stands for personal knowledge management.

It is the practice of capturing, organizing, connecting, and using knowledge for personal work.

Typical PKM systems include:

  • Obsidian
  • Logseq
  • Notion
  • plain Markdown folders
  • Zettelkasten systems
  • second brain systems

PKM is human driven.

The goal is not just storage. The goal is better thinking.

What PKM is good at

PKM works well for:

  • learning a new domain
  • developing original ideas
  • connecting notes over time
  • writing articles or books
  • tracking personal research
  • building a second brain

A good PKM system is messy in a useful way. It supports unfinished thoughts, partial ideas, private context, and evolving concepts.

This is why PKM is not the same as documentation.

Documentation wants clarity.
PKM tolerates ambiguity.

PKM failure modes

PKM often fails when it becomes:

  • a dumping ground
  • a folder taxonomy project
  • a productivity aesthetic
  • a tool optimization hobby
  • a private archive nobody uses

The main risk is collection without synthesis.

If you only save information, you do not have a knowledge system. You have a personal landfill.

Opinionated take

PKM should optimize for reuse, not capture.

Capturing everything feels productive, but it creates debt. The real value appears when notes become connected, rewritten, compressed, and used in output.

2. Wiki

A wiki is a structured knowledge base designed for shared reference.

Typical wiki systems include:

  • DokuWiki
  • MediaWiki
  • Confluence
  • BookStack
  • Git based documentation sites
  • internal company knowledge bases

A wiki is usually more formal than PKM.

It should answer:

What do we know, and where is the current version?

What wikis are good at

Wikis work well for:

  • team documentation
  • operational runbooks
  • product knowledge
  • policy documents
  • technical reference
  • onboarding material
  • stable domain knowledge

A wiki is a social contract.

It says:

This page is the place where this knowledge lives.

That makes ownership and maintenance critical.

Wiki failure modes

Wikis often fail because they become stale.

Common problems:

  • no page owners
  • outdated screenshots
  • duplicate pages
  • unclear canonical versions
  • too much hierarchy
  • no maintenance rhythm

A wiki with old information is worse than no wiki, because it creates false confidence.

Opinionated take

A wiki should be boring.

That is a compliment.

A good wiki is not where ideas are born. It is where stable knowledge is preserved after it becomes useful to others.

3. RAG

RAG stands for retrieval augmented generation.

It is an AI architecture where a system retrieves relevant external information before asking a language model to generate an answer.

A basic RAG pipeline usually has:

  1. Documents
  2. Chunking
  3. Embeddings or search index
  4. Retrieval
  5. Optional reranking
  6. Prompt assembly
  7. LLM generation

RAG is machine driven.

The goal is not to create knowledge. The goal is to give a model relevant context at query time.

What RAG is good at

RAG works well for:

  • question answering over documents
  • internal search assistants
  • support bots
  • technical documentation assistants
  • compliance lookup
  • research over large corpora
  • connecting LLMs to updated information

RAG is especially useful when the model cannot or should not memorize the information.

RAG failure modes

RAG often fails when teams treat it as magic search.

Common problems:

  • bad chunking
  • weak retrieval
  • noisy context
  • missing metadata
  • no source of truth
  • stale documents
  • weak evaluation
  • no human feedback loop

RAG does not fix bad knowledge management.

If the underlying content is fragmented, outdated, or contradictory, the RAG system will surface that mess with confidence.

Opinionated take

RAG is not a knowledge strategy.

RAG is an access strategy.

It helps machines access knowledge, but it does not decide what knowledge is valid, maintained, canonical, or useful.

4. AI memory systems

AI memory systems give agents persistent context beyond a single prompt or conversation.

They may store:

  • user preferences
  • past decisions
  • long-term facts
  • task history
  • summaries
  • reflections
  • extracted entities
  • episodic memories
  • semantic memories

Examples and related ideas include:

  • MemGPT style memory tiers
  • long-term agent memory
  • episodic memory
  • semantic memory
  • vector memory
  • profile memory
  • tool state memory
  • reflective agents

AI memory is agent driven.

The goal is continuity.

What AI memory is good at

AI memory systems work well for:

  • personal assistants
  • long-running coding agents
  • research agents
  • customer support agents
  • tutoring systems
  • workflow automation
  • persistent companions
  • multi-session task execution

Memory matters when the system must behave as if it remembers.

AI memory failure modes

Memory systems are dangerous when unmanaged.

Common problems:

  • remembering wrong facts
  • storing too much
  • privacy risk
  • stale preferences
  • poor memory ranking
  • memory poisoning
  • no forgetting mechanism
  • confusing memory with truth

A memory system needs governance.

It should answer:

  • What should be remembered?
  • Who approved it?
  • How long should it live?
  • When should it be forgotten?
  • How is it corrected?

Opinionated take

AI memory is not just long context.

Long context lets a model see more at once.
Memory decides what survives across time.

Those are different problems.

Core differences table

Dimension PKM Wiki RAG AI memory
Primary user Individual Team or public group AI system AI agent
Main function Thinking Shared reference Query time retrieval Persistent context
Knowledge state Evolving Stabilized Retrieved Adaptive
Structure Flexible Explicit Index based Learned or extracted
Retrieval style Human search and linking Navigation and search Semantic or hybrid retrieval Relevance plus salience
Ownership Personal Page or team owners System maintainers Agent or user controlled
Time horizon Long term personal Long term shared Query time Multi-session
Best output Insight Reliable reference Grounded answer Continuity
Main risk Hoarding Staleness Bad retrieval Bad memory
Good metric Reuse in thinking Trust and freshness Answer quality Helpful continuity

Structure vs retrieval vs evolution

The simplest way to understand these systems is to compare what they optimize. The architectural implications of that distinction are explored in depth in Retrieval vs Representation in Knowledge Systems.

PKM optimizes personal evolution

PKM is about how your understanding changes.

You collect material, rewrite it, connect it, and turn it into something useful.

The output is often:

  • a better mental model
  • a written article
  • a decision
  • a research direction
  • a reusable insight

PKM is not primarily about fast lookup. It is about long-term sensemaking.

Wikis optimize shared structure

Wikis are about stable knowledge.

They ask:

  • What is the current answer?
  • Who owns it?
  • Where should people go?
  • What should be updated?

A wiki works when people trust it.

RAG optimizes machine retrieval

RAG is about retrieving the right context at the right time.

It asks:

  • What documents are relevant?
  • Which chunks should be used?
  • How much context fits?
  • What should the model cite?

RAG works when retrieval quality is high and the source corpus is trustworthy.

AI memory optimizes continuity

Memory systems are about persistence across sessions.

They ask:

  • What should the agent remember?
  • What should be forgotten?
  • Which memory matters now?
  • How should memory change behavior?

Memory works when it improves future behavior without polluting the agent with stale or incorrect context.

When to use PKM

Use PKM when the knowledge is personal, unfinished, or exploratory.

Good scenarios:

  • learning distributed systems
  • planning articles
  • researching LLM architecture
  • collecting book notes
  • building a second brain
  • tracking personal experiments

Use PKM when you are still thinking.

Example

You are learning about RAG evaluation.

You collect:

  • articles
  • benchmark notes
  • diagrams
  • implementation ideas
  • failures from your own experiments

This belongs in PKM first.

Later, once the knowledge stabilizes, you may publish an article or turn it into documentation.

When to use a wiki

Use a wiki when knowledge must be shared and maintained.

Good scenarios:

  • team onboarding
  • API documentation
  • operational runbooks
  • architecture decision records
  • product knowledge
  • deployment instructions
  • support procedures

Use a wiki when others need a reliable answer.

Example

Your team has one correct way to deploy a Hugo site to S3 and CloudFront.

That does not belong only in someone’s private notes.

It belongs in a wiki or documentation system with clear ownership.

When to use RAG

Use RAG when an AI system needs access to external knowledge at query time.

Good scenarios:

  • chatbot over documentation
  • search assistant over internal docs
  • support assistant over help articles
  • legal or compliance assistant
  • research over large document sets
  • developer assistant over code docs

Use RAG when the problem is:

The model needs information that lives outside its weights.

Example

You have hundreds of technical articles and want an assistant to answer questions using them.

RAG is a good fit.

But only if the documents are clean enough to retrieve from.

When to use AI memory

Use AI memory when an agent needs continuity.

Good scenarios:

  • coding agents that remember project conventions
  • personal assistants that remember preferences
  • research agents that continue long investigations
  • tutoring agents that remember student progress
  • support agents that remember prior interactions
  • autonomous agents that track goals

Use memory when the system must improve across time.

Example

A coding agent should remember:

  • the project uses Go
  • tests run with a specific command
  • the user prefers minimal dependencies
  • database migrations follow a convention

That is not just retrieval. It is persistent operating context.

How these systems combine

The most useful systems are hybrids.

A mature knowledge architecture might look like this:

  1. PKM for personal exploration
  2. Wiki for stable shared knowledge
  3. RAG for machine access
  4. AI memory for long-running agent continuity

Each layer has a job.

Pattern 1. PKM to wiki

This is the human knowledge pipeline.

Flow:

  1. Capture notes privately
  2. Connect ideas
  3. Distill insights
  4. Publish stable knowledge
  5. Maintain as shared reference

This is how personal research becomes organizational knowledge.

Example

You research self-hosted knowledge tools in Obsidian.

After testing DokuWiki, Nextcloud, and static Markdown systems, you write a stable guide in your site or team wiki.

PKM created the insight.
The wiki preserves the result.

Pattern 2. Wiki to RAG

This is the machine access pipeline.

Flow:

  1. Maintain canonical wiki pages
  2. Index them
  3. Retrieve relevant sections
  4. Generate grounded answers
  5. Link back to sources

This is one of the cleanest RAG patterns.

The wiki remains the source of truth.
RAG becomes the access layer.

Example

A support bot answers questions using a product wiki.

The bot should not replace the wiki. It should cite and route users back to the canonical pages.

Pattern 3. RAG plus memory

This is the agent continuity pipeline.

Flow:

  1. RAG retrieves external facts
  2. Memory stores user or task context
  3. The agent combines both
  4. Future behavior improves

RAG answers:

What does the knowledge base say?

Memory answers:

What matters about this user, project, or task?

Example

A coding agent uses RAG to retrieve framework docs.

It uses memory to remember that your project avoids ORMs, prefers sqlc, and uses structured logging.

Those are different knowledge types.

Pattern 4. PKM plus AI assistant

This is the hybrid thinking pipeline.

Flow:

  1. Human captures notes
  2. AI summarizes and suggests links
  3. Human edits and validates
  4. Knowledge becomes more structured
  5. Some pages graduate to wiki or publication

The AI augments the PKM system, but it should not own the truth.

Example

An AI assistant can suggest connections between notes about RAG, memory systems, and LLM Wiki.

But the human decides which connections are meaningful.

Common architecture mistakes

Mistake 1. Treating RAG as a wiki

RAG is not a knowledge base.

It does not automatically create a canonical structure. It retrieves from whatever exists.

If the source documents are bad, RAG becomes a confident interface to bad knowledge.

Mistake 2. Treating memory as a database

AI memory is selective context, not general storage.

A database stores records.
Memory changes behavior.

If you need exact facts, use a database or knowledge base.
If you need continuity, use memory.

Mistake 3. Treating PKM as documentation

PKM can be messy.

Documentation should not be.

Private notes can contain half-formed ideas. Shared documentation should contain stable, maintained knowledge.

Mistake 4. Treating a wiki as a thinking tool

A wiki can support thinking, but it is not ideal for early exploration.

If every early thought must become a polished page, people stop writing.

Use PKM for rough thinking. Use wikis for durable knowledge.

Mistake 5. Treating long context as memory

Long context is not memory.

It only helps while the context is present.

Memory persists, selects, updates, and sometimes forgets.

Decision guide

Use this simple decision model.

If the knowledge is private and evolving

Use PKM.

If the knowledge is shared and stable

Use a wiki.

If an AI needs to answer from external documents

Use RAG.

If an agent needs continuity over time

Use memory.

If you need all four

Build a layered system.

Do not force one tool to do every job.

The knowledge systems spectrum

These systems form a spectrum from human thinking to AI continuity.

Layer System Role
Human thought PKM Explore and synthesize
Shared structure Wiki Preserve and maintain
Machine access RAG Retrieve and generate
Agent continuity Memory Persist and adapt

The direction matters.

Knowledge often starts as personal thought, becomes shared structure, is indexed for machine retrieval, and then becomes part of persistent agent behavior.

That is the modern knowledge stack.

Where LLM Wiki fits

LLM Wiki style systems sit between wiki and AI architecture.

They are not classic RAG.

Instead of retrieving chunks only at query time, they attempt to pre-structure knowledge into pages, summaries, entities, and links.

That makes them closer to compiled knowledge systems.

A useful placement:

System Position
Wiki Human maintained structured knowledge
RAG Query time machine retrieval
LLM Wiki Ingest time machine structured knowledge
Memory Agent persistent context

This is why LLM Wiki belongs near knowledge systems architecture, not inside ordinary RAG.

Practical examples

Example 1. Personal technical blog

A technical blogger might use:

  • PKM for research notes
  • Hugo site as published knowledge
  • internal linking as wiki-like structure
  • RAG later for site search
  • AI memory for writing assistant preferences

This is a strong architecture.

It keeps human judgment at the center while still allowing AI support.

Example 2. Engineering team

An engineering team might use:

  • PKM for individual learning
  • wiki for standards and runbooks
  • RAG assistant for internal docs
  • memory for coding agents working inside repositories

The wiki should remain canonical.

The RAG assistant should not invent process.
The memory layer should remember project preferences, not replace architecture decisions.

Example 3. AI research workflow

A researcher might use:

  • PKM for paper notes
  • wiki for stable summaries
  • RAG for literature search
  • memory for long-running research agents

This works because each layer handles a different time scale.

Security and governance

Knowledge systems become risky when they store sensitive or stale information.

PKM governance

Questions:

  • What should stay private?
  • What should be published?
  • What should be deleted?

Wiki governance

Questions:

  • Who owns each page?
  • When was it last reviewed?
  • What is canonical?

RAG governance

Questions:

  • Which sources are indexed?
  • Are answers cited?
  • How is retrieval evaluated?
  • What content is excluded?

Memory governance

Questions:

  • What is remembered?
  • Can users inspect memory?
  • Can users delete memory?
  • How are wrong memories corrected?

Memory needs the strictest governance because it can silently influence future behavior.

SEO and content strategy note

If you run a technical site, this distinction is not only architectural. It is also editorial.

You can map content like this:

  • PKM pages explain human knowledge practices.
  • Wiki pages explain structured knowledge systems.
  • RAG pages explain retrieval engineering.
  • Memory pages explain persistent AI behavior.
  • Architecture pages compare and connect the paradigms.

This gives your site a clean authority mesh instead of a pile of loosely related AI articles.

Final conclusion

PKM, RAG, wikis, and AI memory systems are not competitors.

They are different answers to different questions.

PKM asks:

How do I think better over time?

A wiki asks:

What do we know, and where is the trusted version?

RAG asks:

What external context should the model use right now?

AI memory asks:

What should this agent remember for the future?

Once you separate those questions, the architecture becomes obvious.

Use PKM for thinking.
Use wikis for shared truth.
Use RAG for retrieval.
Use memory for continuity.

The future is not one knowledge system that replaces all others.

The future is layered knowledge architecture. For tools, methods, and self-hosted platforms across the full knowledge management spectrum, the cluster pillar maps the territory.

Sources and further reading