Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AgentsforBedrock.Client.create_data_source hierarchal chunking configuration bug #4362

Open
TamaryOmer opened this issue Dec 2, 2024 · 3 comments
Assignees
Labels
bedrock-agent documentation This is a problem with documentation. p2 This is a standard priority issue response-requested Waiting on additional information or feedback.

Comments

@TamaryOmer
Copy link

Describe the issue

Hey,

TL;DR: missing parameter in gentsforBedrock.Client.create_data_source.vectorIngestionConfiguration. hierarchicalChunkingConfiguration docs

I tried to used AgentsforBedrock.create_data_source with hierarchal chunking strategy with the default request Syntax and get an error regarding the vectorIngestionConfiguration. I notice that the request requires a token configuration for both father and son chunks, for example:

`

    'chunkingConfiguration': {
        'chunkingStrategy': 'HIERARCHICAL',
        'hierarchicalChunkingConfiguration': {
            'levelConfigurations': [{
                    "maxTokens": 1000
                },
                {
                    "maxTokens": 300
                }
            ],
            'overlapTokens': 100
        }
    }
    },

`

While in the docs the there is a no reference to the child chunks maxTokens:

`

    'chunkingConfiguration': {
        'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC',
        'fixedSizeChunkingConfiguration': {
            'maxTokens': 123,
            'overlapPercentage': 123
        },
        'hierarchicalChunkingConfiguration': {
            'levelConfigurations': [
                {
                    'maxTokens': 123
                },
            ],
            'overlapTokens': 123
        }...

`

Thanks!

Links

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-agent/client/create_data_source.html

@TamaryOmer TamaryOmer added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Dec 2, 2024
@amberkushwaha
Copy link

describe the issue in it for the particular request.code of conduct in it.

@TamaryOmer
Copy link
Author

I'm not sure I fully understand what you mean.

@tim-finnigan tim-finnigan self-assigned this Dec 2, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out. (You can ignore comments from amberkushwaha who has been posting spam — I've reported them to GitHub.) The create_data_source command makes a request to the underlying CreateDataSource API. So this issue involves the API rather than the SDK directly. If there's an issue with API behavior, we generally recommend updating to the latest version in order to rule out that the issue isn't already resolved. (The CHANGELOG lists changes in each version.)

Could you share the specific error your getting in order to help us with further investigation? If you can share your debug logs (with any sensitive info redacted) by adding boto3.set_stream_logger('') to your script then that would also help us. And if you can specify the documentation discrepancy you're observing then we can raise that with the Bedrock team.

@tim-finnigan tim-finnigan added p2 This is a standard priority issue bedrock-agent response-requested Waiting on additional information or feedback. and removed needs-triage This issue or PR still needs to be triaged. labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bedrock-agent documentation This is a problem with documentation. p2 This is a standard priority issue response-requested Waiting on additional information or feedback.
Projects
None yet
Development

No branches or pull requests

3 participants