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
- The page reads the
q,source, andlangquery parameters from the URL - It calls
GET /api/v1/wikiwith those parameters - The API checks its database cache — if a matching entry exists and hasn't expired, it returns immediately (
cached: true) - On a cache miss, it retrieves a broad set of relevant chunks (topK=30) and generates a structured article using the LLM
- The result is written to the cache with a 7-day TTL and returned as Markdown
URL parameters
| Param | Required | Description |
|---|---|---|
q | Yes | The topic or question to generate an article for |
source | No | Namespace to search. Default: user_docs. Use all for all namespaces. |
lang | No | BCP 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
| Chat | FAQ | Wiki | |
|---|---|---|---|
| Retrieval | Top-K (8) | Broad (topK=20) | Broad (topK=30) |
| Output | Conversational answer | Structured Q&A (5–10 pairs) | Full technical article |
| Examples | Minimal | Minimal | Always included |
| History | Conversation thread | Stateless | Stateless |
| Caching | None | 7-day TTL | 7-day TTL |
| Auth | Not required | Not required | Not 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.