diff --git a/src/site/markdown/aem-variant/automaticTranslation.md b/src/site/markdown/aem-variant/automaticTranslation.md index 90f6a99fc..5f81a2d87 100644 --- a/src/site/markdown/aem-variant/automaticTranslation.md +++ b/src/site/markdown/aem-variant/automaticTranslation.md @@ -154,9 +154,9 @@ cannot easily make sure that the workflow initiator has the rights to perform th through this rollout. This has to be made sure by other means in the workflow, e.g. by [applying ACL for the specific workflow model to /var/workflow/models.](https://experienceleague.adobe.com/en/docs/experience-manager-65/content/sites/administering/operations/workflows-managing) -## Usage of the Debugging UI +## Usage of the Testing UI -For quick experimentation and evaluation of additional instructions, we provide a very simple debugging style UI. The +For quick experimentation and evaluation of additional instructions, we provide a very simple testing UI. The entry point for the translation is the URL in the author server [/apps/composum-ai/components/autotranslate/list.html](http://localhost:4502/apps/composum-ai/components/autotranslate/list.html) It allows entering a path for a page or content / experience fragment or whole site and starting a translation process @@ -189,6 +189,18 @@ Additionally, there is a Sling contextaware configuration "Composum AI Automatic that can be used to add additional instructions how to translate the pages in the subtree the configuration applies to (compare [sling configuration reference](../autogenerated/slingcaconfigurations.html#slingca.AutoTranslateCaConfig) ). +### Translation rules + +Since there can be different additional instructions for each page, there is the concept of a "translation rule" +that defines additional instructions with conditions when these are to be used. Such a rule has: + +- an optional path pattern that has to match the path of the page +- an optional content pattern that has to appear in the content of the page +- the additional instructions to be added when both patterns match or no pattern is given. + +A common use case would be to give specific translations for certain words. That'd be done by adding a rule with the +translated word / phrase as content pattern and "Translate XXX as YYY" as additional instruction. + ## Notes about the implementation - To have a painless startup, the identification of properties that need translation is heuristic. Standard diff --git a/src/site/markdown/prototypes.md b/src/site/markdown/prototypes.md index f9ddf2a27..c01894694 100644 --- a/src/site/markdown/prototypes.md +++ b/src/site/markdown/prototypes.md @@ -47,3 +47,15 @@ Since it'll likely take some work to get the prompts right, that will likely onl number of very similar pages to create about different topics / products etc. For more details see the [AI Page Templating](aiPageTemplating.md). + +## Tools for the AI + +OpenAI provides [function calling](https://platform.openai.com/docs/guides/function-calling) so that the AI can trigger +operations on it's own. There is an interface +[AITool](https://github.com/ist-dresden/composum-AI/blob/develop/backend/slingbase/src/main/java/com/composum/ai/backend/slingbase/experimential/AITool.java) +that can be implemented by OSGI services to provide such operations. There are two basic services +[SearchPageAITool](https://github.com/ist-dresden/composum-AI/blob/develop/backend/slingbase/src/main/java/com/composum/ai/backend/slingbase/experimential/impl/SearchPageAITool.java) +that can search for pages if there is a lucene index for page content defined, and a +[GetPageMarkdownAITool](https://github.com/ist-dresden/composum-AI/blob/develop/backend/slingbase/src/main/java/com/composum/ai/backend/slingbase/experimential/impl/GetPageMarkdownAITool.java) +with which the AI can read the markdown of a page given it's path. Of course you are invited to get creative and create +your own tools!