Ask AI is part of Agent Studio
and isn’t available as a standalone feature for new applications.
Use these docs for existing Ask AI implementations.
Migration guides will be added when available.
helpers.splitTextIntoRecords helper in your crawler configuration.
This works with many plain-text formats, but Markdown is especially well-suited for this purpose.
Update your crawler configuration
Add the following code to theactions array in your crawler configuration:
JavaScript
JavaScript
Run the crawler
After updating the crawler configuration:- Publish the configuration in the Crawler dashboard to save and activate it.
- Run the crawler to index your Markdown content.
Integrate the Markdown index with Ask AI
Once your Crawler and index are configured, set up your frontend to use both your main keyword index and your markdown index for AskAI. Here’s how you might configure DocSearch to use your main keyword index for search and your markdown index for AskAI:JavaScript
indexNamerefers to your main DocSearch indexaskAi.indexNamerefers to the dedicated Markdown index
Best practices
- Use clear consistent titles and headings for better discoverability
- Structure your content with headings and lists for better chunking
-
Add facets to support filtering in your search UI or the Ask AI assistant.
For example, you can add attributes like
lang,version,tagsto your and declare them asattributesForFaceting. -
Adjust record size by changing
maxRecordBytes.- If your answers seem too broad or fragmented, increase
maxRecordBytesto create fewer, larger records. This might increase the token count for LLMs, which can affect the size of the context window and the cost of each Ask AI response.
- If your answers seem too broad or fragmented, increase
-
If you have large Markdown files, decrease
maxRecordBytesto create smaller, more focused records.
Example configuration
JavaScript