인공 지능콘텐츠마케팅마케팅 도구

FastBots: AI 봇 훈련을 위한 맞춤형 WordPress XML 사이트맵 구축

Martech Zone 수천 개의 기사가 있으며 그 중 상당수는 오래된 것입니다. 나는 수백 개의 기사를 제거하거나 업데이트하기 위해 수년 동안 사이트에서 일해왔지만 여전히 더 많은 기사가 있습니다. 동시에 내 콘텐츠로 자연어 봇을 훈련시키고 싶지만 오래된 기사를 대상으로 훈련시키고 싶지는 않습니다.

패스트봇 하는 ChatGPT사이트맵(또는 기타 옵션)을 사용하여 처음에 훈련할 수 있는 강력한 봇 빌더입니다. 특정 날짜 이후 수정된 모든 기사를 포함하는 필터링된 사이트맵이 필요했습니다. 또한 내 페이지와 줄임말 (사용자 정의 게시물 유형). 카테고리와 태그에 대한 아카이브 페이지를 포함하고 싶지 않았으며 홈 페이지도 아카이브이기 때문에 포함하고 싶지 않았습니다.

이 글의 마지막 부분에 제공되는 코드를 사용하세요. 나는 사용자 정의를 생성하는 사용자 정의 WordPress 플러그인을 만들었습니다. XML 게시물을 게시할 때마다 동적으로 새로 고쳐지는 사이트맵입니다. FastBots에는 각 기사를 게시할 때 자동화된 재교육 방법이 없지만 이것이 플랫폼 사용을 위한 훌륭한 출발점이 됩니다.

사이트맵은 교육을 위한 모든 링크를 가져옵니다. AI 봇 사용:

FastBots: 사이트 사이트맵에서 봇을 훈련시킵니다.

이제 모든 페이지를 가져왔으며 해당 데이터에 대해 봇을 교육할 수 있습니다. 특정 페이지를 제거할 수도 있습니다. 또한 FastBots를 사용하면 AI 봇의 브랜딩을 사용자 정의하고 응답에 관련 기사에 대한 링크를 포함할 수도 있었습니다. 플랫폼에는 리드 요청도 내장되어 있습니다.

플랫폼은 완벽하게 작동했습니다. 여기에서 내 봇을 테스트해 볼 수 있습니다.

실행 Martech Zone의 봇, 마티 FastBots AI 봇 구축

맞춤 XML 사이트맵

이 기능을 내 테마에 추가하는 대신 사용자 정의를 만들었습니다. 워드프레스(WordPress) Sitemap을 구축하기 위한 플러그인입니다. 플러그인 폴더에 디렉토리를 추가한 다음 PHP 다음 코드가 포함된 파일:

<?php
/*
Plugin Name: Bot Sitemap
Description: Dynamically generates an XML sitemap including posts modified since a specific date and updates it when a new article is added.
Version: 1.0
Author: Your Name
*/

// Define the date since when to include modified posts (format: Y-m-d)
$mtz_modified_since_date = '2020-01-01';

// Register the function to update the sitemap when a post is published
add_action('publish_post', 'mtz_update_sitemap_on_publish');

// Function to update the sitemap
function mtz_update_sitemap_on_publish($post_id) {
    // Check if the post is not an auto-draft
    if (get_post_status($post_id) != 'auto-draft') {
        mtz_build_dynamic_sitemap();
    }
}

// Main function to build the sitemap
function build_bot_sitemap() {
    global $mtz_modified_since_date;

    $args = array(
        'post_type' => 'post',
        'date_query' => array(
            'column' => 'post_modified',
            'after'  => $mtz_modified_since_date
        ),
        'posts_per_page' => -1 // Retrieve all matching posts
    );

    $postsForSitemap = get_posts($args);

    // Fetch all 'acronym' custom post type posts
    $acronymPosts = get_posts(array(
        'post_type' => 'acronym',
        'posts_per_page' => -1,
    ));

    // Fetch all pages except the home page
    $pagesForSitemap = get_pages();
    $home_page_id = get_option('page_on_front');

    $sitemap = '<?xml version="1.0" encoding="UTF-8"?>';
    $sitemap .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';

    foreach($postsForSitemap as $post) {
        setup_postdata($post);
        if ($post->ID != $home_page_id) {
            $sitemap .= '<url>'.
                          '<loc>'. get_permalink($post) .'</loc>'.
                          '<lastmod>'. get_the_modified_date('c', $post) .'</lastmod>'.
                          '<changefreq>weekly</changefreq>'.
                        '</url>';
        }
    }

    foreach($acronymPosts as $post) {
        setup_postdata($post);
        if ($post->ID != $home_page_id) {
            $sitemap .= '<url>'.
                          '<loc>'. get_permalink($post) .'</loc>'.
                          '<lastmod>'. get_the_modified_date('c', $post) .'</lastmod>'.
                          '<changefreq>weekly</changefreq>'.
                        '</url>';
        }
    }

    foreach($pagesForSitemap as $page) {
        setup_postdata($page);
        if ($page->ID != $home_page_id) {
            $sitemap .= '<url>'.
                          '<loc>'. get_permalink($page) .'</loc>'.
                          '<lastmod>'. get_the_modified_date('c', $page) .'</lastmod>'.
                          '<changefreq>monthly</changefreq>'.
                        '</url>';
        }
    }

    wp_reset_postdata();

    $sitemap .= '</urlset>';

    file_put_contents(get_home_path().'bot-sitemap.xml', $sitemap);
}

// Activate the initial sitemap build on plugin activation
register_activation_hook(__FILE__, 'build_bot_sitemap');

Douglas Karr

Douglas Karr 의 CMO입니다. 오픈인사이트 그리고 설립자 Martech Zone. Douglas는 수십 개의 성공적인 MarTech 스타트업을 도왔고, Martech 인수 및 투자에서 5억 달러가 넘는 실사를 도왔으며, 기업이 판매 및 마케팅 전략을 구현하고 자동화하도록 지속적으로 지원하고 있습니다. Douglas는 국제적으로 인정받는 디지털 혁신이자 MarTech 전문가이자 연설가입니다. Douglas는 Dummie's Guide와 비즈니스 리더십 서적을 집필한 작가이기도 합니다.

관련 기사

맨 위로 가기 버튼
닫기

애드블록 감지됨

Martech Zone 은(는) 광고 수익, 제휴 링크 및 후원을 통해 사이트에서 수익을 창출하기 때문에 이 콘텐츠를 무료로 제공할 수 있습니다. 사이트를 볼 때 광고 차단기를 제거해 주시면 감사하겠습니다.