协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
adalflow【开发与工程】Use AdalFlow to build, debug, evaluate, optimize, trace, and operate LLM task pipelines, RAG systems, agents, tools, and structured-output workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task involves the AdalFlow Python package: building model-agnostic LLM task pipelines, structured outputs, RAG, agents, tool calling, evaluation, prompt/few-shot/text-gradient optimization, or tracing.
AdalFlow uses PyTorch-like Component building blocks. A typical workflow combines Prompt, ModelClient, Generator, DataClass/parser objects, retrievers, tools, agents, metrics, and tracing callbacks.
For AdalFlow 1.1.1, use Python 3.9+ and include the OpenAI SDK for reliable top-level import because the current Generator module imports OpenAI response event types:
python -m pip install "adalflow[openai]"
python - <<'PY'
import adalflow as adal
print(adal.__version__)
from adalflow import Component, DataClass, Generator, Agent, Runner
print("adalflow import ok")
PY
Install additional extras only for workflows that need them, such as provider SDKs, FAISS/LanceDB/Postgres/Qdrant retrieval, MCP, torch/transformers, datasets, or SQLAlchemy. Do not treat a missing API key, service, dataset, or accelerator as a base package failure.
Read core-components-and-structured-io for:
Component, DataComponent, Sequential, ComponentList, Prompt, DataClass, and required_field.DataClassParser structured-output prompts.Read model-client-and-generator-workflows for:
ModelClient, Generator, GeneratorOutput, Embedder, and BatchEmbedder.prompt_kwargs, model_kwargs, ModelType, output processors, cache behavior, and async/streaming basics.Read retrieval-rag-and-data-pipelines for:
Document, TextSplitter, LocalDB, ToEmbeddings, and RetrieverOutputToContextStr.BM25Retriever, FAISSRetriever, LanceDB, Postgres, Qdrant, and RAG context assembly.Read agents-tools-and-streaming for:
FunctionTool, ToolManager, FunctionDefinition, FunctionOutput, and ToolOutput.Agent, Runner, ReActAgent, RunnerResult, StepOutput, and stream events.Read evaluation-and-optimization for:
AnswerMatchAcc, RetrieverEvaluator, cautious LLMasJudge, and dataset loaders.Parameter, GradComponent, AdalComponent, Trainer, BootstrapFewShot, TGDOptimizer, EvalFnToTextLoss, LLMAsTextLoss, and optimize_anything.Read tracing-observability-and-configuration for:
setup_env, logging helpers, config loading, and default artifact roots.GeneratorStateLogger, GeneratorCallLogger, callbacks, spans, trace providers, and optional MLflow.DataClass, parser, TextSplitter, metrics, fake ModelClient, or fake Runner behavior before adding providers.ModelClient is known. API credentials and network calls are workflow prerequisites, not skill smoke checks.FunctionTool/ToolManager before letting an LLM planner call them.Trainer.fit; prefer Trainer.diagnose or metric smokes before expensive training.