PHPackages                             kanopi/semantic-knowledge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. kanopi/semantic-knowledge

ActiveWordpress-plugin[Search &amp; Filtering](/categories/search)

kanopi/semantic-knowledge
=========================

Semantic search and knowledge management for WordPress using RAG (Retrieval-Augmented Generation)

00PHPCI passing

Since Feb 5Pushed 3mo agoCompare

[ Source](https://github.com/kanopi/semantic-knowledge)[ Packagist](https://packagist.org/packages/kanopi/semantic-knowledge)[ RSS](/packages/kanopi-semantic-knowledge/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Semantic Knowledge
==================

[](#semantic-knowledge)

AI-powered chatbot and semantic search for WordPress using RAG (Retrieval-Augmented Generation).

Features
--------

[](#features)

- 🤖 AI-powered chatbot with conversation history
- 🔍 Semantic search using vector embeddings
- 🚀 Built on OpenAI and Pinecone
- 🎨 Customizable UI components
- ♿ WCAG 2.1 Level AA accessible
- 🔧 Easy configuration via WordPress admin

Requirements
------------

[](#requirements)

- PHP 8.0+
- Node.js 18+
- WordPress 6.0+
- Composer (for Composer installation)
- OpenAI API key
- Pinecone API key

Installation
------------

[](#installation)

### Method 1: Composer (Recommended - Fully Automated)

[](#method-1-composer-recommended---fully-automated)

```
# Install plugin
composer require kanopi/semantic-knowledge

# Activate plugin
wp plugin activate semantic-knowledge

# Indexer installs automatically during composer install! ✅
```

**Why this works:**

- Plugin's `composer.json` has `post-install-cmd` hook
- Automatically installs indexer into `indexer/node_modules/`
- No manual steps required

### Method 2: WordPress.org

[](#method-2-wordpressorg)

1. Download from WordPress.org (pending approval)
2. Upload to `/wp-content/plugins/` or install via WordPress admin
3. Activate the plugin
4. Install indexer: ```
    wp semantic-knowledge install-indexer
    ```

    Or click **"Install Indexer"** button in WordPress admin

### Method 3: Manual Installation

[](#method-3-manual-installation)

```
# Clone repository
cd wp-content/plugins
git clone https://github.com/kanopi/semantic-knowledge.git
cd semantic-knowledge

# Install PHP dependencies
composer install

# Install Node.js indexer
cd indexer
npm install
```

Configuration
-------------

[](#configuration)

### 1. API Keys

[](#1-api-keys)

Add to `wp-config.php`:

```
define('OPENAI_API_KEY', 'sk-...');
define('PINECONE_API_KEY', 'pcsk_...');
```

Or set via WP-CLI:

```
wp config set OPENAI_API_KEY "sk-..." --type=constant
wp config set PINECONE_API_KEY "pcsk_..." --type=constant
```

### 2. Plugin Settings

[](#2-plugin-settings)

1. Go to **Settings → AI Assistant** in WordPress admin
2. Configure:
    - Pinecone Index Host (e.g., `your-index-123.pinecone.io`)
    - Pinecone Index Name (e.g., `wp-content`)
    - Post Types to index
    - Chunk Size (default: 1000 characters)
    - Embedding Model (default: text-embedding-3-small)

### 3. Index Content

[](#3-index-content)

```
# Index all content
wp sk-indexer index

# Check system requirements
wp sk-indexer check

# View configuration
wp sk-indexer config
```

Usage
-----

[](#usage)

### Chatbot

[](#chatbot)

Add to any page or post using shortcode:

```
[wp_ai_chatbot]

```

Or via block editor: Add the **AI Chatbot** block

### Search

[](#search)

Replace default WordPress search:

```
// In your theme's functions.php
add_filter('wp_ai_assistant_enable_search', '__return_true');
```

Or use the search widget in **Appearance → Widgets**

Development
-----------

[](#development)

### Running Tests

[](#running-tests)

```
# PHP tests
composer test

# Node.js indexer tests
cd indexer/node_modules/@kanopi/wp-ai-indexer
npm test
```

### Code Quality

[](#code-quality)

```
# PHP linting
composer phpcs

# JavaScript linting
npm run lint
```

Troubleshooting
---------------

[](#troubleshooting)

### Indexer Not Found

[](#indexer-not-found)

**Problem:** Plugin shows "Indexer not installed" notice

**Solution:**

```
# Check Node.js
node --version  # Should be 18+

# Install indexer
wp semantic-knowledge install-indexer

# Or manually
cd wp-content/plugins/semantic-knowledge/indexer
npm install
```

### Authentication Errors

[](#authentication-errors)

**Problem:** 401 Unauthorized errors when indexing

**Solution:**

- Verify API keys are set correctly
- Check Pinecone index exists and is active
- Ensure OpenAI API key has sufficient credits

### No Search Results

[](#no-search-results)

**Problem:** Search returns no results

**Solution:**

```
# Re-index content
wp sk-indexer delete-all
wp sk-indexer index

# Check index status
wp sk-indexer config
```

Architecture
------------

[](#architecture)

Built on a modular architecture:

- **WP\_AI\_Core**: Settings and configuration management
- **WP\_AI\_OpenAI**: OpenAI API integration
- **WP\_AI\_Pinecone**: Pinecone vector database integration
- **WP\_AI\_Chatbot\_Module**: Chatbot functionality
- **WP\_AI\_Search\_Module**: Search functionality
- **@kanopi/wp-ai-indexer**: Node.js indexing package (separate npm package)

Documentation
-------------

[](#documentation)

- [Installation Guide](https://github.com/kanopi/semantic-knowledge/wiki/Installation)
- [Configuration](https://github.com/kanopi/semantic-knowledge/wiki/Configuration)
- [API Documentation](https://github.com/kanopi/semantic-knowledge/wiki/API)
- [Troubleshooting](https://github.com/kanopi/semantic-knowledge/wiki/Troubleshooting)
- [Indexer Package](https://github.com/kanopi/wp-ai-indexer)

Contributing
------------

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md)

License
-------

[](#license)

MIT License - see [LICENSE](LICENSE)

Support
-------

[](#support)

- [GitHub Issues](https://github.com/kanopi/semantic-knowledge/issues)
- [Documentation](https://github.com/kanopi/semantic-knowledge/wiki)

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance54

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf9dca5c46910be861bb00920034637b5a36a1f6277413be6817a50a1ce6fc74?d=identicon)[kanopi\_studios](/maintainers/kanopi_studios)

---

Top Contributors

[![thejimbirch](https://avatars.githubusercontent.com/u/5177009?v=4)](https://github.com/thejimbirch "thejimbirch (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

wordpresswordpress-plugin

### Embed Badge

![Health badge](/badges/kanopi-semantic-knowledge/health.svg)

```
[![Health](https://phpackages.com/badges/kanopi-semantic-knowledge/health.svg)](https://phpackages.com/packages/kanopi-semantic-knowledge)
```

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
