Jump to content

Recommended Posts

Posted

Hi everyone,

I’m releasing Liora, a ProcessWire module that turns unanswered searches and incomplete content pages into useful conversations — and turns those conversations into actionable editorial demand.

Most site search ends in one of two places: a list of matching pages, or an empty result. That works when the visitor already knows the right words and the database contains an exact match. It is less useful when the real question is comparative, contextual or incomplete: “Which bottle fits this occasion?”, “What does this term mean?”, “What should I try next?”, or simply “I expected to find something here.”

Liora adds a second path. It can answer the question, continue with follow-ups, ground the answer in public site content, and record the complete demand signal so an editor can improve the underlying website later.

Liora

How it works in practice

I am already using Liora on LQRS, a large ProcessWire drinks-discovery site.

1. Search no longer stops at “no results”

A search such as smoky whisky from Scotland currently has no direct structured record matching the complete phrase. The normal ProcessWire results correctly say that no direct match exists.

On the same page, Liora produces a concise AI overview, explains the relevant styles and regions, and links to useful internal sources such as the Scotch Whisky collection and Highlands region. The visitor can then ask a follow-up without starting again.

This is important: Liora does not replace the deterministic search results or pretend that a generated answer is a canonical database record. The page shows both layers clearly — a conversational overview and the actual structured matches.

2. A content page can answer the next question

At the bottom of selected collection and discovery pages, Liora appears as an “Ask about this collection” surface. The widget knows the current ProcessWire page and can use relevant Atlas excerpts and published Vox discussions when those integrations are enabled.

A static collection therefore becomes a useful starting point for questions about selection, comparison, terminology or pairings, while the original page remains the source of truth.

3. A 404 becomes a recovery path

On the LQRS 404 page, Liora asks what the visitor expected to find. It can help locate a product, recipe, article or guide instead of leaving the visitor at a dead end.

4. Questions become an editorial backlog

Every tracked frontend conversation appears in Setup → Liora Insights. Editors can see repeated unmet searches, the source page, referrer, conversation history, status, model, response time, token usage, cache state, retrieval sources and failures.

This is the part I find most useful. The generated answer is immediate help for one visitor; the collected demand shows what the site should fix for everyone. Repeated questions can become better structured data, a missing product page, a clearer explanation, a new guide, improved navigation or a search synonym.

What Liora includes

  • A reusable frontend conversation widget and InputfieldLiora.
  • Normal JSON responses and real-time streamed responses.
  • One tracked Thread per visitor conversation with chronological messages.
  • Follow-up continuity that preserves recent constraints.
  • Automatic page, source and referrer attribution.
  • Setup → Liora Insights for review, diagnostics and editorial status.
  • Repeated unmet-demand reporting.
  • Optional Atlas retrieval from indexed public site content.
  • Optional published Vox reviews, questions, replies and discussions.
  • Optional live public search through compatible Squad providers.
  • Optional coarse GeoIP enrichment.
  • Validated light and dark themes.
  • Safe Markdown rendering and verified same-site links.
  • Localized widget text and ready-made language presets.
  • A tracked JSON endpoint for completely custom frontends.
  • Public PHP APIs for direct application use.

Architecture

Liora deliberately does not store provider credentials or implement low-level AI transport. That remains the responsibility of Squad.

  • Liora owns conversations, tracking, retrieval orchestration, the widget and Insights.
  • Squad owns providers, credentials, model discovery, requests and streaming transport.
  • Atlas can supply excerpts from indexed public site content.
  • Vox can supply published community evidence attached to relevant pages.
  • ProcessWire remains responsible for pages, permissions, sessions, localization and persistence.

Atlas, Vox, GeoIP and live web search are optional. Liora works with Squad alone and fails back cleanly when an optional context source is unavailable.

Basic integration

<?php namespace ProcessWire;

if($modules->isInstalled('Liora')) {
    $liora = $modules->get('Liora');

    echo $liora->renderWidget([
        'context' => $page->template->name,
        'sourceUrl' => $page->url,
        'pageId' => $page->id,
        'heading' => 'Still looking? Ask Liora',
        'theme' => 'default',
    ]);
}

The tracked endpoint itself can remain deliberately thin:

<?php namespace ProcessWire;

$modules->get('Liora')->handleEndpoint();

The consuming site decides where the widget belongs. Liora never inserts itself automatically and does not take over routes, content models or publishing decisions.

Privacy and safety

  • Provider credentials remain in Squad.
  • Raw model HTML is never trusted.
  • Atlas excerpts, community content and web results are treated as untrusted reference material.
  • Same-site links are validated; external destinations can be restricted.
  • CSRF protection, rate limits and conversation ownership checks apply to the tracked endpoint.
  • Liora stores a hashed session owner, not a plaintext session identifier.
  • Raw IP addresses and browser user agents are not stored.
  • Conversation review and destructive actions use separate ProcessWire permissions.
  • Stored conversations are preserved on uninstall by default unless destructive uninstall is explicitly enabled.

Requirements

  • ProcessWire 3.0.210 or newer
  • PHP 8.1 or newer
  • An installed and configured Squad module
  • A ProcessWire endpoint page for tracked frontend conversations

Installation

  1. Copy the Liora directory to /site/modules/Liora/.
  2. Refresh modules in ProcessWire and install Liora.
  3. Configure at least one active provider in Squad.
  4. Review the model, prompt, widget, retrieval, privacy and retention settings.
  5. Create or reuse the JSON endpoint page and keep its URL synchronized with Liora configuration.
  6. Add the widget, Inputfield or custom frontend only where it belongs in the site architecture.

Live examples

Links

I would especially appreciate feedback about where this pattern is useful outside search: documentation, support, directories, product catalogues, knowledge bases and editorial sites — and how you would turn real visitor questions into better ProcessWire content.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...