About Wikantik: The Agent-Grade Knowledge Engine

Wikantik is a Semantic Agentic Wiki explicitly designed as a high-signal research substrate where humans and AI agents collaborate seamlessly to build, maintain, and verify a dense knowledge base. It represents a fundamental evolution from traditional wiki software, transforming passive, human-only documentation silos into a machine-readable, programmatically-accessible "Long-Term Memory" engine specifically tuned for Large Language Model (LLM) systems.

In the modern enterprise, standard knowledge management tools fail because they treat text as inert strings. Wikantik treats knowledge as an active graph, combining the historical reliability of a versioned file system with the bleeding-edge capabilities of semantic vector search and the Model Context Protocol (MCP). The result is a self-healing, agent-curated, and human-verified repository that effectively eliminates the "LLM Slop" hallucination problem by grounding generative AI in a mathematically verifiable context.

The Economic Reality of Knowledge Management

Building internal knowledge bases the traditional way is prohibitively expensive and highly inefficient. A mid-sized enterprise might easily spend upwards of $1.2M annually on knowledge management silos, duplicated research, and lost productivity due to unsearchable documentation. Furthermore, attempting to retrofit standard documentation systems for modern AI workflows introduces immense infrastructure costs.

Naive Retrieval-Augmented Generation (RAG) setups that rely on massive, unoptimized standalone vector databases often generate continuous cloud overhead, costing organizations between $50K and $150K per year purely in infrastructure and API transit costs, let alone engineering time. By utilizing a highly optimized, single-tenant hybrid retrieval model integrated directly alongside the data store—and by enforcing optimistic concurrency over complex locking mechanisms—Wikantik drastically reduces these operational costs. Enterprises can deploy an agent-grade memory substrate for under $15K per year in operational expenditure, while providing vastly superior signal-to-noise ratios and enabling deterministic auditing of every agent action.

The Manifesto: Human-Agent Collaboration

The primary mission of Wikantik is to solve the catastrophic "LLM Slop" problem through a rigorous, tiered research and curation model. The system does not assume that AI output is inherently correct; rather, it uses agents for scale and humans for precision.

  1. Agentic Scaffolding: Autonomous agents (such as Gemini-powered CLI tools) perform the initial "heavy lifting." They can tirelessly research across the web, retrieve existing context from the wiki via the knowledge API, cross-reference datasets, and draft highly structured Markdown pages. This allows humans to act as editors rather than raw authors.
  2. The Structural Spine: Every page within Wikantik is mathematically constrained by the Structural Spine—a combination of mandatory YAML frontmatter and strict CommonMark parsing. This ensures the content is highly structured and immediately useful to a downstream RAG system, while remaining perfectly readable to a human.
  3. Human Vetting: Any content generated by an AI is immediately flagged as "auto-generated" or "draft." A human domain expert then reviews the facts, tightens the prose, verifies the citations, and resolves any ambiguities.
  4. Verification Stamping: Once vetted, a page is marked as Verified (authoritative) via a cryptographically secure signature or administrative stamp. This creates an explicit "Web of Trust" within the knowledge base. In future retrieval tasks, agents can prioritize verified documents over unverified ones, creating a positive feedback loop of increasing dataset quality.

Real-World Application: Pharmaceutical Research

Consider a research team at a pharmaceutical company utilizing Wikantik to ingest and synthesize clinical trial data. Instead of human researchers spending weeks reading thousands of trial reports, an orchestrated fleet of agents ingests the PDFs, extracts the core methodologies and outcomes, and drafts hundreds of structured Wikantik pages. The agents link adverse effects to chemical compounds within the knowledge graph. The human researchers then review these synthesized pages, correcting any hallucinations and applying the "Verified" stamp. The company saves tens of thousands of dollars in research time and maintains a mathematically precise, agent-queryable database of clinical outcomes.

The Mathematical Foundations of Hybrid Retrieval

At its core, Wikantik relies on a highly sophisticated hybrid retrieval engine that combines the exact-match precision of Lexical Search with the contextual understanding of Semantic Search.

