Configuration options for the analysis step
Options for the analysis step
Focus area for analysis (e.g., 'market-trends', 'technical-details')
Optionalllm?: LanguageModelV1Model to use for analysis (from the AI SDK)
Optionaltemperature?: numberTemperature for the LLM (0.0 to 1.0)
Optionaldepth?: "basic" | "detailed" | "comprehensive"Depth of analysis ('basic', 'detailed', 'comprehensive')
OptionalincludeEvidence?: booleanWhether to include supporting evidence in the analysis
OptionalincludeRecommendations?: booleanWhether to include recommendations in the analysis
OptionalincludeInResults?: booleanWhether to add the analysis to the final results
OptionalcustomPrompt?: stringCustom prompt for analysis
OptionalallowEmptyContent?: booleanWhether to proceed if no content is available
OptionalmaxContentSize?: numberMaximum content size for analysis (in characters)
Optionalretry?: { maxRetries?: number; baseDelay?: number }Retry configuration for LLM calls
OptionalmaxRetries?: numberMaximum number of retries
OptionalbaseDelay?: 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.