parallel-data-enrichment
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseData Enrichment
数据补全
Enrich: $ARGUMENTS
补全操作:$ARGUMENTS
Before starting
开始之前
Inform the user that enrichment may take several minutes depending on the number of rows and fields requested.
告知用户,补全所需时间取决于请求的行数和字段数量,可能需要几分钟。
Step 1: Start the enrichment
步骤1:启动补全任务
Use ONE of these command patterns (substitute user's actual data):
For inline data:
bash
parallel-cli enrich run --data '[{"company": "Google"}, {"company": "Microsoft"}]' --intent "CEO name and founding year" --target "output.csv" --no-waitFor CSV file:
bash
parallel-cli enrich run --source-type csv --source "input.csv" --target "output.csv" --source-columns '[{"name": "company", "description": "Company name"}]' --intent "CEO name and founding year" --no-waitIMPORTANT: Always include so the command returns immediately instead of blocking.
--no-waitParse the output to extract the and monitoring URL. Immediately tell the user:
taskgroup_id- Enrichment has been kicked off
- The monitoring URL where they can track progress
Tell them they can background the polling step to continue working while it runs.
使用以下任一命令模式(替换为用户的实际数据):
针对内嵌数据:
bash
parallel-cli enrich run --data '[{"company": "Google"}, {"company": "Microsoft"}]' --intent "CEO name and founding year" --target "output.csv" --no-wait针对CSV文件:
bash
parallel-cli enrich run --source-type csv --source "input.csv" --target "output.csv" --source-columns '[{"name": "company", "description": "Company name"}]' --intent "CEO name and founding year" --no-wait重要提示: 务必添加参数,让命令立即返回,而非阻塞等待。
--no-wait解析输出内容以提取和监控URL。立即告知用户:
taskgroup_id- 补全任务已启动
- 可用于跟踪进度的监控URL
告知用户可以将轮询步骤置于后台,以便在任务运行期间继续其他工作。
Step 2: Poll for results
步骤2:轮询任务结果
bash
parallel-cli enrich poll "$TASKGROUP_ID" --timeout 540Important:
- Use (9 minutes) to stay within tool execution limits
--timeout 540
bash
parallel-cli enrich poll "$TASKGROUP_ID" --timeout 540注意事项:
- 使用(9分钟)以符合工具执行限制
--timeout 540
If the poll times out
若轮询超时
Enrichment of large datasets can take longer than 9 minutes. If the poll exits without completing:
- Tell the user the enrichment is still running server-side
- Re-run the same command to continue waiting
parallel-cli enrich poll
大型数据集的补全耗时可能超过9分钟。如果轮询未完成就退出:
- 告知用户补全任务仍在服务器端运行
- 重新执行相同的命令以继续等待
parallel-cli enrich poll
Response format
响应格式
After step 1: Share the monitoring URL (for tracking progress).
After step 2:
- Report number of rows enriched
- Preview first few rows of the output CSV
- Tell user the full path to the output CSV file
Do NOT re-share the monitoring URL after completion — the results are in the output file.
步骤1完成后: 分享监控URL(用于跟踪进度)。
步骤2完成后:
- 报告已补全的行数
- 预览输出CSV的前几行内容
- 告知用户输出CSV文件的完整路径
任务完成后请勿再次分享监控URL——结果已保存至输出文件中。
Setup
环境配置
If is not found, install and authenticate:
parallel-clibash
curl -fsSL https://parallel.ai/install.sh | bashIf unable to install that way, install via pipx instead:
bash
pipx install "parallel-web-tools[cli]"
pipx ensurepathThen authenticate:
bash
parallel-cli loginOr set an API key:
export PARALLEL_API_KEY="your-key"若未找到,请进行安装并认证:
parallel-clibash
curl -fsSL https://parallel.ai/install.sh | bash若无法通过上述方式安装,可改用pipx安装:
bash
pipx install "parallel-web-tools[cli]"
pipx ensurepath然后进行认证:
bash
parallel-cli login或设置API密钥:
export PARALLEL_API_KEY="your-key"