Gregius Data – Providers – Databases and AI Models

Overview

Gregius Data’s provider abstraction layer gives site administrators a single interface for configuring database backends and AI services. PostgreSQL connections and external AI APIs all route through the same subsystem — choose the setup that fits your hosting environment and workflow.

Prerequisites

  • Gregius Data plugin installed and activated
  • At least one database connection configured (PostgreSQL or PostgREST/Supabase)
  • API keys for any AI providers you plan to use

Database Providers

The database provider subsystem gives you two ways to connect Gregius Data to a PostgreSQL database. Both implement the same interface, so upstream features like sync, search, and the RAG pipeline work identically regardless of which provider you choose.

PostgreSQL (PDO)

Connects directly to PostgreSQL using the pdo_pgsql PHP extension. Native pgvector support for semantic search.

  • Requires the pdo_pgsql PHP extension on your server
  • Native pgvector support for semantic search
  • Ideal for VPS, dedicated, and cloud hosting with database TCP access
  • Ask your hosting provider to enable the extension if not already available

PostgREST (REST)

Connects to PostgreSQL through the Supabase REST API (PostgREST). Uses the WordPress HTTP API for all communication.

  • No PHP database extensions required
  • Works on any WordPress hosting environment, including shared hosting
  • Uses wp_remote_post() for all outbound requests
  • RPC functions handle bulk operations and complex queries efficiently
  • Supports postgresql and supabase as alias type names (both resolve to the same provider)

AI Model Providers

Gregius Data ships with seven built-in AI providers covering text generation, embedding, and reranking capabilities. All providers are registered with the AI provider registry and are available for use by the RAG pipeline and other plugin features.

LLM Providers

These providers handle text generation and conversation:

ProviderModelsCapabilities
OpenAIGPT-4o, GPT-4o-mini, o-seriesLLM, tool calling
AnthropicClaude 3/4 seriesLLM, tool calling
Google GeminiGemini 1.5/2.0 seriesLLM, embeddings, tool calling
DeepSeekDeepSeek V2/V3LLM, tool calling

Embedding and Reranking Providers

ProviderPurpose
Voyage AIEmbeddings and reranking
CohereReranking

Internal Embedding Models

Gregius Data ships two free local embedding models that require no API keys or external service accounts.

TF-IDF 300D

Model key: tfidf-300 — 300-dimensional vectors using term frequency-inverse document frequency. Requires a corpus vocabulary to be generated before use, which provides accurate IDF weighting. Ideal for sites that have enough content to build a meaningful vocabulary.

HashingTF Murmur3 1024D

Model key: hashingtf-murmur3-1024 — 1024-dimensional vectors using PHP-native MurmurHash3 feature hashing. Stateless — no vocabulary needed, usable immediately after schema creation. Uses signed hash bucket assignment and field-type weighting (title 1.5×, excerpt 1.2×, chunk 1.0×) with L2 normalization.


How to: Configure a Connection

Add a Connection

  • Navigate to Gregius Data > Connections in the WordPress admin.
  • Click Add New Connection.
  • Enter a name for the connection (for example, default or production-db).
  • Select the provider type:
  • PostgreSQL for direct PDO access
  • PostgREST for Supabase HTTP access
  • Fill in the connection details (host, credentials, project URL).
  • Save the connection.

Test a Connection

After saving, use the Test Connection button to verify the provider can reach the backend. The test runs a simple connectivity check and returns a success or error message.

  • For PostgreSQL providers, this attempts a PDO connection and runs a SELECT 1 query.
  • For PostgREST providers, this calls the health endpoint via HTTP.

If the test fails, check credentials, network access, and PHP extension availability.

Choose a Provider

If you need…Use
Direct PostgreSQL accessPostgreSQL (PDO) – requires the pdo_pgsql PHP extension. Ask your host to enable it if not already available.
HTTP-based access that works on any hostingPostgREST (Supabase) – no PHP extensions required. Works on shared hosting, managed WordPress, and environments without database TCP access.
External AI text generation (LLM)OpenAI, Anthropic, Gemini, or DeepSeek
External embeddings or rerankingVoyage AI (embeddings + reranking) or Cohere (reranking)
Local embeddings, accurate IDF weightingTF-IDF 300D (tfidf-300) – requires corpus vocabulary
Local embeddings, zero setupHashingTF Murmur3 1024D (hashingtf-murmur3-1024) – stateless, no vocabulary needed

Permissions

FunctionWho can use it
View provider configurationsAdministrators only
Add, edit, or delete connectionsAdministrators only
Test a connectionAdministrators only
Use AI providers via the RAG pipelineDepends on ability permissions

Next Steps

View on GitHub: You can review, fork, and inspect the entire codebase and core logic over at the repository on GitHub.

Gregius Data is the open-source AI orchestration layer for WordPress.