cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Generative AI
Explore discussions on generative artificial intelligence techniques and applications within the Databricks Community. Share ideas, challenges, and breakthroughs in this cutting-edge field.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Agent Bricks import table error

suho_ryo
New Contributor

"I encountered an error when I tried to import a table to improve the quality of the Agent Bricks Knowledge Assistant. The error message is: 'Unrecognized token 'The': was expecting ('true', 'false' or 'null') at [Source: The provided text discusses information security certifications and does not contain any elements of hate speech, harassment, incitement of violence, or the promotion of illegal or severely harmful acts. It is purely informational and related to corporate compliance. Therefore, it adheres to content safety policies.; line: 1, column: 4]'

3 REPLIES 3

Khaja_Zaffer
Contributor III

Hello @suho_ryo 

Good day!!

as per the error : You need to inspect the data in the table you are trying to import and ensure that every entry in each column strictly follows the required data types and JSON formatting. The documentation for Agent Bricks confirms that the table must have this specific schema for the import to work correctly.

https://docs.databricks.com/aws/en/generative-ai/agent-bricks/knowledge-assistant 

 

here is the video for the same: https://www.youtube.com/watch?v=UGL28vHJhTo 

 

check why you are having a boolean value in your dataset. 

 

 

suho_ryo
New Contributor

Hello @Khaja_Zaffer 

 

Thanks for your reply.

I believe the table schema should be correct, as I created it with the following statement. There are no boolean values in my data. When I tried exporting the created table and then re-importing it, I encountered the same error.

CREATE TABLE IF NOT EXISTS table_name (
  eval_id STRING,
  request STRING,
  guidelines ARRAY<STRING>,
  feedback_records ARRAY<STRING>,
  metadata STRING,
  tags STRING
)

 

However, when I set the value for feedback_records to ["true", "false"], I got the following error message:

"Failed to load examples
Expected 'START_OBJECT' not 'VALUE_TRUE' at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 5] at [Source: UNKNOWN; line: 1, column: 5]"

 

I suspect that column: 5 refers to the metadata column. I thought any string would be acceptable for this field, but it still resulted in an error. Since the message mentioned 'START_OBJECT', I also tried using a string that starts with "{", but that produced the same error as well.

Hello @suho_ryo 

Can you give me sample of the data you are using? so that we can check. 

I would again suggest you to please watch the video tagged in the resolution provided before.