Skip to content

Commit

Permalink
documentation extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
stoerr committed Nov 18, 2024
1 parent 4a46166 commit 621fec4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/site/markdown/aem-variant/automaticTranslation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions src/site/markdown/prototypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

0 comments on commit 621fec4

Please sign in to comment.