Corpus priority¶
The priority
parameter in the corpus()
function lets the AI agent decide which data sources to use when providing information to the user. By setting different priorities for different data sources, you can ensure that the AI agent prioritizes information from the most relevant or high-quality sources first.
For example, if you prioritize a specialized data source over general sources, the AI will focus on that data to offer more exact and relevant answers. The corpus priority helps tailor the information to better meet specific needs and preferences.
Note
You can set or update the corpus priority at any moment. The new priority level takes effect immediately after you save the dialog script. Re-running the indexing process is not required.
corpus({
title: `HTTP corpus`,
urls: [
`https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview`,
`https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages`,
`https://developer.mozilla.org/en-US/docs/Web/HTTP/Session`],
maxPages: 5,
priority: 0,
});