Generate a Private Deep Research on a pipeline
Beta Feature
The API and Deep Research are currently in beta. Features and configuration may change.
Prerequisites
Before you begin, you'll need:
- A Vectorize account
- An API access token (create one here)
- Your organization ID (see below)
- A pipeline ID (see below)
Finding your Organization ID
Your organization ID is in the Vectorize platform URL:
https://platform.vectorize.io/organization/[YOUR-ORG-ID]
For example, if your URL is:
https://platform.vectorize.io/organization/ecf3fa1d-30d0-4df1-8af6-f4852bc851cb
Your organization ID is: ecf3fa1d-30d0-4df1-8af6-f4852bc851cb
Finding your Pipeline ID
Navigate to your pipeline in the Vectorize platform. The pipeline ID is shown in:
- The URL:
https://platform.vectorize.io/organization/[org-id]/pipeline/[PIPELINE-ID]
- The pipeline details page
- The "Connect" tab of your pipeline
Generate the Deep Research
With your pipeline ID ready, you can now start a deep research task. This will analyze your pipeline's data to generate comprehensive insights based on your query.
- Python
- Node.js
# Using the pipelines_api from Getting Started
response = pipelines_api.start_deep_research(
org_id,
pipeline_id,
v.StartDeepResearchRequest(
# make sure to include a relevant prompt here
query="What is the meaning of life?",
# optionally enable additional search on the web
web_search=False,
)
)
research_id = response.research_id
const pipelineId = "your-pipeline-id";
const response = await pipelinesApi.startDeepResearch({
organizationId: orgId,
pipelineId: pipelineId,
startDeepResearchRequest: {
// make sure to include a relevant prompt here
query: "Generate a report on financial status of company XX",
// optionally enable additional search on the web
webSearch: false
}
});
const researchId = response.researchId;
Get the Deep Research result
Deep Research tasks run asynchronously. Use the research ID returned from the previous step to check the status and retrieve your results.
- Python
- Node.js
while True:
response = pipelines_api.get_deep_research_result(org_id, pipeline_id, research_id)
if response.ready:
if response.data.success:
print(response.data.markdown)
else:
print("Deep Research failed:", response.data.error)
break
print("Deep Research in progress...")
time.sleep(5) # Wait 5 seconds before checking again
// Helper function to sleep
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
while (true) {
const result = await pipelinesApi.getDeepResearchResult({
organizationId: orgId,
pipelineId: pipelineId,
researchId: researchId
});
if (result.ready) {
if (result.data.success) {
console.log(result.data.markdown);
} else {
console.log("Deep Research failed:", result.data.error);
}
break;
}
console.log("Deep Research in progress...");
await sleep(5000); // Wait 5 seconds before checking again
}