For lexical matching, Wikantik utilizes Apache Lucene implementing the standard Okapi BM25 algorithm. BM25 is highly effective for keyword-heavy queries (e.g., searching for a specific product ID or exact chemical name). The BM25 scoring function for a document D and a query Q (containing terms q_i) is defined as:

\text{score}(D, Q) = \sum_{i=1}^{n} \text{IDF}(q_i) \cdot \frac{f(q_i, D) \cdot (k_1 + 1)}{f(q_i, D) + k_1 \cdot \left(1 - b + b \cdot \frac{|D|}{\text{avgdl}}\right)}

Where:

For semantic matching, Wikantik uses dense vector embeddings stored via pgvector. Text chunks are embedded into a high-dimensional space (e.g., d=768 or d=1536), and relevance is calculated using Cosine Similarity:

\text{sim}(u, v) = \frac{u \cdot v}{\|u\| \|v\|} = \frac{\sum_{i=1}^n u_i v_i}{\sqrt{\sum_{i=1}^n u_i^2} \sqrt{\sum_{i=1}^n v_i^2}}

To yield the best possible retrieval for the AI agents, Wikantik merges these two scores using a normalized hybrid scoring function or Reciprocal Rank Fusion (RRF). If using a convex combination, the final relevance score is:

\text{Score}_{\text{hybrid}} = \alpha \cdot \text{Normalized}(\text{score}_{BM25}) + (1 - \alpha) \cdot \text{sim}(u, v)

This ensures that an agent querying for "How do I configure the $50K caching tier?" will find the exact page mentioning the exact price and the exact term "caching tier," even if it uses synonymous phrasing in its request.

The Architecture and the Model Context Protocol (MCP)

Wikantik is built on a modern Java 25 / Jakarta EE 10 stack, prioritizing decoupled, provider-based architecture. However, its most powerful architectural feature is its native support for the Model Context Protocol (MCP).

MCP acts as a universal "USB-C port" for AI integration, allowing standard agents to interact with the wiki without needing fragile, custom web scrapers. Wikantik exposes two primary MCP surfaces:

1. /knowledge-mcp (The Retrieval Surface)

Optimized strictly for read-only retrieval and knowledge graph traversal.

2. /wikantik-admin-mcp (The Write Surface)

The authoritative management interface for content mutation.

Real-World Application: Autonomous Maintenance

An organization can deploy a scheduled background agent that wakes up nightly, connects via MCP, and audits the entire wiki for broken links, stale data, or policy compliance. If the agent finds an outdated API endpoint, it uses update_page to submit a corrected draft. The company effectively gains an indefatigable, zero-cost janitor that ensures the knowledge base never rots, saving thousands of dollars in maintenance overhead.

Semantic Integrity and The Vector Centroid Engine

Content in Wikantik is fiercely guarded by the Structural Spine. A page is not merely a string of text; it is a node in a structured graph. The required YAML frontmatter dictates taxonomy, access control, and edge relations.

A critical component of this semantic integrity is the Vector Centroid Engine. When a large article is ingested, it is chunked into smaller paragraphs, and each chunk is embedded into vector space (v_i). To represent the entire document for macro-level clustering without losing granularity, Wikantik computes the geometric centroid of the document's chunks:

V_{\text{centroid}} = \frac{1}{N} \sum_{i=1}^N v_i

This centroid vector V_{\text{centroid}} represents the "average semantic meaning" of the entire page. By comparing the centroids of different pages, Wikantik can automatically generate highly accurate "Similar Pages" recommendations, entirely bypassing the need for humans to manually curate related links.

The Heritage: Evolution from JSPWiki

While Wikantik represents the bleeding edge of agent-first systems, it is deeply rooted in the pragmatic, battle-tested heritage of Apache JSPWiki. It retains the robust security and extensibility patterns that made JSPWiki a staple of the enterprise Java ecosystem for over two decades.

Conclusion

Wikantik is more than just a wiki; it is a collaborative workspace where human intuition and agentic scale meet. By enforcing strict structural contracts, leveraging advanced hybrid retrieval mathematics, and exposing native MCP endpoints, Wikantik transforms disparate, rotting documentation into a living, verifiable, and highly lucrative organizational asset. It is the definitive knowledge engine for the AI era.