Context Grounding
ContextGroundingService
Bases: FolderContext
, BaseService
Service for managing semantic automation contexts in UiPath.
Context Grounding is a feature that helps in understanding and managing the semantic context in which automation processes operate. It provides capabilities for indexing, retrieving, and searching through contextual information that can be used to enhance AI-enabled automation.
This service requires a valid folder key to be set in the environment, as context grounding operations are always performed within a specific folder context.
retrieve(name, folder_key=None, folder_path=None)
Retrieve context grounding index information by its name.
This method fetches details about a specific context index, which can be used to understand what type of contextual information is available for automation processes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the context index to retrieve. |
required |
Returns:
Type | Description |
---|---|
Optional[ContextGroundingIndex]
|
Optional[ContextGroundingIndex]: The index information, including its configuration and metadata if found, otherwise None. |
retrieve_async(name, folder_key=None, folder_path=None)
async
Retrieve asynchronously context grounding index information by its name.
This method fetches details about a specific context index, which can be used to understand what type of contextual information is available for automation processes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the context index to retrieve. |
required |
Returns:
Type | Description |
---|---|
Optional[ContextGroundingIndex]
|
Optional[ContextGroundingIndex]: The index information, including its configuration and metadata if found, otherwise None. |
retrieve_by_id(id, folder_key=None, folder_path=None)
Retrieve context grounding index information by its ID.
This method provides direct access to a context index using its unique identifier, which can be more efficient than searching by name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The unique identifier of the context index. |
required |
Returns:
Name | Type | Description |
---|---|---|
Any |
Any
|
The index information, including its configuration and metadata. |
retrieve_by_id_async(id, folder_key=None, folder_path=None)
async
Retrieve asynchronously context grounding index information by its ID.
This method provides direct access to a context index using its unique identifier, which can be more efficient than searching by name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The unique identifier of the context index. |
required |
Returns:
Name | Type | Description |
---|---|---|
Any |
Any
|
The index information, including its configuration and metadata. |
search(name, query, number_of_results=10, folder_key=None, folder_path=None)
Search for contextual information within a specific index.
This method performs a semantic search against the specified context index, helping to find relevant information that can be used in automation processes. The search is powered by AI and understands natural language queries.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the context index to search in. |
required |
query
|
str
|
The search query in natural language. |
required |
number_of_results
|
int
|
Maximum number of results to return. Defaults to 10. |
10
|
Returns:
Type | Description |
---|---|
List[ContextGroundingQueryResponse]
|
List[ContextGroundingQueryResponse]: A list of search results, each containing relevant contextual information and metadata. |
search_async(name, query, number_of_results=10, folder_key=None, folder_path=None)
async
Search asynchronously for contextual information within a specific index.
This method performs a semantic search against the specified context index, helping to find relevant information that can be used in automation processes. The search is powered by AI and understands natural language queries.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the context index to search in. |
required |
query
|
str
|
The search query in natural language. |
required |
number_of_results
|
int
|
Maximum number of results to return. Defaults to 10. |
10
|
Returns:
Type | Description |
---|---|
List[ContextGroundingQueryResponse]
|
List[ContextGroundingQueryResponse]: A list of search results, each containing relevant contextual information and metadata. |