Package com.sap.ai.sdk.orchestration
Class Grounding
java.lang.Object
com.sap.ai.sdk.orchestration.Grounding
- All Implemented Interfaces:
GroundingProvider
Grounding integrates external, contextually relevant, domain-specific, or real-time data into AI
processes. This data supplements the natural language processing capabilities of pre-trained
models, which are trained on general material.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Groundingcreate()Create a new default grounding provider.Create a grounding configuration.createGroundingPrompt(String message) Create a prompt with grounding parameters included in the message.documentGroundingService(GroundingModuleConfig.TypeEnum documentGroundingService) filters(GroundingModuleConfigConfigFiltersInner... filters) Set filters for grounding.metadataParams(String... metadataParams) Set which metadataParams are used in the grounding response.
-
Constructor Details
-
Grounding
public Grounding()
-
-
Method Details
-
create
Create a new default grounding provider.It is by default a document grounding service with a vector data repository.
- Returns:
- The grounding provider.
-
filters
Set filters for grounding.- Parameters:
filters- List of filters to set.- Returns:
- The modified grounding configuration.
-
metadataParams
Set which metadataParams are used in the grounding response.- Parameters:
metadataParams- List of metadataParams to set.- Returns:
- The modified grounding configuration.
- Since:
- 1.13.0
-
createGroundingPrompt
Create a prompt with grounding parameters included in the message.It uses the inputParams
userMessagefor the user message andgroundingContextfor the grounding context.- Parameters:
message- The user message.- Returns:
- The prompt with grounding.
-
createConfig
Description copied from interface:GroundingProviderCreate a grounding configuration.- Specified by:
createConfigin interfaceGroundingProvider- Returns:
- the grounding configuration
-
documentGroundingService
@Nonnull @Beta public Grounding documentGroundingService(GroundingModuleConfig.TypeEnum documentGroundingService) - Returns:
this.
-