Configuring Content AI Search Component configure-content-ai-search-component
The Content AI Search component provides your site visitors with an generative AI-powered search. Learn how to enable this component for your content authors.
Prerequisites prerequisites
- At least one Content Source already created and with the status Available.
- The AEM Content AI Client OSGi configuration (
ContentAIClientImpl) set up on both author and publish, with a valid API credential and a Default Content Source value. Please see the document Set Up an Adobe Developer Console Project for how to obtain credentials.
Create a Proxy Component proxy-component
Like all Core Components, it is recommended to create a proxy component for the default Content AI Search Component that ships with AEM. By keeping your project-specific changes in the proxy component under /apps, the base components under /libs is updated by Adobe automatically and your project component automatically inherits these updates. Please see the documents Using Core Components and Component Guidelines for more information.
Configure Client Libraries clientlib
The Content AI Search Component does not follow the standard pattern for including client libraries in the Core Components. Follow these steps instead.
Add the following to your project’s page component customheaderlibs.html (for CSS) and customfooterlibs.html (for JS):
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html"
data-sly-call="${clientLib.css @ categories='core.wcm.components.contentaisearch.v1'}"></sly>
If your project layers its own brand styling on top, add a second category for your project’s own client library after this one.
Using the Content AI Search Component using
Your content authors can now place the Content AI Search Component on their pages. Please see the document Content AI Search Component for more information.
How the Component Uses Content AI how-it-works
- Standard search queries are served by the same retrieval layer as the Content Source’s index, returning matching pages, fragments, or assets from the configured source.
- When the AI-generated summary is enabled, the component additionally calls the AEM Content AI generative endpoint, grounding the response in the same indexed content, and displays sources alongside the summary so visitors can verify it.
- Because both features read from the same governed Content Source, results and summaries stay consistent with whatever content is currently indexed. Re-running acquisition (see Control your Content Sources) refreshes both.
Next Steps next-steps
- Control your Content Sources — Create and manage the Content Source this component searches.
- Set Up an Adobe Developer Console Project — Obtain the credentials used by the OSGi Content AI Client configuration.
- Content AI API reference — Understand the underlying search and generative-summary endpoints this component calls.