This project is not covered by Drupal’s security advisory policy.

Turn your public Drupal content into retrievable knowledge for AI

AI Knowledge Connector helps developers reuse existing public Drupal content in AI features. It extracts supported content into a knowledge index and retrieves relevant excerpts for a request, with information about their source.

Use it when an assistant or agent needs facts from your published pages and you want to reuse a Drupal-native extraction and retrieval pipeline instead of building that plumbing yourself. An optional integration adds these excerpts to Context Control Center (CCC) selections.

Why use this module?

  • Reuse the content you already maintain. Keep public information in Drupal and make indexed excerpts available to AI consumers, without manually pasting pages into each prompt.
  • Reduce custom integration work. Reuse entity extraction, chunking, incremental index tracking, queue processing and a retrieval service across your own AI features.
  • Keep a connection to the source. Retrieved documents include source identifiers, language and revision metadata. The built-in retrieval path checks current source access and freshness before returning excerpts.
  • Add query-based knowledge to CCC. Combine curated context with retrieved public content for explicitly selected consumers, within a configured token budget.

How does it help Context Control Center?

CCC manages curated context items, their scope and their selection for AI consumers. AI Knowledge Connector adds a separate, query-based retrieval path over an indexed public corpus.

Example: your site publishes service descriptions and frequently asked questions. CCC provides the tone and editorial guidance for a reply. The connector retrieves matching excerpts from those public pages and adds them to the allowed consumer's CCC context. The model can then use both the guidance and the retrieved facts when drafting a response.

The integration starts disabled. Administrators explicitly choose which CCC consumers may receive knowledge enrichment and set retrieval and token limits. It preserves the original CCC text, omits excerpts that do not fit, and skips enrichment when the selection contains explicit never-include items.

Retrieved excerpts are temporary context, not new editorial context items saved in CCC. If CCC's existing context items and entity associations already cover your use case, you may not need an additional knowledge index.

When is it a good fit?

  • You are building an AI feature that needs source excerpts from public Drupal content.
  • You use CCC and want query-based retrieval from a separately indexed public corpus.
  • You want a small development setup for testing extraction and retrieval before adding an external embedding provider.
  • You need plugin interfaces for custom extraction, chunking, storage or retrieval.

What does the current alpha provide?

  • Extraction of public entity labels and supported scalar custom fields.
  • Fixed-size text chunking and incremental indexing through Drupal's Queue API.
  • A built-in Drupal database vector store for small development datasets.
  • External embeddings through Drupal AI providers that support the embeddings operation.
  • Source, field-access, publication, translation, revision and freshness checks in the built-in retrieval path.
  • An optional CCC integration using its public selection pipeline.

The built-in local embedding uses deterministic token hashes to test the pipeline; it is not a trained semantic model. Configure a compatible external embedding model when evaluating semantic retrieval.

Scope and limitations

This is an experimental alpha for public knowledge. Private-content retrieval and production-scale performance are outside its supported scope. The local store performs a full scan and is intended for small development datasets.

The module does not include a chatbot interface, a Search API processor, a Qdrant backend or automatic traversal of entity relationships. Search API and AI Search are separate systems and are not required by the base module. Existing AI Search configurations are not automatically reused.

Requirements and getting started

  • Base module: Drupal 11.2 or later within Drupal 11, and PHP 8.3 or later.
  • External embeddings: Drupal AI ^1.5 and a compatible embedding provider, configured with its required credentials.
  • Optional CCC integration: Context Control Center. The adapter has been validated with ai_context 1.0.0-rc1.

The base development setup does not require Drupal AI, a paid AI account or a separate vector database service. External providers may have costs and receive the public text and queries you send to them.

  1. Install and enable ai_knowledge_connector.
  2. Select public source entity types at /admin/config/ai/knowledge. Automatic extraction starts disabled.
  3. Explicitly queue and process the dedicated knowledge index.
  4. Retrieve excerpts through the module's API, or enable and configure ai_knowledge_connector_ccc for selected CCC consumers.

Follow the quickstart for the complete walkthrough. Read the CCC integration guide and the upgrade instructions before updating an existing installation.

This description covers the functionality prepared for 1.0.0-alpha3. See the release list for published packages.

Contributing

Contributions, reproducible bug reports and documentation improvements are welcome. See the contribution guide and issue queue. Please use public test data and keep private content and credentials out of reports.

Project information

Releases