This error usually indicates that the index's records are not DocSearch structured. DocSearch index records should contain lvl0, lvl1, lvl2, lvl3, lvl4 and lvl5 content.
If you want to use Ask AI with an index structure that does not match this then you will need to follow the instructions on our step by step guide here https://docsearch.algolia.com/docs/examples/#bring-your-own-data-shape-with-transformitems