[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10679":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":47,"readmeContent":48,"aiSummary":49,"trendingCount":16,"starSnapshotCount":16,"syncStatus":50,"lastSyncTime":51,"discoverSource":52},10679,"AdalFlow","SylphAI-Inc\u002FAdalFlow","SylphAI-Inc","AdalFlow: The library to build & auto-optimize LLM applications.","http:\u002F\u002Fadalflow.sylph.ai\u002F",null,"Python",4168,374,23,33,0,1,9,34,4,29.72,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"agent","ai","auto-prompting","bm25","chatbot","faiss","framework","generative-ai","information-retrieval","llm","machine-learning","nlp","optimizer","python","question-answering","rag","reranker","retriever","summarization","trainer","2026-06-12 02:02:25","\n\u003C!-- \u003Ch4 align=\"center\">\n    \u003Cimg alt=\"AdalFlow logo\" src=\"docs\u002Fsource\u002F_static\u002Fimages\u002Fadalflow-logo.png\" style=\"width: 100%;\">\n\u003C\u002Fh4> -->\n\n\n\n\n\n\u003Ch2>\n    \u003Cp align=\"center\">\n     ⚡ AdalFlow is a PyTorch-like library to build and auto-optimize any LM workflows, from Chatbots, RAG,  to Agents. ⚡\n    \u003C\u002Fp>\n\u003C\u002Fh2>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fsylph.ai\">\u003Cimg src=\"docs\u002Fsource\u002F_static\u002Fimages\u002Fadal-face-logo.svg\" alt=\"AdaL\" height=\"100\">\u003C\u002Fa>&nbsp;\n    \u003Ca href=\"https:\u002F\u002Fsylph.ai\">\u003Cimg src=\"docs\u002Fsource\u002F_static\u002Fimages\u002Fadal-text-logo.svg\" alt=\"AdaL CLI\" height=\"100\">\u003C\u002Fa>\n    \u003Cbr>\u003Cbr>\n    \u003Cstrong>AdalFlow proudly powers \u003Ca href=\"https:\u002F\u002Fsylph.ai\">AdaL CLI\u003C\u002Fa>\u003C\u002Fstrong> — The AI coding agent\n\u003C\u002Fp>\n\n\n\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1_YnD4HshzPRARvishoU4IA-qQuX9jHrT?usp=sharing\">\n        \u003Cimg alt=\"Try Quickstart in Colab\" src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Ch4 align=\"center\">\n    \u003Cp>\n        \u003Ca href=\"https:\u002F\u002Fadalflow.sylph.ai\u002F\">View Documentation\u003C\u002Fa>\n        \u003C!-- \u003Ca href=\"https:\u002F\u002Fadalflow.sylph.ai\u002Fapis\u002Fcomponents\u002Fcomponents.model_client.html\">Models\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fadalflow.sylph.ai\u002Fapis\u002Fcomponents\u002Fcomponents.retriever.html\">Retrievers\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fadalflow.sylph.ai\u002Fapis\u002Fcomponents\u002Fcomponents.agent.html\">Agents\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fadalflow.sylph.ai\u002Ftutorials\u002Fevaluation.html\"> LLM evaluation\u003C\u002Fa> |\n        \u003Ca href=\"https:\u002F\u002Fadalflow.sylph.ai\u002Fuse_cases\u002Fquestion_answering.html\">Trainer & Optimizers\u003C\u002Fa> -->\n    \u003Cp>\n\u003C\u002Fh4>\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fadalflow\u002F\">\n        \u003Cimg alt=\"PyPI Version\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fadalflow?style=flat-square\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fadalflow\u002F\">\n        \u003Cimg alt=\"PyPI Downloads\" src=\"https:\u002F\u002Fstatic.pepy.tech\u002Fbadge\u002Fadalflow\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fadalflow\u002F\">\n        \u003Cimg alt=\"PyPI Downloads\" src=\"https:\u002F\u002Fstatic.pepy.tech\u002Fbadge\u002Fadalflow\u002Fmonth\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fstar-history.com\u002F#SylphAI-Inc\u002FAdalFlow\">\n        \u003Cimg alt=\"GitHub stars\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FSylphAI-Inc\u002FAdalFlow?style=flat-square\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fissues\">\n        \u003Cimg alt=\"Open Issues\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-raw\u002FSylphAI-Inc\u002FAdalFlow?style=flat-square\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicense\u002FMIT\">\n        \u003Cimg alt=\"License\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FSylphAI-Inc\u002FAdalFlow\">\n    \u003C\u002Fa>\n      \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FezzszrRZvT\">\n        \u003Cimg alt=\"discord-invite\" src=\"https:\u002F\u002Fdcbadge.limes.pink\u002Fapi\u002Fserver\u002FezzszrRZvT?style=flat\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003C!-- \u003Ch4>\n\u003Cp align=\"center\">\nFor AI researchers, product teams, and software engineers who want to learn the AI way.\n\u003C\u002Fp>\n\u003C\u002Fh4> -->\n\n\u003C!-- \u003Ch4>\n\u003Cp align=\"center\">\nAdalFlow is a PyTorch-like library to build and auto-optimize any LM workflows, from Chatbots, RAG,  to Agents.\n\u003C\u002Fp>\n\u003C\u002Fh4> -->\n\n\n\n\n\u003C!-- \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1PPxYEBa6eu__LquGoFFJZkhYgWVYE6kh?usp=sharing\">\n        \u003Cimg alt=\"Try Quickstart in Colab\" src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\">\n    \u003C\u002Fa> -->\n\n\u003C!-- \u003Ca href=\"https:\u002F\u002Fpypistats.org\u002Fpackages\u002Flightrag\">\n\u003Cimg alt=\"PyPI Downloads\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002FlightRAG?style=flat-square\">\n\u003C\u002Fa> -->\n\n# Why AdalFlow\n\n1. **100% Open-source Agents SDK**: Lightweight and requires no additional API to setup ``Human-in-the-Loop`` and ``Tracing`` Functionalities.\n2. **Say goodbye to manual prompting**: AdalFlow provides a unified auto-differentiative framework for both zero-shot optimization and few-shot prompt optimization. Our research, ``LLM-AutoDiff`` and ``Learn-to-Reason Few-shot In Context Learning``, achieve the highest accuracy among all auto-prompt optimization libraries.\n3. **Switch your LLM app to any model via a config**:  AdalFlow provides `Model-agnostic` building blocks for LLM task pipelines, ranging from RAG, Agents to classical NLP tasks.\n\n\u003C!-- \u003Cp align=\"center\" style=\"background-color: #f0f0f0;\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002Fclassification_training_map.png\" style=\"width: 80%;\" alt=\"AdalFlow Auto-optimization\">\n\u003C\u002Fp> -->\n\n\u003Cp align=\"center\" style=\"background-color: #f0f0f0;\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002Fclassification_opt_prompt.png\" alt=\"AdalFlow Optimized Prompt\" style=\"width: 80%;\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\" style=\"background-color: #f0f0f0;\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002Fadalflow_tracing_mlflow.png\" alt=\"AdalFlow MLflow Integration\" style=\"width: 80%;\">\n\u003C\u002Fp>\n\n\u003C!-- Among all libraries, AdalFlow achieved the highest accuracy with manual prompting (starting at 82%) and the highest accuracy after optimization. -->\n\u003C!-- \u003Cp align=\"center\" style=\"background-color: #f0f0f0;\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002Fclassification_opt_prompt.png\" alt=\"AdalFlow Optimized Prompt\" style=\"width: 80%;\">\n\u003C\u002Fp> -->\n\nView [Documentation](https:\u002F\u002Fadalflow.sylph.ai)\n\n\n# Quick Start\n\n\nInstall AdalFlow with pip:\n\n```bash\npip install adalflow\n```\n\n## Hello World Agent Example\n\n```python\nfrom adalflow import Agent, Runner\nfrom adalflow.components.model_client.openai_client import OpenAIClient\nfrom adalflow.core.types import (\n    ToolCallActivityRunItem, \n    RunItemStreamEvent,\n    ToolCallRunItem,\n    ToolOutputRunItem,\n    FinalOutputItem\n)\nimport asyncio\n\n# Define tools\ndef calculator(expression: str) -> str:\n    \"\"\"Evaluate a mathematical expression.\"\"\"\n    try:\n        result = eval(expression)\n        return f\"The result of {expression} is {result}\"\n    except Exception as e:\n        return f\"Error: {e}\"\n\nasync def web_search(query: str=\"what is the weather in SF today?\") -> str:\n    \"\"\"Web search on query.\"\"\"\n    await asyncio.sleep(0.5)\n    return \"San Francisco will be mostly cloudy today with some afternoon sun, reaching about 67 °F (20 °C).\"\n\ndef counter(limit: int):\n    \"\"\"A counter that counts up to a limit.\"\"\"\n    final_output = []\n    for i in range(1, limit + 1):\n        stream_item = f\"Count: {i}\u002F{limit}\"\n        final_output.append(stream_item)\n        yield ToolCallActivityRunItem(data=stream_item)\n    yield final_output\n\n# Create agent with tools\nagent = Agent(\n    name=\"MyAgent\",\n    tools=[calculator, web_search, counter],\n    model_client=OpenAIClient(),\n    model_kwargs={\"model\": \"gpt-4o\", \"temperature\": 0.3},\n    max_steps=5\n)\n\nrunner = Runner(agent=agent)\n```\n\n### 1. Synchronous Call Mode\n\n```python\n# Sync call - returns RunnerResult with complete execution history\nresult = runner.call(\n    prompt_kwargs={\"input_str\": \"Calculate 15 * 7 + 23 and count to 5\"}\n)\n\nprint(result.answer)\n# Output: The result of 15 * 7 + 23 is 128. The counter counted up to 5: 1, 2, 3, 4, 5.\n\n# Access step history\nfor step in result.step_history:\n    print(f\"Step {step.step}: {step.function.name} -> {step.observation}\")\n# Output:\n# Step 0: calculator -> The result of 15 * 7 + 23 is 128\n# Step 1: counter -> ['Count: 1\u002F5', 'Count: 2\u002F5', 'Count: 3\u002F5', 'Count: 4\u002F5', 'Count: 5\u002F5']\n```\n\n### 2. Asynchronous Call Mode\n\n```python\n# Async call - similar output structure to sync call\nresult = await runner.acall(\n    prompt_kwargs={\"input_str\": \"What's the weather in SF and calculate 42 * 3\"}\n)\n\nprint(result.answer)\n# Output: San Francisco will be mostly cloudy today with some afternoon sun, reaching about 67 °F (20 °C). \n#         The result of 42 * 3 is 126.\n```\n\n### 3. Async Streaming Mode\n\n```python\n# Async streaming - real-time event processing\nstreaming_result = runner.astream(\n    prompt_kwargs={\"input_str\": \"Calculate 100 + 50 and count to 3\"},\n)\n\n# Process streaming events in real-time\nasync for event in streaming_result.stream_events():\n    if isinstance(event, RunItemStreamEvent):\n        if isinstance(event.item, ToolCallRunItem):\n            print(f\"🔧 Calling: {event.item.data.name}\")\n        elif isinstance(event.item, ToolCallActivityRunItem):\n            print(f\"📝 Activity: {event.item.data}\")\n        elif isinstance(event.item, ToolOutputRunItem):\n            print(f\"✅ Output: {event.item.data.output}\")\n        elif isinstance(event.item, FinalOutputItem):\n            print(f\"🎯 Final: {event.item.data.answer}\")\n\n# Output:\n# 🔧 Calling: calculator\n# ✅ Output: The result of 100 + 50 is 150\n# 🔧 Calling: counter\n# 📝 Activity: Count: 1\u002F3\n# 📝 Activity: Count: 2\u002F3\n# 📝 Activity: Count: 3\u002F3\n# ✅ Output: ['Count: 1\u002F3', 'Count: 2\u002F3', 'Count: 3\u002F3']\n# 🎯 Final: The result of 100 + 50 is 150. Counted to 3 successfully.\n```\n\n_Set your `OPENAI_API_KEY` environment variable to run these examples._\n\n**Try the full Agent tutorial in Colab:** [![Open In Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002FSylphAI-Inc\u002FAdalFlow\u002Fblob\u002Fmain\u002Fnotebooks\u002Fagents\u002Fagent_tutorial.ipynb)\n\n\u003C!-- Please refer to the [full installation guide](https:\u002F\u002Fadalflow.sylph.ai\u002Fget_started\u002Finstallation.html) for more details.\n[Package changelog](https:\u002F\u002Fgithub.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fblob\u002Fmain\u002Fadalflow\u002FCHANGELOG.md). -->\nView [Quickstart](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1_YnD4HshzPRARvishoU4IA-qQuX9jHrT?usp=sharing): Learn How `AdalFlow` optimizes LM workflows end-to-end in 15 mins.\n\nGo to [Documentation](https:\u002F\u002Fadalflow.sylph.ai) for tracing, human-in-the-loop, and more.\n\n\n\u003C!-- * Try the [Building Quickstart](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1TKw_JHE42Z_AWo8UuRYZCO2iuMgyslTZ?usp=sharing) in Colab to see how AdalFlow can build the task pipeline, including Chatbot, RAG, agent, and structured output.\n* Try the [Optimization Quickstart](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002FSylphAI-Inc\u002FAdalFlow\u002Fblob\u002Fmain\u002Fnotebooks\u002Fqas\u002Fadalflow_object_count_auto_optimization.ipynb) to see how AdalFlow can optimize the task pipeline. -->\n\n\n\n# Research\n[Sep 2025] [LAD-VF: LLM-Automatic Differentiation Enables Fine-Tuning-Free Robot Planning from Formal Methods Feedback](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2509.18384)\n- Fine-tuning-free robot planning using LLM auto-differentiation\n- Integration of formal methods feedback for robot control\n\n[Jan 2025] [Auto-Differentiating Any LLM Workflow: A Farewell to Manual Prompting](https:\u002F\u002Farxiv.org\u002Fabs\u002F2501.16673)\n- LLM Applications as auto-differentiation graphs\n- Token-efficient and better performance than DsPy\n\n[Dec 2025] [Scaling Textual Gradients via Sampling-Based Momentum](https:\u002F\u002Farxiv.org\u002Fabs\u002F2506.00400)\n- Stable, scalable prompt optimization using momentum-weighted textual gradient\n- Gumbel-Top-k sampling improves exploration and integrates seamlessly with TextGrad, DSPy-COPRO, and AdalFlow\n\n\n\n# Auto-Prompt Optimization Ecosystem\n\nAdalFlow is part of a growing ecosystem of libraries that automatically optimize LLM prompts and workflows. Here's how the landscape looks:\n\n| Library | Approach | Key Idea |\n|---------|----------|----------|\n| **[AdalFlow](https:\u002F\u002Fgithub.com\u002FSylphAI-Inc\u002FAdalFlow)** | PyTorch-style auto-differentiation | LLM workflows as auto-diff graphs; unified textual gradient descent + few-shot bootstrap optimization in one training loop |\n| **[DSPy](https:\u002F\u002Fgithub.com\u002Fstanfordnlp\u002Fdspy)** | Declarative programming | Write compositional Python code instead of prompts; compiler optimizes prompts and weights automatically |\n| **[Agent Lightning](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-lightning)** | Framework-agnostic agent trainer | Turn any agent (LangChain, OpenAI SDK, AutoGen, etc.) into an optimizable entity with minimal code changes; supports RL, auto-prompt optimization, and supervised fine-tuning |\n| **[TextGrad](https:\u002F\u002Fgithub.com\u002Fzou-group\u002Ftextgrad)** | Textual gradient descent | Automatic differentiation via text; uses LLM feedback as gradients to optimize prompts, code, and solutions |\n\n**Where AdalFlow fits:** AdalFlow draws inspiration from all of the above (see [Acknowledgements](#acknowledgements)) and unifies them into a single PyTorch-like framework. You get textual gradients (à la TextGrad), few-shot bootstrap (à la DSPy), and instruction history — all composable within `Parameter`, `Generator`, `AdalComponent`, and `Trainer`.\n\n# Collaborations\n\nWe work closely with the [**VITA Group** at University of Texas at Austin](https:\u002F\u002Fvita-group.github.io\u002F), under the leadership of [Dr. Atlas Wang](https:\u002F\u002Fwww.ece.utexas.edu\u002Fpeople\u002Ffaculty\u002Fatlas-wang) and in collaboration with [Dr. Junyuan Hong](https:\u002F\u002Fjyhong.gitlab.io\u002F), who provides valuable support in driving project initiatives.\n\n \u003C!-- alongside [Dr. Junyuan Hong](https:\u002F\u002Fjyhong.gitlab.io\u002F),  -->\nFor collaboration, contact [Li Yin](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fli-yin-ai\u002F).\n\n# Hiring\n\nWe are looking for a Dev Rel to help us build the community and support our users. If you are interested, please contact [Li Yin](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fli-yin-ai\u002F).\n\n\n\n\u003C!-- ## Light, Modular, and Model-Agnostic Task Pipeline\n\nLLMs are like water; AdalFlow help you quickly shape them into any applications, from GenAI applications such as chatbots, translation, summarization, code generation, RAG, and autonomous agents to classical NLP tasks like text classification and named entity recognition.\n\nAdalFlow has two fundamental, but powerful, base classes: `Component` for the pipeline and `DataClass` for data interaction with LLMs.\nThe result is a library with minimal abstraction, providing developers with *maximum customizability*.\n\nYou have full control over the prompt template, the model you use, and the output parsing for your task pipeline.\n\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002FAdalFlow_task_pipeline.png\" alt=\"AdalFlow Task Pipeline\">\n\u003C\u002Fp>\n\nMany providers and models accessible via the same interface:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002Fmulti-providers.png\" alt=\"AdalFlow Model Providers\">\n\u003C\u002Fp>\n\n[All available model providers](https:\u002F\u002Fadalflow.sylph.ai\u002Fapis\u002Fcomponents\u002Fcomponents.model_client.html)\n\n\n\n\nFurther reading: [How We Started](https:\u002F\u002Fwww.linkedin.com\u002Fposts\u002Fli-yin-ai_both-ai-research-and-engineering-use-pytorch-activity-7189366364694892544-Uk1U?utm_source=share&utm_medium=member_desktop),[Design Philosophy](https:\u002F\u002Fadalflow.sylph.ai\u002Ftutorials\u002Flightrag_design_philosophy.html) and [Class hierarchy](https:\u002F\u002Fadalflow.sylph.ai\u002Ftutorials\u002Fclass_hierarchy.html).\n\n\n\n## Unified Framework for Auto-Optimization\n\n\nTo optimize your pipeline, simply define a ``Parameter`` and pass it to AdalFlow's ``Generator``.\nYou use `PROMPT` for prompt tuning via textual gradient descent and `DEMO` for few-shot demonstrations.\nWe let you **diagnose**, **visualize**, **debug**, and **train** your pipeline.\n\n\n### **Trainable Task Pipeline**\n\nJust define it as a ``Parameter`` and pass it to AdalFlow's ``Generator``.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002FTrainable_task_pipeline.png\" alt=\"AdalFlow Trainable Task Pipeline\">\n\u003C\u002Fp>\n\n### **AdalComponent & Trainer**\n\n``AdalComponent`` acts as the 'interpreter'  between task pipeline and the trainer, defining training and validation steps, optimizers, evaluators, loss functions, backward engine for textual gradients or tracing the demonstrations, the teacher generator.\n\n\u003Cp align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002Ftrainer.png\" alt=\"AdalFlow AdalComponent & Trainer\">\n\n\u003C\u002Fp>\n -->\n\n\n# Documentation\n\nAdalFlow full documentation available at [adalflow.sylph.ai](https:\u002F\u002Fadalflow.sylph.ai\u002F):\n\u003C!-- - [How We Started](https:\u002F\u002Fwww.linkedin.com\u002Fposts\u002Fli-yin-ai_both-ai-research-and-engineering-use-pytorch-activity-7189366364694892544-Uk1U?utm_source=share&utm_medium=member_desktop)\n- [Introduction](https:\u002F\u002Fadalflow.sylph.ai\u002F)\n- [Full installation guide](https:\u002F\u002Fadalflow.sylph.ai\u002Fget_started\u002Finstallation.html)\n- [Design philosophy](https:\u002F\u002Fadalflow.sylph.ai\u002Ftutorials\u002Flightrag_design_philosophy.html)\n- [Class hierarchy](https:\u002F\u002Fadalflow.sylph.ai\u002Ftutorials\u002Fclass_hierarchy.html)\n- [Tutorials](https:\u002F\u002Fadalflow.sylph.ai\u002Ftutorials\u002Findex.html)\n- [Supported Models](https:\u002F\u002Fadalflow.sylph.ai\u002Fapis\u002Fcomponents\u002Fcomponents.model_client.html)\n- [Supported Retrievers](https:\u002F\u002Fadalflow.sylph.ai\u002Fapis\u002Fcomponents\u002Fcomponents.retriever.html)\n- [API reference](https:\u002F\u002Fadalflow.sylph.ai\u002Fapis\u002Findex.html) -->\n\n\n# AdalFlow: A Tribute to Ada Lovelace\n\n\nAdalFlow is named in honor of [Ada Lovelace](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FAda_Lovelace), the pioneering female mathematician who first recognized that machines could go beyond mere calculations. As a team led by a female founder, we aim to inspire more women to pursue careers in AI.\n\n# Community & Contributors\n\nThe AdalFlow is a community-driven project, and we welcome everyone to join us in building the future of LLM applications.\n\nJoin our [Discord](https:\u002F\u002Fdiscord.gg\u002FezzszrRZvT) community to ask questions, share your projects, and get updates on AdalFlow.\n\nTo contribute, please read our [Contributor Guide](https:\u002F\u002Fadalflow.sylph.ai\u002Fcontributor\u002Findex.html).\n\n# Contributors\n\n[![contributors](https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=SylphAI-Inc\u002FAdalFlow&max=2000)](https:\u002F\u002Fgithub.com\u002FSylphAI-Inc\u002FAdalFlow\u002Fgraphs\u002Fcontributors)\n\n# Acknowledgements\n\nMany existing works greatly inspired AdalFlow library! Here is a non-exhaustive list:\n\n- 📚 [PyTorch](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fpytorch\u002F) for design philosophy and design pattern of ``Component``, ``Parameter``, ``Sequential``.\n- 📚 [Micrograd](https:\u002F\u002Fgithub.com\u002Fkarpathy\u002Fmicrograd): A tiny autograd engine for our auto-differentiative architecture.\n- 📚 [Text-Grad](https:\u002F\u002Fgithub.com\u002Fzou-group\u002Ftextgrad) for the ``Textual Gradient Descent`` text optimizer.\n- 📚 [DSPy](https:\u002F\u002Fgithub.com\u002Fstanfordnlp\u002Fdspy) for inspiring the ``__{input\u002Foutput}__fields`` in our ``DataClass`` and the bootstrap few-shot optimizer.\n- 📚 [OPRO](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fopro) for adding past text instructions along with its accuracy in the text optimizer.\n- 📚 [PyTorch Lightning](https:\u002F\u002Fgithub.com\u002FLightning-AI\u002Fpytorch-lightning) for the ``AdalComponent`` and ``Trainer``.\n\n\u003C!-- # Citation\n\n```bibtex\n\n@software{Yin2024AdalFlow,\n  author = {Li Yin},\n  title = {{AdalFlow: The Library for Large Language Model (LLM) Applications}},\n  month = {7},\n  year = {2024},\n  doi = {10.5281\u002Fzenodo.12639531},\n  url = {https:\u002F\u002Fgithub.com\u002FSylphAI-Inc\u002FAdalFlow}\n}\n``` -->\n\n\u003C!-- # Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=SylphAI-Inc\u002FAdalFlow&type=Date)](https:\u002F\u002Fstar-history.com\u002F#SylphAI-Inc\u002FAdalFlow&Date) -->\n\u003C!--\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F11559\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F11559\" alt=\"SylphAI-Inc%2FAdalFlow | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa> -->\n","AdalFlow 是一个用于构建和自动优化语言模型应用的库，支持从聊天机器人、检索增强生成到智能代理等多种应用场景。该项目采用Python编写，提供了一套类似PyTorch的API，简化了开发流程，并内置了多种优化器以提升模型性能。其核心技术特点包括自动提示工程、信息检索、重排序等，能够显著提高基于大语言模型的应用效率与效果。适用于需要快速搭建并持续优化自然语言处理相关产品的团队或个人开发者，特别适合于希望降低AI技术门槛同时追求高性能输出的场景。",2,"2026-06-11 03:29:42","top_topic"]