Learning from Help Documents
Users or applications can provide help documents to enhance the AppAgent's capabilities. The AppAgent retrieves relevant knowledge from these documents to improve task understanding, plan quality, and application interaction efficiency.
For instructions on providing help documents, see the Help Document Provision guide.
Mechanism
Help documents are structured as task-solution pairs. When processing a request, the AppAgent:
- Retrieves relevant help documents by matching the request against task descriptions
- Uses the retrieved solutions as references for plan generation
- Adapts the solutions to the specific context
Since retrieved documents may not be perfectly relevant, the AppAgent treats them as references rather than strict instructions, allowing for flexible adaptation to the actual task requirements.
Configuration
To enable learning from help documents:
-
Provide Help Documents: Follow the Help Document Provision guide to prepare and index help documents
-
Configure Parameters: Set the following options in
config.yaml:
| Configuration Option | Description | Type | Default |
|---|---|---|---|
RAG_OFFLINE_DOCS |
Enable offline help document retrieval | Boolean | False |
RAG_OFFLINE_DOCS_RETRIEVED_TOPK |
Number of top documents to retrieve | Integer | 1 |
For more details on RAG configuration, see the RAG Configuration Guide.
API Reference
Bases: Retriever
Class to create offline retrievers.
Create a new OfflineDocRetriever. :appname: The name of the application.
Source code in rag/retriever.py
86 87 88 89 90 91 92 93 | |
get_indexer(path)
Load the retriever.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Source code in rag/retriever.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
get_offline_indexer_path()
Get the path to the offline indexer.
| Returns: |
|
|---|
Source code in rag/retriever.py
95 96 97 98 99 100 101 102 103 104 105 | |