Skip to content

Commit a463e0e

Browse files
author
Bob Strahan
committed
Refactor knowledge base documentation: consolidate S3 vectors guide into main docs and update template
1 parent 0820287 commit a463e0e

File tree

3 files changed

+49
-260
lines changed

3 files changed

+49
-260
lines changed

docs/knowledge-base.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ The GenAIIDP solution includes an integrated Document Knowledge Base query featu
77

88
## How It Works
99

10-
1. **Document Indexing**
10+
1. **Document Processing & Indexing**
1111
- Processed documents are automatically indexed in a vector database
1212
- Documents are chunked into semantic segments for efficient retrieval
1313
- Each chunk maintains reference to its source document
14+
- **Ingestion Schedule**: Documents are ingested into the knowledge base every 30 minutes, so newly processed documents may not be immediately available for querying
1415

1516
2. **Interactive Query Interface**
1617
- Access through the Web UI via the "Knowledge Base" section
@@ -33,6 +34,25 @@ The GenAIIDP solution includes an integrated Document Knowledge Base query featu
3334
- **Markdown Formatting**: Responses support rich formatting for better readability
3435
- **Real-time Processing**: Get answers in seconds, even across large document collections
3536

37+
## Architecture & Vector Storage Options
38+
39+
The Knowledge Base feature supports two vector storage backends to optimize for different performance and cost requirements:
40+
41+
### Vector Store Comparison
42+
43+
| Aspect | OpenSearch Serverless | S3 Vectors |
44+
|--------|----------------------|------------|
45+
| **Query Latency** | Sub-millisecond | Sub-second |
46+
| **Pricing Model** | Always On (continuous capacity costs) | On Demand (pay-per-query) |
47+
| **Storage Cost** | Higher | 40-60% lower |
48+
| **Best For** | Real-time applications | Cost-sensitive deployments |
49+
| **Features** | Full-text search, advanced filtering | Native S3 integration |
50+
51+
### Choosing Your Vector Store
52+
53+
- **OpenSearch Serverless** (Default): Choose for applications requiring ultra-fast retrieval and real-time performance
54+
- **S3 Vectors**: Choose for cost optimization when query latency is acceptable
55+
3656
## Configuration
3757

3858
The Document Knowledge Base Query feature can be configured during stack deployment:
@@ -46,14 +66,29 @@ ShouldUseDocumentKnowledgeBase:
4666
- "false"
4767
Description: Enable/disable the Document Knowledge Base feature
4868

69+
KnowledgeBaseVectorStore:
70+
Type: String
71+
Default: "OPENSEARCH_SERVERLESS"
72+
AllowedValues:
73+
- "OPENSEARCH_SERVERLESS"
74+
- "S3_VECTORS"
75+
Description: Vector storage backend for the knowledge base
76+
4977
DocumentKnowledgeBaseModel:
5078
Type: String
5179
Default: "us.amazon.nova-pro-v1:0"
5280
Description: Bedrock model to use for knowledge base queries (e.g., "us.anthropic.claude-3-7-sonnet-20250219-v1:0")
5381
```
5482
83+
### Supported Embedding Models
84+
85+
Both vector store types support the same embedding models:
86+
- `amazon.titan-embed-text-v2:0` (default)
87+
- `cohere.embed-english-v3` (disabled by default)
88+
- `cohere.embed-multilingual-v3` (disabled by default)
89+
5590
When the feature is enabled, the solution:
56-
- Creates necessary OpenSearch resources for document indexing
91+
- Creates the selected vector storage resources (OpenSearch or S3 Vectors)
5792
- Configures API endpoints for querying the knowledge base
5893
- Adds the query interface to the Web UI
5994

@@ -111,3 +146,14 @@ The Knowledge Base feature maintains the security controls of the overall soluti
111146
- Document visibility respects user permissions
112147
- Questions and answers are processed securely within your AWS account
113148
- No data is sent to external services beyond the configured Bedrock models
149+
150+
## Future Enhancements
151+
152+
### Potential Improvements & Community Contributions
153+
- **CloudFormation Support**: When S3 Vectors gains native CloudFormation support
154+
- **Migration Tools**: Utilities to migrate between vector store types
155+
- **Hybrid Deployment**: Support for multiple Knowledge Bases with different vector stores
156+
- **Document Chunking Options**: The system currently uses default chunking strategies, with additional chunking methods available for optimization based on document types and use cases
157+
- Performance optimization suggestions
158+
- Additional embedding model support
159+
- Enhanced monitoring and alerting

docs/s3-vectors-knowledge-base.md

Lines changed: 0 additions & 257 deletions
This file was deleted.

options/bedrockkb/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ Resources:
936936
Action:
937937
- "bedrock:StartIngestionJob"
938938
Resource:
939-
- !Sub "arn:${AWS::Partition}:bedrock:*:${AWS::AccountId}:knowledge-base/${KnowledgeBase}"
939+
- !Sub "arn:${AWS::Partition}:bedrock:*:${AWS::AccountId}:knowledge-base/${KnowledgeBase.Value}"
940940
PolicyName: BedrockPolicy
941941

942942
StartIngestionJobFunction:

0 commit comments

Comments
 (0)