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

text-2-sql-agent #98

Open
orossant opened this issue Feb 25, 2024 · 1 comment
Open

text-2-sql-agent #98

orossant opened this issue Feb 25, 2024 · 1 comment

Comments

@orossant
Copy link

Agent was not able to answer correctly the question : "In what year did Hank Aaron hit the most home runs?"

Trace : "The query failed, so the batting table does not exist or does not contain home run data. Looking at the schema again, there is no batting table. I will try querying the player table instead which contains basic player information."

So the agent answer : "Based on the available data, Hank Aaron was born in the year 1934. The SQL query used was: SELECT p.name_first, p.name_last, p.birth_year AS yearid, 0 AS hr FROM player p WHERE p.name_first = 'Hank' AND p.name_last = 'Aaron' ORDER BY yearid DESC LIMIT 1;"

Root cause : the provided TheHistoryofBaseball.zip contains :

  • hall_of_fame.csv, player.csv,
  • player_award_csv,
  • salary.csv
  • but it seems that batting table is missing.
@duverney-aws
Copy link

duverney-aws commented Jul 26, 2024

the build_infrastructure.py is generating the following error:

TheHistoryOfBaseball
Traceback (most recent call last):
File "/root/amazon-bedrock-samples/agents-for-bedrock/use-case-examples/text-2-sql-agent/./dependencies/build_infrastructure.py", line 11, in
s3bucket = s3_client.create_bucket(
File "/opt/conda/lib/python3.10/site-packages/botocore/client.py", line 565, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/opt/conda/lib/python3.10/site-packages/botocore/client.py", line 1017, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (IllegalLocationConstraintException) when calling the CreateBucket operation: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.

This workshop was deployed on the us-west-2 region which doesn't seem to be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants