Wiki Page

The wiki page at /wiki generates a comprehensive, article-style answer to any question or topic using the knowledge base. Unlike the FAQ page (which produces a list of Q&A pairs) or chat (which gives a short conversational answer), the wiki page produces a full technical article with examples, step-by-step guidance, best practices, and code snippets.

Results are cached for 7 days so repeated visits to the same topic are served instantly.

How it works

  1. The page reads the q, source, and lang query parameters from the URL
  2. It calls GET /api/v1/wiki with those parameters
  3. The API checks its database cache — if a matching entry exists and hasn't expired, it returns immediately (cached: true)
  4. On a cache miss, it retrieves a broad set of relevant chunks (topK=30) and generates a structured article using the LLM
  5. The result is written to the cache with a 7-day TTL and returned as Markdown

URL parameters

ParamRequiredDescription
qYesThe topic or question to generate an article for
sourceNoNamespace to search. Default: user_docs. Use all for all namespaces.
langNoBCP 47 language code (en, nl, de, fr). Defaults to auto-detection.

Example URLs:

/wiki?q=asset+upload
/wiki?q=role-based+access&source=tech_docs&lang=nl
/wiki?q=webhooks&source=all

Without a q parameter, the page shows a prompt to provide one.

Article structure

The LLM is instructed to produce a thorough article that includes:

  • Title and introduction
  • In-depth explanation of the topic
  • Concrete examples with code blocks
  • Step-by-step walkthroughs where applicable
  • Best practices / tips section
  • Common pitfalls / troubleshooting section
  • Clear heading structure (##, ###)

Difference from FAQ and chat

ChatFAQWiki
RetrievalTop-K (8)Broad (topK=20)Broad (topK=30)
OutputConversational answerStructured Q&A (5–10 pairs)Full technical article
ExamplesMinimalMinimalAlways included
HistoryConversation threadStatelessStateless
CachingNone7-day TTL7-day TTL
AuthNot requiredNot requiredNot required

Linking to the wiki page

Link to a pre-filled article from anywhere in the Cape product:

https://your-host/wiki?q=asset+collections&source=user_docs&lang=en

This is the intended usage pattern — deep-link from help tooltips, onboarding flows, or support pages to a detailed article about a specific feature or concept.

API access

The wiki article can also be consumed programmatically (no auth required):

curl "https://your-host/api/v1/wiki?q=asset+upload&source=user_docs&lang=en"

Response:

{
  "query": "asset upload",
  "source": "user_docs",
  "language": "en",
  "content": "# Asset Upload\n\nUploading assets to Cape is...",
  "cached": false
}

content is Markdown and can be rendered in any surface that supports it.

Caching

The cache key is derived from the query, namespace scope, and language — stored in the same FaqCache table as FAQ results, but with a wiki: scope prefix to avoid key collisions. Two requests with the same topic but different languages or sources are cached separately.

Cache TTL is 7 days. After expiry, the next request regenerates the article and refreshes the cache entry.