=== Sentient AI — WordPress SEO Domination: AI-Powered GEO, AEO, Schema & Semantic Search === Contributors: maidulcu Tags: seo, geo, aeo, schema markup, ai seo, search engine optimization, structured data Requires at least: 5.8 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 2.26.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html AI-powered SEO plugin for WordPress with GEO, AEO, schema markup, semantic search, and chatbot. Dominate search results with AI. == Description == Sentient AI is a comprehensive WordPress SEO plugin that combines AI-powered content optimization with generative engine optimization (GEO), answer engine optimization (AEO), and semantic search. Dominate search results across traditional search engines and AI-powered answer engines like Google SGE, Perplexity, and ChatGPT Search. = Core Capabilities = * **Schema Markup Generator** — AI-powered JSON-LD schema generation for 16+ types (Article, FAQ, HowTo, Product, LocalBusiness, Event, Organization, Person, VideoObject, BreadcrumbList, and more). Three modes: AI (uses your API), Auto (rule-based, no API needed), and Manual (edit JSON-LD directly). * **GEO Scanner** — Analyze content for Generative Engine Optimization. Score each post/page across 10 factors that determine how AI search engines evaluate your content. One-click fixes for schema markup, FAQ sections, and content structure. * **AEO Optimization** — Content formatted for featured snippets, AI assistants, and voice search. Product comparisons and search results optimized for answer engine extraction. * **Semantic Vector Search** — Two-tier architecture: Local MySQL engine for shared hosting (no custom PHP extensions needed) and cloud engines (Pinecone, Supabase) for scale. Finds content by meaning, not just keywords. * **AI-Powered Content Intelligence** — Multiple AI providers (OpenAI, Claude, Gemini, OpenRouter, Hugging Face) with automatic failover, token tracking, and cost monitoring. AI reads and understands your content for better SEO recommendations. * **Empathy Engine** — Real-time emotion detection adapts the AI's response tone. Automatically escalates frustrated users to human support. * **Glass Box Transparency** — Every AI response shows a confidence score (0-100%) with source attribution. Admins can review low-confidence queries and improve their FAQ database. = Designed for Every Hosting Environment = * **Shared hosting (Bluehost, SiteGround, GoDaddy, HostGator)** — Local MySQL vector engine works without SSH access or custom PHP extensions * **Cloud / VPS** — Pinecone or Supabase for high-scale vector search * **Privacy-first mode** — Local Brain + Privacy Mode = zero external API calls = Why Choose Sentient AI? = Unlike basic SEO plugins, Sentient AI offers: - AI-powered schema markup generation (16+ types with validation) - GEO scoring that shows exactly how AI search engines see your content - AEO optimization for featured snippets and voice search - Semantic search that understands meaning, not just keywords - Content-aware chatbot that answers questions and drives engagement - Full site management through chat commands (Autopilot) - External AI agent integration via MCP (standard protocol) - Emotion-aware responses with automatic escalation - Transparent confidence scoring and source attribution - Privacy-first local processing with zero API costs - Multi-provider flexibility — use OpenAI, Claude, Gemini, or others == Installation == 1. Upload the `sentient-ai` folder to `/wp-content/plugins/` 2. Activate the plugin from the **Plugins** menu 3. Navigate to **Sentient AI → Settings** to configure 4. Select your AI provider and enter your API key in the **AI Providers** tab 5. Enable the chatbot in the **General** tab 6. Customize appearance and behavior in the **Widget** and **Features** tabs 7. Place `[sentient_ai_chat]` on any page, or use the floating widget == Frequently Asked Questions == = Can this work without an API key? = Yes. The browser-based FAQ matcher and Local Brain feature answer common questions using your FAQ database without any API calls. For AI-generated responses beyond existing FAQs, an API key from a supported provider is required. = Which AI providers are supported? = OpenAI (GPT-4o, GPT-4, GPT-3.5), Claude by Anthropic, Google Gemini, OpenRouter (multi-model access), and Hugging Face. You can switch between providers at any time. = How does the semantic vector search work? = The Vector Database (v2.8.0) converts your content into mathematical embeddings and stores them for similarity search. The Local MySQL engine works on any shared hosting using standard WordPress tables. For higher scale, Pinecone and Supabase cloud engines handle millions of vectors with SOC 2/GDPR compliance. = Which vector engine should I choose? = For shared hosting with under 10,000 posts, the Local MySQL engine works without any additional setup. For larger sites, Pinecone or Supabase offer free tiers and enterprise-grade scalability. = What is the MCP Server? = The MCP Server implements the Model Context Protocol, a standard for connecting AI agents to external systems. It allows tools like Claude Desktop, Cursor, or custom AI agents to interact with your WordPress site — querying the chatbot, searching FAQs, managing content, and accessing analytics — all authenticated via API key. = How does the GEO Scanner help my content? = Generative Engine Optimization (GEO) ensures your content is cited by AI-powered search engines. The scanner analyzes each post across 10 factors — structured data, FAQ sections, citations, statistics, author expertise, content structure, and more — providing a score (0-100) with actionable suggestions and one-click fixes. = Does this work with WooCommerce? = Yes. The chatbot supports product lookup, order status checking, recommendations, and cart information. WooCommerce data is accessible through chat and is included in the Autopilot's site management capabilities. = Is my data sent to external services? = Only when you explicitly configure an AI provider API key and a user query requires AI-generated response. FAQ-matched queries, Local Brain responses, and Privacy Mode interactions never leave your server. The plugin holds no data on its own — you control all API keys and provider choices. = Can I customize the chatbot appearance? = Yes. Six preset themes (Indigo, Ocean, Emerald, Rose, Amber, Slate) plus custom color pickers, border radius adjustment, and a live preview in settings. You can also configure quick replies, canned responses, and a pre-chat form. = What is WordPress Autopilot? = An administrator-only AI agent that executes WordPress tasks through the chat interface. Supported commands include creating posts and pages, listing content, checking for plugin/theme/core updates, finding broken images, clearing cache, and retrieving site statistics. All actions are logged for review. == Screenshots == 1. Settings page — Provider configuration, API keys, widget settings, and feature toggles 2. Query Logs — Searchable conversation history with response types and FAQ linking 3. Conversations — Session-based conversation viewer with message threading 4. Low Confidence Queries — AI answers below threshold with create-FAQ actions 5. Sentiment Analytics — Emotion distribution (happy, frustrated, confused) with time range filters 6. Learning Dashboard — Topic clustering, trending topics, auto-FAQ suggestions, and low quality tracking 7. WordPress Autopilot — Available commands, activity log, and site management stats 8. Sentient Insights — Priority-ranked recommendations with action suggestions 9. Train Assistant — Content type selection, field configuration, and training data preview 10. Import FAQs — CSV upload with format instructions and tips == External Services == This plugin connects to external AI service providers to generate intelligent chatbot responses. You must configure API credentials for your chosen provider. **Local Brain mode sends no data to external services.** === OpenAI === * **Service Purpose**: Provides AI-powered responses through OpenAI's GPT models and Assistants API * **Data Sent**: User queries, conversation history, and your configured assistant context * **When Data is Sent**: When a user submits a question that doesn't match an existing FAQ * **API Endpoints Used**: https://api.openai.com/v1/chat/completions, https://api.openai.com/v1/threads, https://api.openai.com/v1/assistants * **Terms of Service**: https://openai.com/terms * **Privacy Policy**: https://openai.com/privacy === Claude (Anthropic) === * **Service Purpose**: Provides AI-powered responses using Anthropic's Claude models * **Data Sent**: User queries and conversation history * **When Data is Sent**: When a user submits a question that doesn't match an existing FAQ * **API Endpoints Used**: https://api.anthropic.com/v1/messages * **Terms of Service**: https://www.anthropic.com/legal/consumer-terms * **Privacy Policy**: https://www.anthropic.com/legal/privacy === Google Gemini === * **Service Purpose**: Provides AI-powered responses using Google's Gemini models * **Data Sent**: User queries and conversation history * **When Data is Sent**: When a user submits a question that doesn't match an existing FAQ * **API Endpoints Used**: https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent * **Terms of Service**: https://policies.google.com/terms * **Privacy Policy**: https://policies.google.com/privacy === OpenRouter === * **Service Purpose**: Provides access to multiple AI models through a unified API * **Data Sent**: User queries, conversation history, and FAQ context * **When Data is Sent**: When a user submits a question that doesn't match an existing FAQ * **API Endpoints Used**: https://openrouter.ai/api/v1/chat/completions * **Terms of Service**: https://openrouter.ai/terms * **Privacy Policy**: https://openrouter.ai/privacy === Hugging Face === * **Service Purpose**: Provides access to open-source AI models * **Data Sent**: User queries and conversation history * **When Data is Sent**: When a user submits a question that doesn't match an existing FAQ * **API Endpoints Used**: https://api-inference.huggingface.co/models/{model} * **Terms of Service**: https://huggingface.co/terms-of-service * **Privacy Policy**: https://huggingface.co/privacy == Changelog == = 2.26.0 = * **New: Smart Auto-Reply Suggestions** — AI generates 2-3 context-aware follow-up question chips after every bot response. Suggestions use sentiment, topic, query keywords, and reply content for relevance * **New: Context-Aware Suggestion Engine** — `generate_suggested_questions()` method in API_Handler uses sentiment-based, topic-based, WooCommerce-aware, and keyword-based patterns to produce relevant follow-ups * **Update: Chatbot Frontend** — `appendMessage()` now renders clickable suggestion chips below bot messages. Clicking a chip populates the input and sends immediately * **Update: API Response Format** — All 11 response paths now include `suggested_questions` key in JSON payload * **Update: Follow-Up Chip Styling** — Chips use filled primary color hover with white text and subtle shadow for clear interactivity. Long text wraps at word boundaries within 220px max-width = 2.25.0 = * **New: Token & Cost Tracking Dashboard** — SVG usage chart with 7/30/90 day period selector for daily token consumption and estimated cost * **New: Budget Alerts** — Configurable spending limits with visual progress bar on dashboard. Set daily/weekly/monthly thresholds * **New: Model Breakdown Table** — Per-provider, per-model token/cost/requests breakdown on dashboard * **New: Cost-per-Query Stat** — Average cost per AI request shown on dashboard * **New: CSV Export** — One-click export of usage data with provider, model, tokens, cost, latency columns * **New: Enhanced Usage Stats** — Daily activity table now shows tokens, cost, and average latency columns * **Update: Logger::get_usage_by_model()** — New method for model-level usage analytics = 2.20.1 = * **Fix: Token tracking pipeline** — Provider clients (OpenAI, Claude, Gemini, OpenRouter, HuggingFace) now return usage data from API responses; Failover_Handler accepts success arrays; API_Handler uses correct token keys * **Fix: GEO Scanner schema detection** — Auto-generated schemas from post publish now use consistent `_schema_type`/`_schema_data` meta keys, making them visible to GEO scoring * **Fix: GEO Scanner FAQ quick fix** — Generates JSON-LD schema instead of microdata; stores `_schema_data` for proper scoring; uses hidden `
` element instead of visible placeholder text * **Fix: GEO Scanner HowTo detection** — HowTo quick fix now only offered when content contains step-by-step patterns (numbered headings, "Step 1", sequential language) * **Fix: GEO Scanner i18n** — Word count now uses Unicode-aware regex for CJK, Arabic, Hindi, and other non-Latin scripts * **Fix: GEO Scanner security** — Scan action now requires nonce verification to prevent unauthorized database writes * **Fix: Database migration** — Logs table columns added automatically on upgrade (previously required table recreation) = 2.22.0 = * **New: SEO/GEO/AEO Positioning** — Plugin rebranded as "WordPress SEO Domination: AI-Powered GEO, AEO, Schema & Semantic Search". Chatbot is now positioned as a bonus feature, not the main focus * **New: SEO-Optimized Product Responses** — HTML-formatted product responses with semantic markup (schema.org attributes) for search engine indexing * **New: JSON-LD Schema for Product Search** — Automatic ItemList + Product schema generation for multi-product search results and comparisons * **New: AEO-Optimized Formatting** — Featured snippet-ready response format with direct answers, ordered lists, and comparison tables * **New: GEO Scanner Product Analysis** — Extended GEO scanner to analyze WooCommerce products with 10 product-specific factors (description, images, attributes, categories, tags, reviews, price, SKU, FAQ) * **New: Schema Injection** — Chatbot responses automatically inject JSON-LD schema into page head for search engine indexing * **New: Product Response HTML Rendering** — Chatbot frontend renders semantic HTML for product responses instead of plain text * **Update: WooCommerce_Integration** — Added format_product_response_html(), format_multi_product_response_html(), format_comparison_response_html(), generate_product_list_schema(), generate_comparison_schema() methods * **Update: API_Handler** — Product responses now include reply_html and schema_json fields for SEO optimization * **Update: chatbot.js** — Added injectSchemaJsonLd() function and updated appendMessage() to render HTML for product responses * **Update: chatbot.css** — Added styles for product cards, comparison tables, and AEO-optimized layouts = 2.23.0 = * **New: FAQ Gutenberg Block** — Native Gutenberg block for creating FAQ sections with questions and answers. Supports accordion, tabs, and simple list layouts with search functionality * **New: FAQ Schema Auto-Generation** — FAQ block automatically outputs FAQPage JSON-LD schema in wp_head for rich results * **New: Graph Relation Output** — Connected @graph schema linking Organization, WebSite, and content schemas with @id references * **New: Organization Schema Settings** — Admin settings for Organization name, logo, URL, type, and social profiles * **New: WebSite Schema with SearchAction** — Automatic WebSite schema with sitelinks search box for Google * **New: Enhanced Rich Results Validator** — Added recommended properties array with required/recommended badges and completeness scoring * **New: Three-tier Site-wide Audit** — Schema dashboard now shows Valid/Warning/None classification with completeness percentages * **New: FAQ Block Editor Styles** — Editor-specific styles for the FAQ block with visual feedback * **New: FAQ Block Frontend Styles** — Responsive frontend styles with accordion, tabs, and list layouts * **Update: Schema_Generator** — Added build_schema_graph(), get_organization_schema(), get_website_schema(), output_site_graph() methods * **Update: FAQ_Manager** — Added register_faq_block(), enqueue_block_assets(), render_faq_block(), render_faq_item_block(), output_faq_schema() methods * **Update: validate_schema()** — Now returns property-level detail with status, message, and level (required/recommended) * **Update: get_schema_status()** — Now includes valid, warning, and none counts for three-tier classification = 2.24.1 = * **Fix: GEO Scanner form submission** — Fixed malformed input, missing nonce, and score display issues * **Fix: Autopilot intent classification** — classify_intent now correctly matches direct action names (list_posts, check_updates, etc.) * **Fix: check_updates command** — Fixed missing includes and function name compatibility for WP 7.0.2 * **Fix: list_posts command** — Now shows up to 100 posts with total count * **Fix: Schema deletion** — Replaced AJAX with proper form POST + nonce + admin_post handler * **Fix: Schema SQL queries** — INNER JOIN now excludes posts without schema; empty types filtered out * **Fix: API key preservation** — API keys no longer vanish when saving from non-provider tabs * **Fix: Provider status badges** — Dynamic green/gray/red badges now reflect actual working provider state * **Fix: Provider card active state** — Active badge now matches the last working provider (via failover) * **Fix: Failover settings layout** — Content no longer renders outside the card-body container * **Fix: Failover provider display** — General tab now shows a dynamic "Failover active" notice when a different provider is handling requests, matching the AI Providers tab status * **Fix: Autopilot execution safety** — Added try/catch safety net to prevent fatal errors * **Fix: Provider tab field styling** — Fixed Delay and Welcome Message field styling on the providers page = 2.24.0 = * **New: SERP Preview in Post Editor** — Google search result card preview directly in the post editor meta box. Shows title, URL, description, and rich result previews for FAQ, Product, HowTo, and Article schemas * **New: Live SERP Preview** — SERP preview updates in real-time as you edit post title and excerpt * **New: Rich Result Previews** — Visual previews for FAQ dropdowns, Product cards, HowTo steps, and Article cards * **New: Validation Details Panel** — Post editor meta box now shows completeness percentage, errors, and warnings inline * **New: FAQ Block JavaScript** — Rewrote FAQ block JavaScript to use plain WordPress API instead of JSX for better compatibility * **Update: Schema_Generator** — Enhanced render_schema_meta_box() with SERP preview and validation details * **Update: FAQ_Manager** — Fixed block registration to use block.json files and proper script enqueuing = 2.21.0 = * **New: Enhanced Product Search** — Multi-result product search with natural language filter parsing. Find products by color, size, brand, price range, category, and sort order * **New: Product Comparison** — Compare products side by side with "compare X and Y" or "X vs Y" queries. Shows price, rating, stock, and attribute differences with best value indicators * **New: Attribute Filtering** — Filter products by any WooCommerce attribute (color, size, brand, material, etc.) using natural language like "red shoes under $50" or "Nike size 10" * **New: Store Filters API** — New methods to retrieve available categories, attributes, and price ranges for the store * **New: Product Suggestions** — Get product suggestions based on partial input for autocomplete functionality * **New: Comparison Detection** — AI detects comparison intent in queries (compare, vs, versus, difference between, which is better) * **New: Filtered Search Detection** — AI detects filtered search intent (under/over price, color/size/brand mentions, sort keywords) * **Update: WooCommerce_Integration** — Added search_products(), compare_products(), suggest_products(), get_store_filters(), detect_comparison_query(), is_filtered_search(), parse_search_filters() methods * **Update: API_Handler** — Product query handling now checks for comparison and filtered search before single product lookup = 2.20.0 = * **New: AI Provider Failover** — Automatic fallback chain when primary AI provider fails. Configure failover order, skip providers without API keys, and log failover events * **New: Token & Cost Tracking** — Database logging of token usage, provider, model, latency, and estimated cost per AI request. Dashboard displays monthly totals and per-provider breakdowns * **New: Scheduled Log Cleanup** — WP-Cron job to automatically purge old log entries. Configurable retention period (7-365 days), optional file log clearing, manual cleanup button * **New: Settings Import/Export** — Export all plugin settings as JSON and import from file. Supports full configuration transfer between sites * **New: Dashboard Token Stats** — Three new dashboard cards showing monthly tokens used, estimated cost, and average latency * **New: Provider Usage Breakdown** — Dashboard card showing per-provider token usage, cost, and request count * **New: Provider Status Indicators** — Failover settings section shows API key status for all providers with color-coded badges * **New: Auto-Generate Schema** — Automatically generate schema when posts are published for the first time. Configurable per post type * **New: Schema Post Type Mapping** — Set default schema type for each WordPress post type (Post→Article, Page→WebPage, Product→Product) * **New: Enhanced WooCommerce Schema** — Product schema now includes aggregateRating, brand, SKU, and offer data when available * **Update: API_Handler** — Refactored to use Failover_Handler for provider routing with automatic retry * **Update: Logger** — Extended database schema with tokens_used, provider, model, latency_ms, and estimated_cost columns = 2.19.0 = * **New: Schema Markup Generator** — AI-powered JSON-LD schema generation for posts and pages. Supports 16 schema types (Article, FAQPage, HowTo, Product, LocalBusiness, Event, Organization, Person, VideoObject, BreadcrumbList, and more) * **New: Three generation modes** — AI mode (uses OpenAI/Claude/Gemini), Auto mode (rule-based, no API key needed), and Manual mode (edit JSON-LD directly) * **New: Schema validation** — Real-time validation of JSON-LD markup against schema.org requirements with required property checks * **New: Post Editor meta box** — Schema status, type selector, and one-click AI/Auto generate buttons directly in the post editor sidebar * **New: SERP Preview** — Google search result preview in the schema editor showing title, URL, description, and rich result previews for FAQ and Product schemas * **New: Dashboard stats** — Schema Markup overview (posts with/without schema, type breakdown) and GEO Scanner overview (average score, last scan) cards on the main Sentient AI dashboard * **New: Schema Generator admin page** — Dedicated Tools sub-tab with schema dashboard, per-post editor, bulk generation, and type filtering * **New: Admin chat commands** — Autopilot Agent now supports "generate schema", "schema status", and "validate schema" commands * **New: Frontend JSON-LD output** — Automatic `