Documentation
<h3><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.85);">Configuration</span></h3><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">All modules that are needed to interact with Mendix Cloud GenAI Resource Packs, an LLM from (Azure) OpenAI or Amazon Bedrock are already installed. The app contains functionalities to configure OpenAI or Amazon Bedrock out of the box. Feel free to add your own models or remove the existing ones.</span></p><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Read this </span><u style="color: rgb(6, 74, 228); background-color: transparent;"><a href="https://docs.mendix.com/appstore/modules/genai/how-to/starter-template/" rel="noopener noreferrer" target="_blank">how-to guide</a></u><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);"> for more information about setting up access to a model provider.</span></p><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Before users can chat with a model, the admin needs to create Bot Configuration(s) for users to select in the chat interface.</span></p><ol><li><ol style="list-style-type: lower-alpha"><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Display name: what users will see on the page</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Is Selectable in UI: decide if a configuration should be selectable</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Model selection: models of a specific provider that were configured before</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Action microflow: select what action microflow should be executed. The provided one ("ChatContext_ChatWithHistory_ActionMicroflow") supports all providers. Feel free to customize the microflow to your needs</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">One or multiple Knowledge Base Retrieval tools can be added to a BotConfig from the overview page. This enable the chat to be enriched with specific knowledge</span></li></ol></li></ol><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);"> </span></p><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Additionally, you can create starting points for prompt engineering, that will be available to your users. Both can be configured at runtime (or in the After Startup):</span></p><ol><li><ol style="list-style-type: lower-alpha"><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Instructions: a prefilled instruction to be selected in the chat interface. Instructions augment the "System Prompt" and influence the model's behavior. Users can create their own custom instructions as well (only visible to them).</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Initial User Prompts: buttons that can be clicked in new chats by the user to prefill the user prompt and a corresponding instruction.</span></li></ol></li></ol><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);"> </span></p><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">To give you an idea, a few examples are automatically created for both. Those can be deleted at runtime and / or deactivated in the ASU microflow if not needed:</span></p><ol><li><ol style="list-style-type: lower-alpha"><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Summarize my meeting notes: inserts a sample text of meeting notes and instructs the LLM to find important information (deadlines, action points). The LLM should then summarize the text using headers and bullet points.</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Launch an AI Chatbot internally: instruct the LLM to create an engaging text for the target audience. The text should describe the technology and business impact.</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Launch an AI Chatbot on LinkedIn: the LLM should create an engaging LinkedIn post with hashtags and emojis about a recently launched AI chatbot.</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Help me decide launching an MVP product: the LLM helps you to brainstorm and prepare for discussions about your MVP product.</span></li></ol></li></ol><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);"> </span></p><h3><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.85);">Customize AI Bot</span></h3><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">This app serves as a starting point and there are many ways to customize your app:</span></p><ol><li><ol style="list-style-type: lower-alpha"><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Add your custom styling (see </span><u style="color: rgb(6, 74, 228); background-color: transparent;"><a href="https://docs.mendix.com/howto/front-end/customize-styling-new/" rel="noopener noreferrer" target="_blank">Customize Styling</a></u><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);"> for more details)</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Customize the initial user prompts that are suggested in new chats</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Redesign the chat page to your needs</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Add custom pre- or post-processing logic into the action microflow that interacts with the LLM, for example to bring your own knowledge base.</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Add your own LLM provider connector</span></li></ol></li></ol><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);"> </span></p><h3><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.85);">Document chat</span></h3><h4><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.85);">Mendix Cloud or Amazon Bedrock</span></h4><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">When using Mendix Cloud or Amazon Bedrock as a provider, users can upload up to five documents of various types to let the model analyze and base the response on those.</span></p><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);"> </span></p><h4><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.85);">(Azure) OpenAI, Mistral and Google Gemini</span></h4><p><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">When selecting (Azure) OpenAI, Mistral or Google Gemini, only a single PDF can be passed. The text is extracted from the PDF and inserted into the prompt. This does mean that:</span></p><ol><li><ol style="list-style-type: lower-alpha"><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Graphics (this might include scans) and formatting from the PDF will mostly be ignored.</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Long PDFs can reduce the accuracy of responses (due to distraction from the important content) or even cause an error when making a request (due to exceeding the model's context window). A warning is shown to the user when a long PDF is being used.</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">As the PDF's content is passed along the request, the token usage is increased (and thus costs)</span></li><li><span style="background-color: rgb(255, 255, 255); color: rgba(10, 19, 36, 0.7);">Not every model performs equally well with PDF content (for example, OpenAI's GPT-4o performs better than GPT-3.5 turbo)</span></li></ol></li></ol><p> </p>