Skip to content

Commit e364005

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/chat-with-document
2 parents f2fa9a9 + 23c10ad commit e364005

File tree

8 files changed

+1337
-59
lines changed

8 files changed

+1337
-59
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ SPDX-License-Identifier: MIT-0
66
## [Unreleased]
77

88
### Added
9+
10+
## [0.3.16]
11+
12+
### Added
13+
14+
- **S3 Vectors Support for Cost-Optimized Knowledge Base Storage**
15+
- Added S3 Vectors as alternative vector store option to OpenSearch Serverless for Bedrock Knowledge Base with lower storage costs
16+
- Custom resource Lambda implementation for S3 vector bucket and index management (using boto3 s3vectors client) with proper IAM permissions and resource cleanup
17+
- Unified Knowledge Base interface supporting both vector store types with automatic resource provisioning based on user selection
18+
19+
- **Page Limit Configuration for Classification Control**
20+
- Added `maxPagesForClassification` configuration option to control how many pages are used during document classification
21+
- **Default Behavior**: `"ALL"` - uses all pages for classification (existing behavior)
22+
- **Limited Page Classification**: Set to numeric value (e.g., `"1"`, `"2"`, `"3"`) to classify only the first N pages
23+
- **Important**: When using numeric limit, the classification result from the first N pages is applied to ALL pages in the document, effectively forcing the entire document to be assigned a single class with one section
24+
- **Use Cases**: Performance optimization for large documents, cost reduction for documents with consistent classification patterns, simplified processing for homogeneous document types
25+
926
- **CloudFormation Service Role for Delegated Deployment Access**
1027
- Added example CloudFormation service role template that enables non-administrator users to deploy and maintain IDP stacks without requiring ongoing administrator permissions
1128
- Administrators can provision the service role once with elevated privileges, then delegate deployment capabilities to developer/DevOps teams
@@ -18,6 +35,7 @@ SPDX-License-Identifier: MIT-0
1835
- Fix occasional UI error 'Failed to get document details - please try again later' - resolves #58
1936
- Fixed UI zipfile creation to exclude .aws-sam directories and .env files from deployment package
2037
- Added security recommendation to set LogLevel parameter to WARN or ERROR (not INFO) for production deployments to prevent logging of sensitive information including PII data, document contents, and S3 presigned URLs
38+
- Hardened several aspects of the new Discovery feature
2139

2240
## [0.3.15]
2341

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.16-wip3
1+
0.3.16

docs/knowledge-base.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ SPDX-License-Identifier: MIT-0
55

66
The GenAIIDP solution includes an integrated Document Knowledge Base query feature that enables you to interactively ask questions about your processed document collection using natural language. This feature leverages the processed data to create a searchable knowledge base.
77

8+
9+
https://github.com/user-attachments/assets/991b4112-0fc9-4e4d-98ab-ef4e3cbae04a
10+
11+
12+
813
## How It Works
914

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

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

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

3863
The Document Knowledge Base Query feature can be configured during stack deployment:
@@ -46,14 +71,29 @@ ShouldUseDocumentKnowledgeBase:
4671
- "false"
4772
Description: Enable/disable the Document Knowledge Base feature
4873

74+
KnowledgeBaseVectorStore:
75+
Type: String
76+
Default: "OPENSEARCH_SERVERLESS"
77+
AllowedValues:
78+
- "OPENSEARCH_SERVERLESS"
79+
- "S3_VECTORS"
80+
Description: Vector storage backend for the knowledge base
81+
4982
DocumentKnowledgeBaseModel:
5083
Type: String
5184
Default: "us.amazon.nova-pro-v1:0"
5285
Description: Bedrock model to use for knowledge base queries (e.g., "us.anthropic.claude-3-7-sonnet-20250219-v1:0")
5386
```
5487
88+
### Supported Embedding Models
89+
90+
Both vector store types support the same embedding models:
91+
- `amazon.titan-embed-text-v2:0` (default)
92+
- `cohere.embed-english-v3` (disabled by default)
93+
- `cohere.embed-multilingual-v3` (disabled by default)
94+
5595
When the feature is enabled, the solution:
56-
- Creates necessary OpenSearch resources for document indexing
96+
- Creates the selected vector storage resources (OpenSearch or S3 Vectors)
5797
- Configures API endpoints for querying the knowledge base
5898
- Adds the query interface to the Web UI
5999

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

0 commit comments

Comments
 (0)