Skip to Content

Use Joule Studio with Document Grounding

Requires Customer/Partner License
Use Joule Studio to create an agent that uses document grounding.
You will learn
  • How to configure Joule Studio to connect to SAP AI Core and an S3 Object Store
  • How to use the document grounding tool in an agent
mhplumMartin PlummerJanuary 23, 2026
Created by
mhplum
January 23, 2026
Contributors
mhplum

Prerequisites

If your Joule Studio is not already configured to use SAP AI Core and your object store, you will need to add destinations to each.

  • Step 1
    1. Download the destination spba-aicore-destination.json

      The json file contains placeholders that you will need to replace.

      Destination json
    2. Edit the destination using the key of your SAP AI Core instance.

      AI Core key
    3. In the BTP Cockpit of your Joule Studio subaccount, go to Connectivity > Destinations.

    4. Choose Create and import your edited json file.

      AI Core destination
    5. Choose Check Connection.

      Check connection
    6. In the BTP Cockpit of your Joule subaccount, go to Connectivity > Destinations.

    7. Choose Create and import your edited json file.

    8. Choose Check Connection.

  • Step 2
    1. Download the destination spba-s3-object-store-destination.json

      The json file contains placeholders that you will need to replace.

      Destination json
    2. Edit the destination using the key of your SAP AI Core instance.

      S3 Object Store key
    3. In the BTP Cockpit of your Joule Studio subaccount, go to Connectivity > Destinations.

    4. Choose Create and import your edited json file.

      S3 Object Store destination
    5. Choose Check Connection.

      Check connection
  • Step 3

    The object stores that document grounding tools will have access to are maintained here. The entity called resource group here is not the same as a resource group in SAP AI Core, though one will be created there among other things.

    1. In the Lobby of Joule Studio, choose Control Tower > Document Grounding.

      Document Grounding tile
      Add Document Grounding
    2. Choose Add.

    3. Enter a name and choose Next.

      Add Document Grounding
    4. Select your AI Core destination and choose Next.

      Add Document Grounding
    5. Select the S3 Object Store destination and choose Add.

      Add Document Grounding
    6. Wait until the Status changes from Pending to Completed. This can take some time. Refresh the browser to check.

      You might see the status starting with Error and perhaps later before Completed is reached. Don’t panic - give it time.

      Add Document Grounding
  • Step 4

    You will extend the project that you completed in the previous tutorial.

    1. In the Lobby of Joule Studio, navigate to Versions of your project and choose Save as New Project.

      Lobby
    2. Give it a name and then open the new project.

    3. Choose Create -> Joule Agent.

      You could enhance your existing validation agent with document grounding later, but here we intentionally keep them distinct — to show how grounding works for learning purposes.

      Create Joule Agent
    4. Enter the name Maintenance Compliance Agent and description Helps users understand, assess, and troubleshoot maintenance policies to ensure correct execution, then choose Create.

      Create Joule Agent
    5. Add the following text to Expertise:

      Help users understand, assess, and troubleshoot the executability of maintenance orders.
      
    6. Add the following text to Instructions:

      This agent is trained to support, validate, and guide users through maintenance orders based on the following two internal documents:
      Component Management Guidelines in Maintenance Orders
      Business Guidelines for Validating Maintenance Order Executability
      
      It behaves like a skilled maintenance planner, applying domain logic and SAP system rules (PM module) to assess:
      Order status, Operation structure, Component availability, Common data issues, Edge cases requiring human review
      
      Create Joule Agent
    7. Choose the Add Tool dropdown in the top right corner of the Tools section. From the menu, select Documents.

      Create Joule Agent

      Enter the name Order Validation Documents and description Internal guidelines required by the agent to validate and guide users through maintenance orders. It covers component assignment rules, stock validation logic, operational status checks, and exception handling — based on SAP PM best practices.

      Select the resource group name that you configured earlier, then choose Add.

      Create Joule Agent
    8. Choose Save.

      Create Joule Agent
  • Step 5
    1. Choose Test in the agent editor.

    2. Configure the test parameters by selecting your private environment and your destination from the previous tutorial. Then choose Continue.

    3. Enter the prompt: Can you give me a short summary of our Maintenance Order Compliance policy, highlighting the main dos and don’ts? and choose Send.

      Testing

      Joule should respond with something similar to the following.

      Testing

      The results can vary from run to run. You might need additional prompts if the LLM does not understand or requires further clarification.

    4. Enter the prompt: Is it a policy violation to execute or release a maintenance order that is only partially confirmed? Please explain the conditions when this is allowed or not, referencing the policy. and choose Send.

      Testing
    5. Under Timeline, expand the nodes and see how Joule processed your request.

      Testing
    6. Choose Stop Testing.

  • Step 6
Back to top