FAQ Page
The FAQ page at /faq generates a structured question-and-answer document for any topic using the knowledge base. 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/faqwith 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 fetches broad content from the knowledge base (not a top-K search — it retrieves a wider set of chunks to cover the topic comprehensively), then generates 5–10 Q&A pairs 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 a FAQ 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:
/faq?q=asset+upload
/faq?q=role-based+access&source=tech_docs&lang=nl
/faq?q=webhooks&source=all
Without a q parameter, the page shows a prompt to provide one.
Caching
The cache key is a combination of the query string, namespace scope, and language. Two requests with the same topic but different languages or sources are cached separately.
Cache TTL is 7 days (expiresAt). After expiry, the next request regenerates the FAQ and refreshes the cache entry. There is currently no admin UI to manually invalidate cache entries — use the database directly if needed.
The response includes a Cached badge when the result came from the cache, so you can tell at a glance whether the content was freshly generated.
Difference from chat
The FAQ pipeline is fundamentally different from chat:
| Chat | FAQ | |
|---|---|---|
| Retrieval | Top-K semantic search | Broad content fetch |
| Output | Conversational answer | Structured Q&A document |
| History | Conversation thread | Stateless |
| Caching | None | 7-day TTL |
| Auth | Not required | Not required |
The FAQ endpoint fetches more content than a typical chat query because it needs to cover an entire topic, not just answer a single question.
Linking to the FAQ page
Link to a pre-filled FAQ from anywhere in the Cape product:
https://your-host/faq?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 dynamically generated FAQ for that specific topic.
API access
The FAQ can also be consumed programmatically (no auth required):
curl "https://your-host/api/v1/faq?q=asset+upload&source=user_docs&lang=en"
Response:
{
"query": "asset upload",
"scope": "user_docs",
"language": "en",
"content": "# Asset Upload FAQ\n\n## How do I upload an asset?\n\n...",
"cached": false
}
content is Markdown and can be rendered in any surface that supports it.