Knowledge Base Overview
KB Architecture
The StackFlow Knowledge Base is a dual-layer system. Article metadata (title, category, author, state, access control) is stored in Aurora PostgreSQL. Article content and embeddings are indexed in the Bedrock Knowledge Base (BXJGG7PIPS) backed by OpenSearch Serverless with Titan Embeddings v2 at 1024 dimensions. This architecture separates structured queries (list articles by category) from semantic search (find articles about this problem).
- DynamoDB:
StackFlow_KBArticleandStackFlow_KBCategorytables provisioned - Bedrock KB:
BXJGG7PIPSactive; S3 data source bucketstackflow-kb-documents-373544523367 - OpenSearch Serverless: Collection
q3oso7unldm9p4xsqez4active with indexstackflow-kb-index - IAM:
StackFlowBedrockKBRolewithaoss:APIAccessAllon the OpenSearch collection
New articles are indexed in Bedrock within 60 seconds of publication. The Bedrock KB syncs automatically via S3 event triggers — when an article is published, its content is written to S3 and Bedrock ingests it from there. The S3 bucket is encrypted with the CMK mrk-bd842691514c4d74a02992b8dc11fe16.
Article Categories
| Category | Target Audience | Examples |
|---|---|---|
| How-To | End users | Password reset, VPN connection, software install |
| Troubleshooting | Agents + end users | Resolving common error messages, connectivity issues |
| Reference | Agents + developers | System architecture, configuration options, API docs |
| Policy | All users | IT policies, security guidelines, acceptable use |
| Known Error | Agents | Linked to KEDB entries, workarounds for known bugs |
| Release Notes | All users | StackFlow platform updates and changes |
Search & Retrieval
KB search uses a hybrid approach: exact keyword matching (via PostgreSQL full-text search) combined with semantic vector search (via Bedrock/OpenSearch). The combined score ranks results by both exact relevance and conceptual similarity. This allows users to find articles even when using different terminology than the article author.
Article Lifecycle
Articles follow a Draft → Review → Published → Retired lifecycle. Draft articles are only visible to the author and KB managers. Articles in Review state are visible to approvers and KB managers for quality checking. Published articles are visible to all authorized users based on audience settings.
curl -X PATCH https://your-instance.stackflow-tech.com/prod/api/knowledge/articles/KB0001234 -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"state": "published", "publish_notes": "Reviewed and approved by KB team"}'
KB Metrics
Knowledge Base effectiveness is tracked in Dashboards → KB Analytics. Key metrics include: articles created per month, views per article, search-to-view conversion rate, deflection rate (KB view before ticket submission), and article feedback scores (thumbs up/down with comments).