Command Reference ( rag mode )
List of rag mode commands.
rag ( build ) : cmdbox -m rag -c build <Option>
We build the database based on the RAG (Retrieval-Augmented Generation) configuration.
Option |
Type |
Multi |
Required |
Default |
Choices |
Description |
|---|---|---|---|---|---|---|
--host <host> |
str |
required |
localhost |
Specify the service host of the Redis server. |
||
--port <port> |
int |
required |
6379 |
Specify the service port of the Redis server. |
||
--password <password> |
passwd |
required |
password |
Specify the access password of the Redis server (optional). If omitted, password is used. |
||
--svname <svname> |
str |
required |
cmdbox |
Specify the service name of the inference server. |
||
--retry_count <retry_count> |
int |
3 |
Specifies the number of reconnections to the Redis server. |
|||
--retry_interval <retry_interval> |
int |
5 |
Specifies the number of seconds before reconnecting to the Redis server. |
|||
--timeout <timeout> |
int |
120 |
Specify the maximum waiting time until the server responds. |
|||
--rag_name <rag_name> |
str |
required |
Specify the name of the RAG configuration to build. |
Output Schema
This command implements output_schema() returning Result model.
{
"success": {
"performance": [
{
"key": "string",
"value": null
}
],
"data": "string"
},
"warn": {},
"error": {},
"schema": {},
"end": false
}
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
success |
Data | null |
no |
null |
成功した場合の結果 |
success.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
success.data |
str | null |
no |
null |
処理結果のデータ |
warn |
dict[str, any] | Data | str | bool | null |
no |
null |
警告がある場合の結果 |
warn.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
error |
dict[str, any] | Data | str | bool | null |
no |
null |
エラーがある場合の結果 |
error.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
schema |
dict[str, any] | null |
no |
null |
スキーマ情報 |
end |
bool | null |
no |
null |
終了フラグ |
rag ( del ) : cmdbox -m rag -c del <Option>
Delete the RAG (Retrieval-Augmented Generation) configuration.
Option |
Type |
Multi |
Required |
Default |
Choices |
Description |
|---|---|---|---|---|---|---|
--host <host> |
str |
required |
localhost |
Specify the service host of the Redis server. |
||
--port <port> |
int |
required |
6379 |
Specify the service port of the Redis server. |
||
--password <password> |
passwd |
required |
password |
Specify the access password of the Redis server (optional). If omitted, password is used. |
||
--svname <svname> |
str |
required |
cmdbox |
Specify the service name of the inference server. |
||
--retry_count <retry_count> |
int |
3 |
Specifies the number of reconnections to the Redis server. |
|||
--retry_interval <retry_interval> |
int |
5 |
Specifies the number of seconds before reconnecting to the Redis server. |
|||
--timeout <timeout> |
int |
120 |
Specify the maximum waiting time until the server responds. |
|||
--rag_name <rag_name> |
str |
required |
Specify the name of the RAG configuration to delete. |
Output Schema
This command implements output_schema() returning Result model.
{
"success": {
"performance": [
{
"key": "string",
"value": null
}
],
"data": "string"
},
"warn": {},
"error": {},
"schema": {},
"end": false
}
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
success |
Data | null |
no |
null |
成功した場合の結果 |
success.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
success.data |
str | null |
no |
null |
処理結果のデータ |
warn |
dict[str, any] | Data | str | bool | null |
no |
null |
警告がある場合の結果 |
warn.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
error |
dict[str, any] | Data | str | bool | null |
no |
null |
エラーがある場合の結果 |
error.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
schema |
dict[str, any] | null |
no |
null |
スキーマ情報 |
end |
bool | null |
no |
null |
終了フラグ |
rag ( list ) : cmdbox -m rag -c list <Option>
Display a list of saved RAG settings.
Option |
Type |
Multi |
Required |
Default |
Choices |
Description |
|---|---|---|---|---|---|---|
--host <host> |
str |
required |
localhost |
Specify the service host of the Redis server. |
||
--port <port> |
int |
required |
6379 |
Specify the service port of the Redis server. |
||
--password <password> |
passwd |
required |
password |
Specify the access password of the Redis server (optional). If omitted, password is used. |
||
--svname <svname> |
str |
required |
cmdbox |
Specify the service name of the inference server. If omitted, server is used. |
||
--retry_count <retry_count> |
int |
3 |
Specifies the number of reconnections to the Redis server.If less than 0 is specified, reconnection is forever. |
|||
--retry_interval <retry_interval> |
int |
5 |
Specifies the number of seconds before reconnecting to the Redis server. |
|||
--timeout <timeout> |
int |
60 |
Specify the maximum waiting time until the server responds. |
|||
--kwd <kwd> |
str |
Specify the name you want to search for. Searches for partial matches. |
Output Schema
This command implements output_schema() returning Result model.
{
"success": {
"performance": [
{
"key": "string",
"value": null
}
],
"data": [
{
"name": "string",
"path": "<class 'pathlib.Path'>"
}
]
},
"warn": {},
"error": {},
"schema": {},
"end": false
}
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
success |
Data | null |
no |
null |
成功した場合の結果 |
success.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
success.data |
list[NamePath] |
no |
(必須) |
処理結果のデータ |
success.data.name |
str |
yes |
(必須) |
名前 |
success.data.path |
Path | str | null |
no |
null |
パス |
warn |
dict[str, any] | Data | str | bool | null |
no |
null |
警告がある場合の結果 |
warn.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
error |
dict[str, any] | Data | str | bool | null |
no |
null |
エラーがある場合の結果 |
error.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
schema |
dict[str, any] | null |
no |
null |
スキーマ情報 |
end |
bool | null |
no |
null |
終了フラグ |
rag ( load ) : cmdbox -m rag -c load <Option>
Loads the settings for RAG (Retrieval-Augmented Generation).
Option |
Type |
Multi |
Required |
Default |
Choices |
Description |
|---|---|---|---|---|---|---|
--host <host> |
str |
required |
localhost |
Specify the service host of the Redis server. |
||
--port <port> |
int |
required |
6379 |
Specify the service port of the Redis server. |
||
--password <password> |
passwd |
required |
password |
Specify the access password of the Redis server (optional). If omitted, password is used. |
||
--svname <svname> |
str |
required |
cmdbox |
Specify the service name of the inference server. |
||
--retry_count <retry_count> |
int |
3 |
Specifies the number of reconnections to the Redis server. |
|||
--retry_interval <retry_interval> |
int |
5 |
Specifies the number of seconds before reconnecting to the Redis server. |
|||
--timeout <timeout> |
int |
120 |
Specify the maximum waiting time until the server responds. |
|||
--rag_name <rag_name> |
str |
required |
Specify the name of the RAG configuration to load. |
Output Schema
This command implements output_schema() returning Result model.
{
"success": {
"performance": [
{
"key": "string",
"value": null
}
],
"rag_name": "string",
"rag_type": "string",
"savetype": "string",
"extract": [
"string"
],
"embed": "string",
"embed_vector_dim": 0,
"vector_store_pghost": "string",
"vector_store_pgport": 0,
"vector_store_pguser": "string",
"vector_store_pgpass": "string",
"vector_store_pgdbname": "string",
"graph_store_pghost": "string",
"graph_store_pgport": 0,
"graph_store_pguser": "string",
"graph_store_pgpass": "string",
"graph_store_pgdbname": "string"
},
"warn": {},
"error": {},
"schema": {},
"end": false
}
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
success |
Data | null |
no |
null |
成功した場合の結果 |
success.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
success.rag_name |
str | null |
no |
null |
RAG名 |
success.rag_type |
str | null |
no |
null |
RAGタイプ |
success.savetype |
str | null |
no |
null |
保存タイプ |
success.extract |
list[str] | null |
no |
null |
エクストラクト設定リスト |
success.embed |
str | null |
no |
null |
エンベッディング名 |
success.embed_vector_dim |
int | null |
no |
null |
エンベッディングベクトル次元数 |
success.vector_store_pghost |
str | null |
no |
null |
ベクトルストアPostgreSQLホスト |
success.vector_store_pgport |
int | null |
no |
null |
ベクトルストアPostgreSQLポート |
success.vector_store_pguser |
str | null |
no |
null |
ベクトルストアPostgreSQLユーザー |
success.vector_store_pgpass |
str | null |
no |
null |
ベクトルストアPostgreSQLパスワード |
success.vector_store_pgdbname |
str | null |
no |
null |
ベクトルストアPostgreSQLデータベース名 |
success.graph_store_pghost |
str | null |
no |
null |
グラフストアPostgreSQLホスト |
success.graph_store_pgport |
int | null |
no |
null |
グラフストアPostgreSQLポート |
success.graph_store_pguser |
str | null |
no |
null |
グラフストアPostgreSQLユーザー |
success.graph_store_pgpass |
str | null |
no |
null |
グラフストアPostgreSQLパスワード |
success.graph_store_pgdbname |
str | null |
no |
null |
グラフストアPostgreSQLデータベース名 |
warn |
dict[str, any] | Data | str | bool | null |
no |
null |
警告がある場合の結果 |
warn.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
error |
dict[str, any] | Data | str | bool | null |
no |
null |
エラーがある場合の結果 |
error.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
schema |
dict[str, any] | null |
no |
null |
スキーマ情報 |
end |
bool | null |
no |
null |
終了フラグ |
rag ( regist ) : cmdbox -m rag -c regist <Option>
Execute the RAG (Retrieval-Augmented Generation) registration process.
Option |
Type |
Multi |
Required |
Default |
Choices |
Description |
|---|---|---|---|---|---|---|
--host <host> |
str |
required |
localhost |
Specify the service host of the Redis server. |
||
--port <port> |
int |
required |
6379 |
Specify the service port of the Redis server. |
||
--password <password> |
passwd |
required |
password |
Specify the access password of the Redis server (optional). If omitted, password is used. |
||
--svname <svname> |
str |
required |
cmdbox |
Specify the service name of the inference server. |
||
--retry_count <retry_count> |
int |
3 |
Specifies the number of reconnections to the Redis server. |
|||
--retry_interval <retry_interval> |
int |
5 |
Specifies the number of seconds before reconnecting to the Redis server. |
|||
--timeout <timeout> |
int |
120 |
Specify the maximum waiting time until the server responds. |
|||
--rag_name <rag_name> |
str |
required |
Specify the name of the RAG configuration to use for registration. |
|||
--data <data> |
dir |
required |
C:Usershama.cmdbox |
When omitted, $HONE/.cmdbox is used. |
||
--signin_file <signin_file> |
file |
required |
.cmdbox/user_list.yml |
Specify a file containing users and passwords with which they can signin.Typically, specify '.cmdbox/user_list.yml'. |
||
--groups <groups> |
str |
multi |
required |
Specifies that signin_file, if specified, should return the list of commands allowed for this user group. |
Output Schema
This command implements output_schema() returning Result model.
{
"success": {
"performance": [
{
"key": "string",
"value": null
}
],
"data": "string"
},
"warn": {},
"error": {},
"schema": {},
"end": false
}
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
success |
Data | null |
no |
null |
成功した場合の結果 |
success.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
success.data |
str | null |
no |
null |
処理結果のデータ |
warn |
dict[str, any] | Data | str | bool | null |
no |
null |
警告がある場合の結果 |
warn.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
error |
dict[str, any] | Data | str | bool | null |
no |
null |
エラーがある場合の結果 |
error.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
schema |
dict[str, any] | null |
no |
null |
スキーマ情報 |
end |
bool | null |
no |
null |
終了フラグ |
rag ( save ) : cmdbox -m rag -c save <Option>
Saves the settings for RAG (Retrieval-Augmented Generation).
Option |
Type |
Multi |
Required |
Default |
Choices |
Description |
|---|---|---|---|---|---|---|
--host <host> |
str |
required |
localhost |
Specify the service host of the Redis server. |
||
--port <port> |
int |
required |
6379 |
Specify the service port of the Redis server. |
||
--password <password> |
passwd |
required |
password |
Specify the access password of the Redis server (optional). If omitted, password is used. |
||
--svname <svname> |
str |
required |
cmdbox |
Specify the service name of the inference server. |
||
--retry_count <retry_count> |
int |
3 |
Specifies the number of reconnections to the Redis server. |
|||
--retry_interval <retry_interval> |
int |
5 |
Specifies the number of seconds before reconnecting to the Redis server. |
|||
--timeout <timeout> |
int |
120 |
Specify the maximum waiting time until the server responds. |
|||
--rag_name <rag_name> |
str |
required |
Specify the name of the RAG configuration. |
|||
--rag_type <rag_type> |
str |
required |
vector |
|
Specify the type of RAG. |
|
--extract <extract> |
str |
multi |
required |
Specify the registered name for the Extract process used in RAG. If no candidates exist, you must register a command in extract mode. |
||
--embed <embed> |
str |
If rag_type is vector, specify the registration name of the embed model. |
||||
--embed_vector_dim <embed_vector_dim> |
int |
256 |
Specify the vector dimension for embedding. |
|||
--savetype <savetype> |
str |
per_doc |
per_doc | per_service | add_only |
Specify the storage pattern. per_doc :per document, per_service :per service, add_only :add only |
||
--vector_store_pghost <vector_store_pghost> |
str |
pgsql |
Specify the postgresql host for VecRAG storage. |
|||
--vector_store_pgport <vector_store_pgport> |
int |
5432 |
Specify the postgresql port for VecRAG storage. |
|||
--vector_store_pguser <vector_store_pguser> |
str |
pgsql |
Specify the postgresql user for VecRAG storage. |
|||
--vector_store_pgpass <vector_store_pgpass> |
passwd |
pgsql |
Specify the postgresql password for VecRAG storage. |
|||
--vector_store_pgdbname <vector_store_pgdbname> |
str |
pgsql |
Specify the postgresql database name for VecRAG storage. |
|||
--graph_store_pghost <graph_store_pghost> |
str |
pgsql |
Specify the postgresql host for GraphRAG storage. |
|||
--graph_store_pgport <graph_store_pgport> |
int |
5432 |
Specify the postgresql port for GraphRAG storage. |
|||
--graph_store_pguser <graph_store_pguser> |
str |
pgsql |
Specify the postgresql user for GraphRAG storage. |
|||
--graph_store_pgpass <graph_store_pgpass> |
passwd |
pgsql |
Specify the postgresql password for GraphRAG storage. |
|||
--graph_store_pgdbname <graph_store_pgdbname> |
str |
pgsql |
Specify the postgresql database name for GraphRAG storage. |
Output Schema
This command implements output_schema() returning Result model.
{
"success": {
"performance": [
{
"key": "string",
"value": null
}
],
"data": "string"
},
"warn": {},
"error": {},
"schema": {},
"end": false
}
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
success |
Data | null |
no |
null |
成功した場合の結果 |
success.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
success.data |
str | null |
no |
null |
処理結果のデータ |
warn |
dict[str, any] | Data | str | bool | null |
no |
null |
警告がある場合の結果 |
warn.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
error |
dict[str, any] | Data | str | bool | null |
no |
null |
エラーがある場合の結果 |
error.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
schema |
dict[str, any] | null |
no |
null |
スキーマ情報 |
end |
bool | null |
no |
null |
終了フラグ |
rag ( search ) : cmdbox -m rag -c search <Option>
Execute the RAG (Retrieval-Augmented Generation) search process.
Option |
Type |
Multi |
Required |
Default |
Choices |
Description |
|---|---|---|---|---|---|---|
--host <host> |
str |
required |
localhost |
Specify the service host of the Redis server. |
||
--port <port> |
int |
required |
6379 |
Specify the service port of the Redis server. |
||
--password <password> |
passwd |
required |
password |
Specify the access password of the Redis server (optional). If omitted, password is used. |
||
--svname <svname> |
str |
required |
cmdbox |
Specify the service name of the inference server. |
||
--retry_count <retry_count> |
int |
3 |
Specifies the number of reconnections to the Redis server. |
|||
--retry_interval <retry_interval> |
int |
5 |
Specifies the number of seconds before reconnecting to the Redis server. |
|||
--timeout <timeout> |
int |
600 |
Specify the maximum waiting time until the server responds. |
|||
--rag_name <rag_name> |
str |
required |
Specify the name of the RAG configuration to use for registration. |
|||
--query <query> |
str |
Specifies a search query. |
||||
--kcount <kcount> |
int |
required |
5 |
Specify the number of search results. If filter conditions are specified, the results will be filtered from the number of results specified here. |
||
--select <select> |
str |
multi |
Specifies the items to be retrieved. If not specified, all items are returned. |
|||
--filter_origin_name <filter_origin_name> |
str |
Specifies the origin_name of the filter condition. |
||||
--filter_dict <filter_dict> |
dict |
multi |
Specify arbitrary filter conditions, allowing multiple cmeta item names and values. Item values can be ambiguously searched by using %. You can use the value of the query parameter by including the notation {args.query}. |
|||
--sort_dict <sort_dict> |
dict |
multi |
|
Specifies the sort conditions when no query is specified. Multiple cmeta field names and sort orders (ASC (ascending) or DESC (descending)) can be specified. |
||
--data <data> |
dir |
required |
C:Usershama.cmdbox |
When omitted, $HONE/.cmdbox is used. |
||
--signin_file <signin_file> |
file |
required |
.cmdbox/user_list.yml |
Specify a file containing users and passwords with which they can signin.Typically, specify '.cmdbox/user_list.yml'. |
||
--groups <groups> |
str |
multi |
required |
Specifies that signin_file, if specified, should return the list of commands allowed for this user group. |
Output Schema
This command implements output_schema() returning Result model.
{
"success": {
"performance": [
{
"key": "string",
"value": null
}
],
"data": [
null
]
},
"warn": {},
"error": {},
"schema": {},
"end": false
}
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
success |
Data | null |
no |
null |
成功した場合の結果 |
success.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
success.data |
list[any] | null |
no |
null |
処理結果のデータ |
warn |
dict[str, any] | Data | str | bool | null |
no |
null |
警告がある場合の結果 |
warn.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
error |
dict[str, any] | Data | str | bool | null |
no |
null |
エラーがある場合の結果 |
error.performance |
list[KeyVal] | null |
no |
null |
パフォーマンス情報のリスト |
schema |
dict[str, any] | null |
no |
null |
スキーマ情報 |
end |
bool | null |
no |
null |
終了フラグ |