The priority parameter in the corpus() function lets the Agentic Interface 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 Agentic Interface 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.
Example
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,
});Priority Levels
Higher Priority (e.g., 10)
Specialized, high-quality sources that should be prioritized
Medium Priority (e.g., 5)
Standard sources with moderate relevance
Lower Priority (e.g., 0)
General sources used as fallback options