Directory / plugin
GPT Comment Agent
v1.1.0 · by DongHa
Draft grounded AI comments using Markdown rules, local post retrieval and optional free Wikipedia search.
About this plugin
GPT Comment Agent drafts comments and blog posts for editors to review. It combines administrator-authored Markdown rules, a local retrieval index of published posts/pages, and optional Korean Wikipedia search. Google CSE credentials and network integration have been removed.
The plugin does not automatically publish generated text. Existing comment insertion and editor insertion controls remain available.
Local RAG
Full public post/page bodies and excerpts are indexed in 1,200-character chunks with 160-character overlap. UTF-8 Korean content is preserved. A local lexical relevance score searches across the indexed chunks, giving additional weight to title matches. No external embedding API or vector database is required. This is keyword-based retrieval, not semantic embedding search.
Each comment request uses up to four matching chunks from the current post and additional matching site chunks, up to twelve total. The generation prompt also includes a short current-post overview and recent approved comments. Long documents are not fully transmitted on every request: the complete eligible text is indexed, and only retrieved passages are sent. Retrieval cannot guarantee that every relevant fact is found.
Only published, password-free posts and pages are eligible. Private, draft, trashed and password-protected posts are excluded even if older chunks exist. Post updates and deletion refresh the index. Attachments, custom fields, custom post types, dynamically rendered shortcodes and remote media are not indexed. Inline block text is indexed without executing blocks or shortcodes.
Existing posts are processed in batches of ten via WP-Cron. The settings page shows stored chunk count, progress, errors, and rebuild/continue buttons. Sites with disabled WP-Cron must use the continue control or configure normal WordPress cron execution. Index data is local to the WordPress database and removed when the plugin is uninstalled.
Markdown rules
A default rules/comment-principles.md is included. Administrators can download it, edit it, and register a UTF-8 .md file up to 32KB in Settings > GPT Comment Agent. Registration replaces the current rules. Imported content is stored as a non-autoloaded option, not a publicly accessible media upload. Only administrators can register/reset rules. Do not include secrets: these rules are sent to OpenAI when generating content.
Search
Local retrieval is always used. Optional Korean Wikipedia search returns up to three article snippets using the public MediaWiki API, without an API key or per-query plugin fee. It is background knowledge assistance, not full-web search. Requests have timeouts, a 15-minute query cache and a short failure cooldown. If Wikipedia fails, available local results remain usable. OpenAI generation still requires your API key and incurs the provider’s usage charges.
External services
OpenAI Responses API (https://api.openai.com/v1/responses): when an authorized editor explicitly generates content, the plugin sends the input prompt, tone, administrator rules, current post overview, metadata, recent approved comments, selected public site passages and any Wikipedia snippets. The API key is sent in the Authorization header. Responses use store=false; provider retention policies still apply. No OpenAI request is made during indexing or ordinary page views.
Terms: https://openai.com/policies/terms-of-use/
Privacy: https://openai.com/policies/privacy-policy/
API keys are stored in the WordPress options database; they are not encrypted by this plugin. Protect database backups and administrator access.
Wikimedia / Korean Wikipedia (https://ko.wikipedia.org/w/api.php): disabled by default and enabled with an administrator checkbox. On explicit generation requests, the current post title (comments) or entered keyword (blog drafts) is sent as a search query. The site server IP is visible to Wikimedia. Post bodies and Markdown rules are not sent to Wikipedia. Snippets are cached locally for fifteen minutes, and source links are displayed. Observe Wikimedia usage limits and attribution requirements; service availability is not guaranteed.
Terms: https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use
Privacy: https://foundation.wikimedia.org/wiki/Policy:Privacy_policy
API documentation: https://www.mediawiki.org/wiki/API:Search