[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XG29TP4E219WQS4GXTZM6G":3,"skill-same:01M6XG29TP4E219WQS4GXTZM6G":97},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":14,"repositoryHtmlUrl":66,"repositoryHomepageUrl":6,"ownerHtmlUrl":67,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":68,"install":69,"resources":82},"01M6XG29TP4E219WQS4GXTZM6G","dspy",null,"Build complex AI systems with declarative programming, optimize prompts automatically, create modular RAG systems and agents with DSPy - Stanford NLP's framework for systematic LM programming","fadrienne\u002FMyGitHub","fadrienne","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F197874571?v=4","01M6X64V8VWCRSMFZ4EPS2BWXG","Francesca Adrienne","01M6X64VD5MW4F9PHDWQKS7ZAF",0,"MIT","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fllm-tools\u002Fdspy\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[5,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"synthetic","declarative","automatic","for","Modular AI","Automatic Optimization","Stanford NLP","LM Programming","Prompt Optimization","Declarative Programming","modular","systematic","optimize","Tools","Optimization","framework","openai","create","rag","2026-11-10 10:12:30",false,"---\nname: dspy\ndescription: Build complex AI systems with declarative programming, optimize prompts automatically, create modular RAG systems and agents with DSPy - Stanford NLP's framework for systematic LM programming\ncategory: llm-tools\nversion: 1.0.0\nauthor: Synthetic Sciences\nlicense: MIT\ntags: [Prompt Engineering, DSPy, Declarative Programming, RAG, Agents, Prompt Optimization, LM Programming, Stanford NLP, Automatic Optimization, Modular AI]\ndependencies: [dspy, openai, anthropic]\n---\n\n# DSPy: Declarative Language Model Programming\n\n## When to Use This Skill\n\nUse DSPy when you need to:\n- **Build complex AI systems** with multiple components and workflows\n- **Program LMs declaratively** instead of manual prompt engineering\n- **Optimize prompts automatically** using data-driven methods\n- **Create modular AI pipelines** that are maintainable and portable\n- **Improve model outputs systematically** with optimizers\n- **Build RAG systems, agents, or classifiers** with better reliability\n\n**GitHub Stars**: 22,000+ | **Created By**: Stanford NLP\n\n## Installation\n\n```bash\n# Stable release\npip install dspy\n\n# Latest development version\npip install git+https:\u002F\u002Fgithub.com\u002Fstanfordnlp\u002Fdspy.git\n\n# With specific LM providers\npip install dspy[openai]        # OpenAI\npip install dspy[anthropic]     # Anthropic Claude\npip install dspy[all]           # All providers\n```\n\n## Quick Start\n\n### Basic Example: Question Answering\n\n```python\nimport dspy\n\n# Configure your language model\nlm = dspy.Claude(model=\"claude-sonnet-4-5-20250929\")\ndspy.settings.configure(lm=lm)\n\n# Define a signature (input → output)\nclass QA(dspy.Signature):\n    \"\"\"Answer questions with short factual answers.\"\"\"\n    question = dspy.InputField()\n    answer = dspy.OutputField(desc=\"often between 1 and 5 words\")\n\n# Create a module\nqa = dspy.Predict(QA)\n\n# Use it\nresponse = qa(question=\"What is the capital of France?\")\nprint(response.answer)  # \"Paris\"\n```\n\n### Chain of Thought Reasoning\n\n```python\nimport dspy\n\nlm = dspy.Claude(model=\"claude-sonnet-4-5-20250929\")\ndspy.settings.configure(lm=lm)\n\n# Use ChainOfThought for better reasoning\nclass MathProblem(dspy.Signature):\n    \"\"\"Solve math word problems.\"\"\"\n    problem = dspy.InputField()\n    answer = dspy.OutputField(desc=\"numerical answer\")\n\n# ChainOfThought generates reasoning steps automatically\ncot = dspy.ChainOfThought(MathProblem)\n\nresponse = cot(problem=\"If John has 5 apples and gives 2 to Mary, how many does he have?\")\nprint(response.rationale)  # Shows reasoning steps\nprint(response.answer)     # \"3\"\n```\n\n## Core Concepts\n\n### 1. Signatures\n\nSignatures define the structure of your AI task (inputs → outputs):\n\n```python\n# Inline signature (simple)\nqa = dspy.Predict(\"question -> answer\")\n\n# Class signature (detailed)\nclass Summarize(dspy.Signature):\n    \"\"\"Summarize text into key points.\"\"\"\n    text = dspy.InputField()\n    summary = dspy.OutputField(desc=\"bullet points, 3-5 items\")\n\nsummarizer = dspy.ChainOfThought(Summarize)\n```\n\n**When to use each:**\n- **Inline**: Quick prototyping, simple tasks\n- **Class**: Complex tasks, type hints, better documentation\n\n### 2. Modules\n\nModules are reusable components that transform inputs to outputs:\n\n#### dspy.Predict\nBasic prediction module:\n\n```python\npredictor = dspy.Predict(\"context, question -> answer\")\nresult = predictor(context=\"Paris is the capital of France\",\n                   question=\"What is the capital?\")\n```\n\n#### dspy.ChainOfThought\nGenerates reasoning steps before answering:\n\n```python\ncot = dspy.ChainOfThought(\"question -> answer\")\nresult = cot(question=\"Why is the sky blue?\")\nprint(result.rationale)  # Reasoning steps\nprint(result.answer)     # Final answer\n```\n\n#### dspy.ReAct\nAgent-like reasoning with tools:\n\n```python\nfrom dspy.predict import ReAct\n\nclass SearchQA(dspy.Signature):\n    \"\"\"Answer questions using search.\"\"\"\n    question = dspy.InputField()\n    answer = dspy.OutputField()\n\ndef search_tool(query: str) -> str:\n    \"\"\"Search Wikipedia.\"\"\"\n    # Your search implementation\n    return results\n\nreact = ReAct(SearchQA, tools=[search_tool])\nresult = react(question=\"When was Python created?\")\n```\n\n#### dspy.ProgramOfThought\nGenerates and executes code for reasoning:\n\n```python\npot = dspy.ProgramOfThought(\"question -> answer\")\nresult = pot(question=\"What is 15% of 240?\")\n# Generates: answer = 240 * 0.15\n```\n\n### 3. Optimizers\n\nOptimizers improve your modules automatically using training data:\n\n#### BootstrapFewShot\nLearns from examples:\n\n```python\nfrom dspy.teleprompt import BootstrapFewShot\n\n# Training data\ntrainset = [\n    dspy.Example(question=\"What is 2+2?\", answer=\"4\").with_inputs(\"question\"),\n    dspy.Example(question=\"What is 3+5?\", answer=\"8\").with_inputs(\"question\"),\n]\n\n# Define metric\ndef validate_answer(example, pred, trace=None):\n    return example.answer == pred.answer\n\n# Optimize\noptimizer = BootstrapFewShot(metric=validate_answer, max_bootstrapped_demos=3)\noptimized_qa = optimizer.compile(qa, trainset=trainset)\n\n# Now optimized_qa performs better!\n```\n\n#### MIPRO (Most Important Prompt Optimization)\nIteratively improves prompts:\n\n```python\nfrom dspy.teleprompt import MIPRO\n\noptimizer = MIPRO(\n    metric=validate_answer,\n    num_candidates=10,\n    init_temperature=1.0\n)\n\noptimized_cot = optimizer.compile(\n    cot,\n    trainset=trainset,\n    num_trials=100\n)\n```\n\n#### BootstrapFinetune\nCreates datasets for model fine-tuning:\n\n```python\nfrom dspy.teleprompt import BootstrapFinetune\n\noptimizer = BootstrapFinetune(metric=validate_answer)\noptimized_module = optimizer.compile(qa, trainset=trainset)\n\n# Exports training data for fine-tuning\n```\n\n### 4. Building Complex Systems\n\n#### Multi-Stage Pipeline\n\n```python\nimport dspy\n\nclass MultiHopQA(dspy.Module):\n    def __init__(self):\n        super().__init__()\n        self.retrieve = dspy.Retrieve(k=3)\n        self.generate_query = dspy.ChainOfThought(\"question -> search_query\")\n        self.generate_answer = dspy.ChainOfThought(\"context, question -> answer\")\n\n    def forward(self, question):\n        # Stage 1: Generate search query\n        search_query = self.generate_query(question=question).search_query\n\n        # Stage 2: Retrieve context\n        passages = self.retrieve(search_query).passages\n        context = \"\\n\".join(passages)\n\n        # Stage 3: Generate answer\n        answer = self.generate_answer(context=context, question=question).answer\n        return dspy.Prediction(answer=answer, context=context)\n\n# Use the pipeline\nqa_system = MultiHopQA()\nresult = qa_system(question=\"Who wrote the book that inspired the movie Blade Runner?\")\n```\n\n#### RAG System with Optimization\n\n```python\nimport dspy\nfrom dspy.retrieve.chromadb_rm import ChromadbRM\n\n# Configure retriever\nretriever = ChromadbRM(\n    collection_name=\"documents\",\n    persist_directory=\".\u002Fchroma_db\"\n)\n\nclass RAG(dspy.Module):\n    def __init__(self, num_passages=3):\n        super().__init__()\n        self.retrieve = dspy.Retrieve(k=num_passages)\n        self.generate = dspy.ChainOfThought(\"context, question -> answer\")\n\n    def forward(self, question):\n        context = self.retrieve(question).passages\n        return self.generate(context=context, question=question)\n\n# Create and optimize\nrag = RAG()\n\n# Optimize with training data\nfrom dspy.teleprompt import BootstrapFewShot\n\noptimizer = BootstrapFewShot(metric=validate_answer)\noptimized_rag = optimizer.compile(rag, trainset=trainset)\n```\n\n## LM Provider Configuration\n\n### Anthropic Claude\n\n```python\nimport dspy\n\nlm = dspy.Claude(\n    model=\"claude-sonnet-4-5-20250929\",\n    api_key=\"your-api-key\",  # Or set ANTHROPIC_API_KEY env var\n    max_tokens=1000,\n    temperature=0.7\n)\ndspy.settings.configure(lm=lm)\n```\n\n### OpenAI\n\n```python\nlm = dspy.OpenAI(\n    model=\"gpt-4\",\n    api_key=\"your-api-key\",\n    max_tokens=1000\n)\ndspy.settings.configure(lm=lm)\n```\n\n### Local Models (Ollama)\n\n```python\nlm = dspy.OllamaLocal(\n    model=\"llama3.1\",\n    base_url=\"http:\u002F\u002Flocalhost:11434\"\n)\ndspy.settings.configure(lm=lm)\n```\n\n### Multiple Models\n\n```python\n# Different models for different tasks\ncheap_lm = dspy.OpenAI(model=\"gpt-3.5-turbo\")\nstrong_lm = dspy.Claude(model=\"claude-sonnet-4-5-20250929\")\n\n# Use cheap model for retrieval, strong model for reasoning\nwith dspy.settings.context(lm=cheap_lm):\n    context = retriever(question)\n\nwith dspy.settings.context(lm=strong_lm):\n    answer = generator(context=context, question=question)\n```\n\n## Common Patterns\n\n### Pattern 1: Structured Output\n\n```python\nfrom pydantic import BaseModel, Field\n\nclass PersonInfo(BaseModel):\n    name: str = Field(description=\"Full name\")\n    age: int = Field(description=\"Age in years\")\n    occupation: str = Field(description=\"Current job\")\n\nclass ExtractPerson(dspy.Signature):\n    \"\"\"Extract person information from text.\"\"\"\n    text = dspy.InputField()\n    person: PersonInfo = dspy.OutputField()\n\nextractor = dspy.TypedPredictor(ExtractPerson)\nresult = extractor(text=\"John Doe is a 35-year-old software engineer.\")\nprint(result.person.name)  # \"John Doe\"\nprint(result.person.age)   # 35\n```\n\n### Pattern 2: Assertion-Driven Optimization\n\n```python\nimport dspy\nfrom dspy.primitives.assertions import assert_transform_module, backtrack_handler\n\nclass MathQA(dspy.Module):\n    def __init__(self):\n        super().__init__()\n        self.solve = dspy.ChainOfThought(\"problem -> solution: float\")\n\n    def forward(self, problem):\n        solution = self.solve(problem=problem).solution\n\n        # Assert solution is numeric\n        dspy.Assert(\n            isinstance(float(solution), float),\n            \"Solution must be a number\",\n            backtrack=backtrack_handler\n        )\n\n        return dspy.Prediction(solution=solution)\n```\n\n### Pattern 3: Self-Consistency\n\n```python\nimport dspy\nfrom collections import Counter\n\nclass ConsistentQA(dspy.Module):\n    def __init__(self, num_samples=5):\n        super().__init__()\n        self.qa = dspy.ChainOfThought(\"question -> answer\")\n        self.num_samples = num_samples\n\n    def forward(self, question):\n        # Generate multiple answers\n        answers = []\n        for _ in range(self.num_samples):\n            result = self.qa(question=question)\n            answers.append(result.answer)\n\n        # Return most common answer\n        most_common = Counter(answers).most_common(1)[0][0]\n        return dspy.Prediction(answer=most_common)\n```\n\n### Pattern 4: Retrieval with Reranking\n\n```python\nclass RerankedRAG(dspy.Module):\n    def __init__(self):\n        super().__init__()\n        self.retrieve = dspy.Retrieve(k=10)\n        self.rerank = dspy.Predict(\"question, passage -> relevance_score: float\")\n        self.answer = dspy.ChainOfThought(\"context, question -> answer\")\n\n    def forward(self, question):\n        # Retrieve candidates\n        passages = self.retrieve(question).passages\n\n        # Rerank passages\n        scored = []\n        for passage in passages:\n            score = float(self.rerank(question=question, passage=passage).relevance_score)\n            scored.append((score, passage))\n\n        # Take top 3\n        top_passages = [p for _, p in sorted(scored, reverse=True)[:3]]\n        context = \"\\n\\n\".join(top_passages)\n\n        # Generate answer\n        return self.answer(context=context, question=question)\n```\n\n## Evaluation and Metrics\n\n### Custom Metrics\n\n```python\ndef exact_match(example, pred, trace=None):\n    \"\"\"Exact match metric.\"\"\"\n    return example.answer.lower() == pred.answer.lower()\n\ndef f1_score(example, pred, trace=None):\n    \"\"\"F1 score for text overlap.\"\"\"\n    pred_tokens = set(pred.answer.lower().split())\n    gold_tokens = set(example.answer.lower().split())\n\n    if not pred_tokens:\n        return 0.0\n\n    precision = len(pred_tokens & gold_tokens) \u002F len(pred_tokens)\n    recall = len(pred_tokens & gold_tokens) \u002F len(gold_tokens)\n\n    if precision + recall == 0:\n        return 0.0\n\n    return 2 * (precision * recall) \u002F (precision + recall)\n```\n\n### Evaluation\n\n```python\nfrom dspy.evaluate import Evaluate\n\n# Create evaluator\nevaluator = Evaluate(\n    devset=testset,\n    metric=exact_match,\n    num_threads=4,\n    display_progress=True\n)\n\n# Evaluate model\nscore = evaluator(qa_system)\nprint(f\"Accuracy: {score}\")\n\n# Compare optimized vs unoptimized\nscore_before = evaluator(qa)\nscore_after = evaluator(optimized_qa)\nprint(f\"Improvement: {score_after - score_before:.2%}\")\n```\n\n## Best Practices\n\n### 1. Start Simple, Iterate\n\n```python\n# Start with Predict\nqa = dspy.Predict(\"question -> answer\")\n\n# Add reasoning if needed\nqa = dspy.ChainOfThought(\"question -> answer\")\n\n# Add optimization when you have data\noptimized_qa = optimizer.compile(qa, trainset=data)\n```\n\n### 2. Use Descriptive Signatures\n\n```python\n# ❌ Bad: Vague\nclass Task(dspy.Signature):\n    input = dspy.InputField()\n    output = dspy.OutputField()\n\n# ✅ Good: Descriptive\nclass SummarizeArticle(dspy.Signature):\n    \"\"\"Summarize news articles into 3-5 key points.\"\"\"\n    article = dspy.InputField(desc=\"full article text\")\n    summary = dspy.OutputField(desc=\"bullet points, 3-5 items\")\n```\n\n### 3. Optimize with Representative Data\n\n```python\n# Create diverse training examples\ntrainset = [\n    dspy.Example(question=\"factual\", answer=\"...).with_inputs(\"question\"),\n    dspy.Example(question=\"reasoning\", answer=\"...\").with_inputs(\"question\"),\n    dspy.Example(question=\"calculation\", answer=\"...\").with_inputs(\"question\"),\n]\n\n# Use validation set for metric\ndef metric(example, pred, trace=None):\n    return example.answer in pred.answer\n```\n\n### 4. Save and Load Optimized Models\n\n```python\n# Save\noptimized_qa.save(\"models\u002Fqa_v1.json\")\n\n# Load\nloaded_qa = dspy.ChainOfThought(\"question -> answer\")\nloaded_qa.load(\"models\u002Fqa_v1.json\")\n```\n\n### 5. Monitor and Debug\n\n```python\n# Enable tracing\ndspy.settings.configure(lm=lm, trace=[])\n\n# Run prediction\nresult = qa(question=\"...\")\n\n# Inspect trace\nfor call in dspy.settings.trace:\n    print(f\"Prompt: {call['prompt']}\")\n    print(f\"Response: {call['response']}\")\n```\n\n## Comparison to Other Approaches\n\n| Feature | Manual Prompting | LangChain | DSPy |\n|---------|-----------------|-----------|------|\n| Prompt Engineering | Manual | Manual | Automatic |\n| Optimization | Trial & error | None | Data-driven |\n| Modularity | Low | Medium | High |\n| Type Safety | No | Limited | Yes (Signatures) |\n| Portability | Low | Medium | High |\n| Learning Curve | Low | Medium | Medium-High |\n\n**When to choose DSPy:**\n- You have training data or can generate it\n- You need systematic prompt improvement\n- You're building complex multi-stage systems\n- You want to optimize across different LMs\n\n**When to choose alternatives:**\n- Quick prototypes (manual prompting)\n- Simple chains with existing tools (LangChain)\n- Custom optimization logic needed\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fdspy.ai\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fstanfordnlp\u002Fdspy (22k+ stars)\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FXCGy2WDCQB\n- **Twitter**: @DSPyOSS\n- **Paper**: \"DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines\"\n\n## See Also\n\n- `references\u002Fmodules.md` - Detailed module guide (Predict, ChainOfThought, ReAct, ProgramOfThought)\n- `references\u002Foptimizers.md` - Optimization algorithms (BootstrapFewShot, MIPRO, BootstrapFinetune)\n- `references\u002Fexamples.md` - Real-world examples (RAG, agents, classifiers)\n\n\n","# DSPy: Declarative Language Model Programming\n\n## When to Use This Skill\n\nUse DSPy when you need to:\n- **Build complex AI systems** with multiple components and workflows\n- **Program LMs declaratively** instead of manual prompt engineering\n- **Optimize prompts automatically** using data-driven methods\n- **Create modular AI pipelines** that are maintainable and portable\n- **Improve model outputs systematically** with optimizers\n- **Build RAG systems, agents, or classifiers** with better reliability\n\n**GitHub Stars**: 22,000+ | **Created By**: Stanford NLP\n\n## Installation\n\n```bash\n# Stable release\npip install dspy\n\n# Latest development version\npip install git+https:\u002F\u002Fgithub.com\u002Fstanfordnlp\u002Fdspy.git\n\n# With specific LM providers\npip install dspy[openai]        # OpenAI\npip install dspy[anthropic]     # Anthropic Claude\npip install dspy[all]           # All providers\n```\n\n## Quick Start\n\n### Basic Example: Question Answering\n\n```python\nimport dspy\n\n# Configure your language model\nlm = dspy.Claude(model=\"claude-sonnet-4-5-20250929\")\ndspy.settings.configure(lm=lm)\n\n# Define a signature (input → output)\nclass QA(dspy.Signature):\n    \"\"\"Answer questions with short factual answers.\"\"\"\n    question = dspy.InputField()\n    answer = dspy.OutputField(desc=\"often between 1 and 5 words\")\n\n# Create a module\nqa = dspy.Predict(QA)\n\n# Use it\nresponse = qa(question=\"What is the capital of France?\")\nprint(response.answer)  # \"Paris\"\n```\n\n### Chain of Thought Reasoning\n\n```python\nimport dspy\n\nlm = dspy.Claude(model=\"claude-sonnet-4-5-20250929\")\ndspy.settings.configure(lm=lm)\n\n# Use ChainOfThought for better reasoning\nclass MathProblem(dspy.Signature):\n    \"\"\"Solve math word problems.\"\"\"\n    problem = dspy.InputField()\n    answer = dspy.OutputField(desc=\"numerical answer\")\n\n# ChainOfThought generates reasoning steps automatically\ncot = dspy.ChainOfThought(MathProblem)\n\nresponse = cot(problem=\"If John has 5 apples and gives 2 to Mary, how many does he have?\")\nprint(response.rationale)  # Shows reasoning steps\nprint(response.answer)     # \"3\"\n```\n\n## Core Concepts\n\n### 1. Signatures\n\nSignatures define the structure of your AI task (inputs → outputs):\n\n```python\n# Inline signature (simple)\nqa = dspy.Predict(\"question -> answer\")\n\n# Class signature (detailed)\nclass Summarize(dspy.Signature):\n    \"\"\"Summarize text into key points.\"\"\"\n    text = dspy.InputField()\n    summary = dspy.OutputField(desc=\"bullet points, 3-5 items\")\n\nsummarizer = dspy.ChainOfThought(Summarize)\n```\n\n**When to use each:**\n- **Inline**: Quick prototyping, simple tasks\n- **Class**: Complex tasks, type hints, better documentation\n\n### 2. Modules\n\nModules are reusable components that transform inputs to outputs:\n\n#### dspy.Predict\nBasic prediction module:\n\n```python\npredictor = dspy.Predict(\"context, question -> answer\")\nresult = predictor(context=\"Paris is the capital of France\",\n                   question=\"What is the capital?\")\n```\n\n#### dspy.ChainOfThought\nGenerates reasoning steps before answering:\n\n```python\ncot = dspy.ChainOfThought(\"question -> answer\")\nresult = cot(question=\"Why is the sky blue?\")\nprint(result.rationale)  # Reasoning steps\nprint(result.answer)     # Final answer\n```\n\n#### dspy.ReAct\nAgent-like reasoning with tools:\n\n```python\nfrom dspy.predict import ReAct\n\nclass SearchQA(dspy.Signature):\n    \"\"\"Answer questions using search.\"\"\"\n    question = dspy.InputField()\n    answer = dspy.OutputField()\n\ndef search_tool(query: str) -> str:\n    \"\"\"Search Wikipedia.\"\"\"\n    # Your search implementation\n    return results\n\nreact = ReAct(SearchQA, tools=[search_tool])\nresult = react(question=\"When was Python created?\")\n```\n\n#### dspy.ProgramOfThought\nGenerates and executes code for reasoning:\n\n```python\npot = dspy.ProgramOfThought(\"question -> answer\")\nresult = pot(question=\"What is 15% of 240?\")\n# Generates: answer = 240 * 0.15\n```\n\n### 3. Optimizers\n\nOptimizers improve your modules automatically using training data:\n\n#### BootstrapFewShot\nLearns from examples:\n\n```python\nfrom dspy.teleprompt import BootstrapFewShot\n\n# Training data\ntrainset = [\n    dspy.Example(question=\"What is 2+2?\", answer=\"4\").with_inputs(\"question\"),\n    dspy.Example(question=\"What is 3+5?\", answer=\"8\").with_inputs(\"question\"),\n]\n\n# Define metric\ndef validate_answer(example, pred, trace=None):\n    return example.answer == pred.answer\n\n# Optimize\noptimizer = BootstrapFewShot(metric=validate_answer, max_bootstrapped_demos=3)\noptimized_qa = optimizer.compile(qa, trainset=trainset)\n\n# Now optimized_qa performs better!\n```\n\n#### MIPRO (Most Important Prompt Optimization)\nIteratively improves prompts:\n\n```python\nfrom dspy.teleprompt import MIPRO\n\noptimizer = MIPRO(\n    metric=validate_answer,\n    num_candidates=10,\n    init_temperature=1.0\n)\n\noptimized_cot = optimizer.compile(\n    cot,\n    trainset=trainset,\n    num_trials=100\n)\n```\n\n#### BootstrapFinetune\nCreates datasets for model fine-tuning:\n\n```python\nfrom dspy.teleprompt import BootstrapFinetune\n\noptimizer = BootstrapFinetune(metric=validate_answer)\noptimized_module = optimizer.compile(qa, trainset=trainset)\n\n# Exports training data for fine-tuning\n```\n\n### 4. Building Complex Systems\n\n#### Multi-Stage Pipeline\n\n```python\nimport dspy\n\nclass MultiHopQA(dspy.Module):\n    def __init__(self):\n        super().__init__()\n        self.retrieve = dspy.Retrieve(k=3)\n        self.generate_query = dspy.ChainOfThought(\"question -> search_query\")\n        self.generate_answer = dspy.ChainOfThought(\"context, question -> answer\")\n\n    def forward(self, question):\n        # Stage 1: Generate search query\n        search_query = self.generate_query(question=question).search_query\n\n        # Stage 2: Retrieve context\n        passages = self.retrieve(search_query).passages\n        context = \"\\n\".join(passages)\n\n        # Stage 3: Generate answer\n        answer = self.generate_answer(context=context, question=question).answer\n        return dspy.Prediction(answer=answer, context=context)\n\n# Use the pipeline\nqa_system = MultiHopQA()\nresult = qa_system(question=\"Who wrote the book that inspired the movie Blade Runner?\")\n```\n\n#### RAG System with Optimization\n\n```python\nimport dspy\nfrom dspy.retrieve.chromadb_rm import ChromadbRM\n\n# Configure retriever\nretriever = ChromadbRM(\n    collection_name=\"documents\",\n    persist_directory=\".\u002Fchroma_db\"\n)\n\nclass RAG(dspy.Module):\n    def __init__(self, num_passages=3):\n        super().__init__()\n        self.retrieve = dspy.Retrieve(k=num_passages)\n        self.generate = dspy.ChainOfThought(\"context, question -> answer\")\n\n    def forward(self, question):\n        context = self.retrieve(question).passages\n        return self.generate(context=context, question=question)\n\n# Create and optimize\nrag = RAG()\n\n# Optimize with training data\nfrom dspy.teleprompt import BootstrapFewShot\n\noptimizer = BootstrapFewShot(metric=validate_answer)\noptimized_rag = optimizer.compile(rag, trainset=trainset)\n```\n\n## LM Provider Configuration\n\n### Anthropic Claude\n\n```python\nimport dspy\n\nlm = dspy.Claude(\n    model=\"claude-sonnet-4-5-20250929\",\n    api_key=\"your-api-key\",  # Or set ANTHROPIC_API_KEY env var\n    max_tokens=1000,\n    temperature=0.7\n)\ndspy.settings.configure(lm=lm)\n```\n\n### OpenAI\n\n```python\nlm = dspy.OpenAI(\n    model=\"gpt-4\",\n    api_key=\"your-api-key\",\n    max_tokens=1000\n)\ndspy.settings.configure(lm=lm)\n```\n\n### Local Models (Ollama)\n\n```python\nlm = dspy.OllamaLocal(\n    model=\"llama3.1\",\n    base_url=\"http:\u002F\u002Flocalhost:11434\"\n)\ndspy.settings.configure(lm=lm)\n```\n\n### Multiple Models\n\n```python\n# Different models for different tasks\ncheap_lm = dspy.OpenAI(model=\"gpt-3.5-turbo\")\nstrong_lm = dspy.Claude(model=\"claude-sonnet-4-5-20250929\")\n\n# Use cheap model for retrieval, strong model for reasoning\nwith dspy.settings.context(lm=cheap_lm):\n    context = retriever(question)\n\nwith dspy.settings.context(lm=strong_lm):\n    answer = generator(context=context, question=question)\n```\n\n## Common Patterns\n\n### Pattern 1: Structured Output\n\n```python\nfrom pydantic import BaseModel, Field\n\nclass PersonInfo(BaseModel):\n    name: str = Field(description=\"Full name\")\n    age: int = Field(description=\"Age in years\")\n    occupation: str = Field(description=\"Current job\")\n\nclass ExtractPerson(dspy.Signature):\n    \"\"\"Extract person information from text.\"\"\"\n    text = dspy.InputField()\n    person: PersonInfo = dspy.OutputField()\n\nextractor = dspy.TypedPredictor(ExtractPerson)\nresult = extractor(text=\"John Doe is a 35-year-old software engineer.\")\nprint(result.person.name)  # \"John Doe\"\nprint(result.person.age)   # 35\n```\n\n### Pattern 2: Assertion-Driven Optimization\n\n```python\nimport dspy\nfrom dspy.primitives.assertions import assert_transform_module, backtrack_handler\n\nclass MathQA(dspy.Module):\n    def __init__(self):\n        super().__init__()\n        self.solve = dspy.ChainOfThought(\"problem -> solution: float\")\n\n    def forward(self, problem):\n        solution = self.solve(problem=problem).solution\n\n        # Assert solution is numeric\n        dspy.Assert(\n            isinstance(float(solution), float),\n            \"Solution must be a number\",\n            backtrack=backtrack_handler\n        )\n\n        return dspy.Prediction(solution=solution)\n```\n\n### Pattern 3: Self-Consistency\n\n```python\nimport dspy\nfrom collections import Counter\n\nclass ConsistentQA(dspy.Module):\n    def __init__(self, num_samples=5):\n        super().__init__()\n        self.qa = dspy.ChainOfThought(\"question -> answer\")\n        self.num_samples = num_samples\n\n    def forward(self, question):\n        # Generate multiple answers\n        answers = []\n        for _ in range(self.num_samples):\n            result = self.qa(question=question)\n            answers.append(result.answer)\n\n        # Return most common answer\n        most_common = Counter(answers).most_common(1)[0][0]\n        return dspy.Prediction(answer=most_common)\n```\n\n### Pattern 4: Retrieval with Reranking\n\n```python\nclass RerankedRAG(dspy.Module):\n    def __init__(self):\n        super().__init__()\n        self.retrieve = dspy.Retrieve(k=10)\n        self.rerank = dspy.Predict(\"question, passage -> relevance_score: float\")\n        self.answer = dspy.ChainOfThought(\"context, question -> answer\")\n\n    def forward(self, question):\n        # Retrieve candidates\n        passages = self.retrieve(question).passages\n\n        # Rerank passages\n        scored = []\n        for passage in passages:\n            score = float(self.rerank(question=question, passage=passage).relevance_score)\n            scored.append((score, passage))\n\n        # Take top 3\n        top_passages = [p for _, p in sorted(scored, reverse=True)[:3]]\n        context = \"\\n\\n\".join(top_passages)\n\n        # Generate answer\n        return self.answer(context=context, question=question)\n```\n\n## Evaluation and Metrics\n\n### Custom Metrics\n\n```python\ndef exact_match(example, pred, trace=None):\n    \"\"\"Exact match metric.\"\"\"\n    return example.answer.lower() == pred.answer.lower()\n\ndef f1_score(example, pred, trace=None):\n    \"\"\"F1 score for text overlap.\"\"\"\n    pred_tokens = set(pred.answer.lower().split())\n    gold_tokens = set(example.answer.lower().split())\n\n    if not pred_tokens:\n        return 0.0\n\n    precision = len(pred_tokens & gold_tokens) \u002F len(pred_tokens)\n    recall = len(pred_tokens & gold_tokens) \u002F len(gold_tokens)\n\n    if precision + recall == 0:\n        return 0.0\n\n    return 2 * (precision * recall) \u002F (precision + recall)\n```\n\n### Evaluation\n\n```python\nfrom dspy.evaluate import Evaluate\n\n# Create evaluator\nevaluator = Evaluate(\n    devset=testset,\n    metric=exact_match,\n    num_threads=4,\n    display_progress=True\n)\n\n# Evaluate model\nscore = evaluator(qa_system)\nprint(f\"Accuracy: {score}\")\n\n# Compare optimized vs unoptimized\nscore_before = evaluator(qa)\nscore_after = evaluator(optimized_qa)\nprint(f\"Improvement: {score_after - score_before:.2%}\")\n```\n\n## Best Practices\n\n### 1. Start Simple, Iterate\n\n```python\n# Start with Predict\nqa = dspy.Predict(\"question -> answer\")\n\n# Add reasoning if needed\nqa = dspy.ChainOfThought(\"question -> answer\")\n\n# Add optimization when you have data\noptimized_qa = optimizer.compile(qa, trainset=data)\n```\n\n### 2. Use Descriptive Signatures\n\n```python\n# ❌ Bad: Vague\nclass Task(dspy.Signature):\n    input = dspy.InputField()\n    output = dspy.OutputField()\n\n# ✅ Good: Descriptive\nclass SummarizeArticle(dspy.Signature):\n    \"\"\"Summarize news articles into 3-5 key points.\"\"\"\n    article = dspy.InputField(desc=\"full article text\")\n    summary = dspy.OutputField(desc=\"bullet points, 3-5 items\")\n```\n\n### 3. Optimize with Representative Data\n\n```python\n# Create diverse training examples\ntrainset = [\n    dspy.Example(question=\"factual\", answer=\"...).with_inputs(\"question\"),\n    dspy.Example(question=\"reasoning\", answer=\"...\").with_inputs(\"question\"),\n    dspy.Example(question=\"calculation\", answer=\"...\").with_inputs(\"question\"),\n]\n\n# Use validation set for metric\ndef metric(example, pred, trace=None):\n    return example.answer in pred.answer\n```\n\n### 4. Save and Load Optimized Models\n\n```python\n# Save\noptimized_qa.save(\"models\u002Fqa_v1.json\")\n\n# Load\nloaded_qa = dspy.ChainOfThought(\"question -> answer\")\nloaded_qa.load(\"models\u002Fqa_v1.json\")\n```\n\n### 5. Monitor and Debug\n\n```python\n# Enable tracing\ndspy.settings.configure(lm=lm, trace=[])\n\n# Run prediction\nresult = qa(question=\"...\")\n\n# Inspect trace\nfor call in dspy.settings.trace:\n    print(f\"Prompt: {call['prompt']}\")\n    print(f\"Response: {call['response']}\")\n```\n\n## Comparison to Other Approaches\n\n| Feature | Manual Prompting | LangChain | DSPy |\n|---------|-----------------|-----------|------|\n| Prompt Engineering | Manual | Manual | Automatic |\n| Optimization | Trial & error | None | Data-driven |\n| Modularity | Low | Medium | High |\n| Type Safety | No | Limited | Yes (Signatures) |\n| Portability | Low | Medium | High |\n| Learning Curve | Low | Medium | Medium-High |\n\n**When to choose DSPy:**\n- You have training data or can generate it\n- You need systematic prompt improvement\n- You're building complex multi-stage systems\n- You want to optimize across different LMs\n\n**When to choose alternatives:**\n- Quick prototypes (manual prompting)\n- Simple chains with existing tools (LangChain)\n- Custom optimization logic needed\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fdspy.ai\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fstanfordnlp\u002Fdspy (22k+ stars)\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FXCGy2WDCQB\n- **Twitter**: @DSPyOSS\n- **Paper**: \"DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines\"\n\n## See Also\n\n- `references\u002Fmodules.md` - Detailed module guide (Predict, ChainOfThought, ReAct, ProgramOfThought)\n- `references\u002Foptimizers.md` - Optimization algorithms (BootstrapFewShot, MIPRO, BootstrapFinetune)\n- `references\u002Fexamples.md` - Real-world examples (RAG, agents, classifiers)\n\n\n",{"name":5,"tags":53,"author":58,"license":15,"version":59,"category":60,"description":7,"dependencies":61},[54,55,38,56,57,37,36,35,34,33],"Prompt Engineering","DSPy","RAG","Agents","Synthetic Sciences","1.0.0","llm-tools",[5,45,62],"anthropic","main","4aa39efd1cdab0b4657ecee16c92a92011a5b10f","openscience\u002Fbackend\u002Fcli\u002Fskills\u002Fllm-tools\u002Fdspy","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub","https:\u002F\u002Fgithub.com\u002Ffadrienne","2026-10-28 00:43:09",{"source":8,"skillName":5,"commands":70,"prompt":80,"zipAvailable":81},[71,74,77],{"tool":72,"command":73},"npx","npx skills add fadrienne\u002FMyGitHub --skill dspy",{"tool":75,"command":76},"bunx","bunx skills add fadrienne\u002FMyGitHub --skill dspy",{"tool":78,"command":79},"pnpm","pnpm dlx skills add fadrienne\u002FMyGitHub --skill dspy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fllm-tools\u002Fdspy\u002FSKILL.md",true,[83,89,93],{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fexamples.md","REFERENCE","参考文档",18983,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fllm-tools\u002Fdspy\u002Freferences\u002Fexamples.md",{"path":90,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fmodules.md",12363,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fllm-tools\u002Fdspy\u002Freferences\u002Fmodules.md",{"path":94,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Foptimizers.md",14933,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fllm-tools\u002Fdspy\u002Freferences\u002Foptimizers.md",[98,126,152,184,211,236],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":105,"publishedAt":48},"01M7167B28PK20HP7R7ZED2DY0","statistical-power","Sample size calculation, power analysis, and effect size conversion for scientific studies. Use BEFORE data collection (a priori) to determine required N, or after (post-hoc) to compute achieved power. Covers parametric tests (t-test, ANOVA, chi-square, proportions, correlation, regression), simulation-based power for complex\u002Fclustered\u002Fnested designs, and power curves. Use this skill when someone asks 'how many samples do I need', 'what is my power', 'what effect size can I detect', or any variant. Pairs with \u002Fexperimental-design (choose design first, then compute power) and \u002Fstatistical-analysis (analyze data after collection).","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fstatistical-power\u002FSKILL.md",[104],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125],"power","statistical power","effect","scipy","regression","choose","design","uv","when","Bash","collection","analysis","calculation","ANOVA","conversion","analyze","t-test","chi-square","simulation","sample",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":135,"publishedAt":48},"01M71677EBCM8EPCE9BZCK8505","statistical-analysis","Guided statistical analysis with test selection and reporting. Use when you need help choosing appropriate tests for your data, assumption checking, power analysis, and APA-formatted results. Best for academic research reporting, test selection guidance. For implementing specific models programmatically use statsmodels.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fstatistical-analysis\u002FSKILL.md",[132],{"categoryNo":133,"categoryName":134,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[117,136,106,137,138,139,114,140,141,142,32,143,144,145,146,147,148,149,150,151],"statistical analysis","academic research","implementing","selection","you","reporting","data","tests","use","with","test","research","results","statsmodels","models","help",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":165,"publishedAt":48},"01M71673R93XAHFH81DBNVNG7H","scientific-writing","Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA\u002FAMA\u002FVancouver), figures\u002Ftables, reporting guidelines (CONSORT\u002FSTROBE\u002FPRISMA), for research papers and journal submissions.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fscientific-writing\u002FSKILL.md",[158,161,162],{"categoryNo":159,"categoryName":160,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":163,"categoryName":164,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000036","内容创作者",[166,167,168,169,170,171,172,173,174,175,115,176,177,178,179,180,181,182,141,183],"writing","scientific","scientific writing","Citations","deep","deep research","never","papers","journal","false","api","prisma","structure","openrouter","Outlines","core skill","read","features",{"skillNo":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":194,"publishedAt":48},"01M7166ZPKXBF4EBPHVTJPQBB1","scientific-visualization","Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib\u002Fseaborn\u002Fplotly with publication styles. For quick exploration use seaborn or plotly directly.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fscientific-visualization\u002FSKILL.md",[190,193],{"categoryNo":191,"categoryName":192,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000013","分析与可视化",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[195,167,196,197,198,199,200,201,202,174,114,203,204,205,206,207,208,209,32,210],"visualization","scientific visualization","error","ready","quick","exploration","meta-skill","Meta","safe","plotly","annotations","formatting","Publication","figures","panel","submission",{"skillNo":212,"name":213,"nameZh":6,"description":214,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":215,"categories":216,"keywords":221,"publishedAt":48},"01M7166VXJWQSSC3RQZP60WBGR","research-code","Debug, profile, review, and restructure Python research and analysis code. Use when analysis scripts crash, produce wrong results, run too slowly, or need a correctness review. Covers: reading tracebacks and diagnosing root causes, hypothesis-driven debugging, reviewing code for common statistical\u002Fnumerical errors, profiling data pipelines, improving reproducibility (seeds, environments, determinism), and structuring analysis scripts for sharing. Distinct from \u002Fexploratory-data-analysis (which understands data) and \u002Fstatistical-analysis (which chooses and runs tests) — this skill focuses on the code itself.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fresearch-code\u002FSKILL.md",[217,220],{"categoryNo":218,"categoryName":219,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[222,223,147,224,225,226,227,113,228,114,115,117,229,230,231,232,233,234,182,235],"code","research code","which","memory","data-analysis","errors","debugging","common","review","data pipelines","run","scripts","line","write",{"skillNo":237,"name":238,"nameZh":6,"description":239,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":240,"licenseFileUrl":6,"sourceHtmlUrl":241,"categories":242,"keywords":249,"publishedAt":48},"01M7166CF5HSR7SVZYZFWTDX55","markdown-mermaid-writing","Comprehensive markdown and Mermaid diagram writing skill. Use when creating any scientific document, report, analysis, or visualization. Establishes text-based diagrams as the default documentation standard with full style guides (markdown + mermaid), 24 diagram type references, and 9 document templates.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fmarkdown-mermaid-writing\u002FSKILL.md",[243,246,247,248],{"categoryNo":244,"categoryName":245,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":159,"categoryName":160,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":163,"categoryName":164,"taxonomyType":26,"taxonomyTypeDesc":27},[166,250,251,252,253,254,195,255,256,114,115,117,257,258,259,260,261,262,167,182],"markdown mermaid writing","mermaid","markdown","community","diagrams","project","default","team","guides","text","documentation","references","diagram"]