Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
A comprehensive collection of Agent Skills for context engineering, multi-agent architectures, and production agent systems.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
examples/llm-as-judge-skills/agents/research-agent/research-agent.md
1# Research Agent23## Purpose45The Research Agent gathers, synthesizes, and summarizes information from multiple sources to answer complex research questions. It implements a multi-step research workflow with source verification and citation tracking.67## Agent Definition89```typescript10import { ToolLoopAgent } from "ai";11import { openai } from "@ai-sdk/openai";12import { researchTools } from "../tools";1314export const researchAgent = new ToolLoopAgent({15name: "researcher",16model: openai("gpt-4o"),17instructions: `You are an expert research analyst.1819Your role is to:201. Break down complex research questions into searchable queries212. Gather information from multiple sources223. Verify and cross-reference claims234. Synthesize findings into coherent summaries245. Provide proper citations for all claims2526Research Methodology:27- Start with broad searches to understand the landscape28- Narrow down to specific sources for detailed information29- Always verify facts from multiple sources when possible30- Distinguish between facts, claims, and opinions31- Note the recency and authority of sources3233Quality Standards:34- Never fabricate information or sources35- Clearly indicate when information is uncertain36- Provide direct quotes when precision matters37- Include source URLs/references for verification`,3839tools: {40webSearch: researchTools.webSearch,41readUrl: researchTools.readUrl,42extractClaims: researchTools.extractClaims,43verifyClaim: researchTools.verifyClaim,44synthesize: researchTools.synthesize45}46});47```4849## Capabilities5051### Web Search52Search the web for relevant information.5354**Input:**55- Search query56- Optional filters (date, source type)5758**Output:**59- List of relevant results60- Snippets and URLs61- Source metadata6263### URL Reading64Extract content from a specific URL.6566**Input:**67- URL to read68- Content type (article, paper, documentation)6970**Output:**71- Extracted text content72- Key sections identified73- Publication metadata7475### Claim Extraction76Identify distinct claims from a source.7778**Input:**79- Source text80- Claim types to extract8182**Output:**83- List of claims84- Confidence level85- Supporting context8687### Claim Verification88Cross-reference a claim against other sources.8990**Input:**91- Claim to verify92- Original source9394**Output:**95- Verification status96- Supporting/contradicting sources97- Confidence assessment9899### Synthesis100Combine findings into a coherent summary.101102**Input:**103- Research findings104- Target format105- Key questions to answer106107**Output:**108- Synthesized summary109- Key insights110- Source citations111112## Configuration113114```typescript115interface ResearchConfig {116// Search configuration117maxSearchResults: number;118preferredSources: string[];119excludedDomains: string[];120121// Verification settings122minSourcesForVerification: number;123requireRecentSources: boolean;124maxSourceAge: "1month" | "6months" | "1year" | "any";125126// Output configuration127citationStyle: "inline" | "footnote" | "endnote";128summaryLength: "brief" | "standard" | "comprehensive";129includeSourceQuality: boolean;130}131132const defaultConfig: ResearchConfig = {133maxSearchResults: 10,134preferredSources: [],135excludedDomains: [],136minSourcesForVerification: 2,137requireRecentSources: false,138maxSourceAge: "any",139citationStyle: "inline",140summaryLength: "standard",141includeSourceQuality: true142};143```144145## Usage Example146147```typescript148import { researchAgent } from "./agents/research-agent";149150const research = await researchAgent.generate({151prompt: `Research the current state of LLM evaluation methods.152153I need to understand:1541. What are the main approaches to evaluating LLM outputs?1552. What are the limitations of human evaluation?1563. How reliable are LLM-based evaluators compared to humans?1574. What are best practices for implementing LLM-as-a-Judge?158159Provide a comprehensive summary with citations.`160});161```162163## Research Workflow164165```mermaid166graph TD167A[Research Question] --> B[Query Decomposition]168B --> C[Initial Search]169C --> D[Source Selection]170D --> E[Deep Reading]171E --> F[Claim Extraction]172F --> G[Cross-Verification]173G --> H[Synthesis]174H --> I[Final Report]175```176177## Integration Points178179- **Knowledge Base Building**: Populate internal knowledge stores180- **Fact Checking**: Verify claims in generated content181- **Market Research**: Gather competitive intelligence182- **Technical Documentation**: Research implementation approaches183184