Configuration options for the analysis step
Options for the analysis step
Focus area for analysis (e.g., 'market-trends', 'technical-details')
Optional
llm?: LanguageModelV1Model to use for analysis (from the AI SDK)
Optional
temperature?: numberTemperature for the LLM (0.0 to 1.0)
Optional
depth?: "basic" | "detailed" | "comprehensive"Depth of analysis ('basic', 'detailed', 'comprehensive')
Optional
includeEvidence?: booleanWhether to include supporting evidence in the analysis
Optional
includeRecommendations?: booleanWhether to include recommendations in the analysis
Optional
includeInResults?: booleanWhether to add the analysis to the final results
Optional
customPrompt?: stringCustom prompt for analysis
Optional
allowEmptyContent?: booleanWhether to proceed if no content is available
Optional
maxContentSize?: numberMaximum content size for analysis (in characters)
Optional
retry?: { maxRetries?: number; baseDelay?: number }Retry configuration for LLM calls
Optional
maxRetries?: numberMaximum number of retries
Optional
baseDelay?: numberBase delay between retries in ms
A configured analysis step for the research pipeline
import { research, analyze } from '@plust/datasleuth';
import { openai } from '@ai-sdk/openai';
const results = await research({
query: "Impact of AI on healthcare",
steps: [
// Other steps...
analyze({
focus: 'ethical-considerations',
llm: openai('gpt-4o'),
depth: 'comprehensive',
includeRecommendations: true
})
],
outputSchema: outputSchema
});
Creates an analysis step for the research pipeline
This function creates a step that analyzes research data using AI to extract insights, identify patterns, and provide recommendations based on the specified focus area. The step will process available data from previous steps, such as extracted content and fact-checked statements.