# DSPy > DSPy is the framework for programming—rather than prompting—language models. DSPy is the framework for programming—rather than prompting—language models. DSPy unifies techniques for prompting, fine-tuning, reasoning, tool use, and evaluation of LMs. It provides a systematic approach to building AI applications through composable modules, optimization techniques, and evaluation frameworks. ## Get Started - [Index](https://dspy.ai/current/index.md): DSPy overview and quick start guide ## Getting Started - [Change inference strategies by changing the module](https://dspy.ai/current/getting-started/changing-modules/index.md) - [Writing a class-based signature](https://dspy.ai/current/getting-started/class-based-signatures/index.md) - [Composing your own module](https://dspy.ai/current/getting-started/composing-modules/index.md) - [Expanding your signature: more inputs and adding types](https://dspy.ai/current/getting-started/expanding-signatures/index.md) - [Writing our first DSPy program](https://dspy.ai/current/getting-started/first-program/index.md) - [Prompt Optimizing with GEPA](https://dspy.ai/current/getting-started/gepa-optimization/index.md) - [Setting up DSPy](https://dspy.ai/current/getting-started/installation/index.md) - [Building metrics for evaluation and optimization](https://dspy.ai/current/getting-started/metrics/index.md) - [Program, don’t prompt](https://dspy.ai/current/getting-started/program-dont-prompt/index.md) - [Give the program tools with `dspy.ReAct`](https://dspy.ai/current/getting-started/react-and-tools/index.md) - [Saving a program and reloading it](https://dspy.ai/current/getting-started/saving-and-loading/index.md) - [Where to go next](https://dspy.ai/current/getting-started/where-to-go-next/index.md) ## Diving Deeper - [Adapters: how signatures become prompts](https://dspy.ai/current/diving-deeper/adapters/index.md) - [BootstrapFewShot family](https://dspy.ai/current/diving-deeper/bootstrap-fewshot-family/index.md) - [Built-in module variants](https://dspy.ai/current/diving-deeper/built-in-module-variants/index.md) - [Optimizers: choosing one](https://dspy.ai/current/diving-deeper/choosing-an-optimizer/index.md) - [Flex: Optimizable module code](https://dspy.ai/current/diving-deeper/flex/index.md) - [GEPA in depth](https://dspy.ai/current/diving-deeper/gepa-in-depth/index.md) - [Metrics and evaluation](https://dspy.ai/current/diving-deeper/metrics-and-evaluation/index.md) - [Modules: composing your own](https://dspy.ai/current/diving-deeper/modules/index.md) - [ReAct and ReActV2](https://dspy.ai/current/diving-deeper/react/index.md) - [RLM: exploring large contexts with code](https://dspy.ai/current/diving-deeper/rlm/index.md) - [Saving and loading](https://dspy.ai/current/diving-deeper/saving-and-loading/index.md) - [Settings and `context()`](https://dspy.ai/current/diving-deeper/settings-and-context/index.md) - [Signatures in depth](https://dspy.ai/current/diving-deeper/signatures-in-depth/index.md) - [Tools and MCP](https://dspy.ai/current/diving-deeper/tools/index.md) ## Tutorials - Docs - [Building a Creative Text-Based AI Game with DSPy](https://dspy.ai/current/tutorials/ai_text_game/index.md) - [Async DSPy Programming](https://dspy.ai/current/tutorials/async/index.md) - [Build AI Programs with DSPy](https://dspy.ai/current/tutorials/build_ai_program/index.md) - [Use and Customize DSPy Cache](https://dspy.ai/current/tutorials/cache/index.md) - [Index](https://dspy.ai/current/tutorials/classification/index.md) - [Managing Conversation History](https://dspy.ai/current/tutorials/conversation_history/index.md) - [Tools, Development, and Deployment](https://dspy.ai/current/tutorials/core_development/index.md) - [Custom LM Engines](https://dspy.ai/current/tutorials/custom_lm_engines/index.md) - [Tutorial: Deploying your DSPy program](https://dspy.ai/current/tutorials/deployment/index.md) - [Extracting Information from Emails with DSPy](https://dspy.ai/current/tutorials/email_extraction/index.md) - [Reflective Prompt Evolution with GEPA](https://dspy.ai/current/tutorials/gepa_ai_program/index.md) - [Index](https://dspy.ai/current/tutorials/index.md) - [Decision-Making with Jev Types](https://dspy.ai/current/tutorials/jev_decisions/index.md) - [Generating llms.txt for Code Documentation with DSPy](https://dspy.ai/current/tutorials/llms_txt_generation/index.md) - [Tutorial: Use MCP tools in DSPy](https://dspy.ai/current/tutorials/mcp/index.md) - [Building Memory-Enabled Agents with DSPy ReAct and Mem0](https://dspy.ai/current/tutorials/mem0_react_agent/index.md) - [Tutorial: Debugging and Observability in DSPy](https://dspy.ai/current/tutorials/observability/index.md) - [Optimize AI Programs with DSPy](https://dspy.ai/current/tutorials/optimize_ai_program/index.md) - [Tracking DSPy Optimizers with MLflow](https://dspy.ai/current/tutorials/optimizer_tracking/index.md) - [Output Refinement: BestOfN and Refine](https://dspy.ai/current/tutorials/output_refinement/best-of-n-and-refine/index.md) - [Index](https://dspy.ai/current/tutorials/papillon/index.md) - [Real-World Examples](https://dspy.ai/current/tutorials/real_world_examples/index.md) - [Experimental RL Optimization for DSPy](https://dspy.ai/current/tutorials/rl_ai_program/index.md) - [Automated Code Generation from Documentation with DSPy](https://dspy.ai/current/tutorials/sample_code_generation/index.md) - [Tutorial: Saving and Loading your DSPy program](https://dspy.ai/current/tutorials/saving/index.md) - [Streaming](https://dspy.ai/current/tutorials/streaming/index.md) - [Financial Analysis with DSPy ReAct and Yahoo Finance News](https://dspy.ai/current/tutorials/yahoo_finance_react/index.md) ## Tutorials - Notebooks - [Tutorial: Agents](https://dspy.ai/current/tutorials/agents/index.md) - [Tutorial: Using Audio in DSPy Programs](https://dspy.ai/current/tutorials/audio/index.md) - [Tutorial: Classification Fine-tuning](https://dspy.ai/current/tutorials/classification_finetuning/index.md) - [Building AI Applications by Customizing DSPy Modules](https://dspy.ai/current/tutorials/custom_module/index.md) - [Build AI Agents with DSPy](https://dspy.ai/current/tutorials/customer_service_agent/index.md) - [Cohort Analysis with RLM + DataFrame](https://dspy.ai/current/tutorials/dataframe_rlm/cohort_analysis/cohort_analysis_demo/index.md) - [Tutorial: Entity Extraction](https://dspy.ai/current/tutorials/entity_extraction/index.md) - [Tutorial: Fine-tuning Agents](https://dspy.ai/current/tutorials/games/index.md) - [Tutorial: GEPA for AIME (Math)](https://dspy.ai/current/tutorials/gepa_aime/index.md) - [Tutorial: GEPA for Structured Information Extraction for Enterprise Tasks](https://dspy.ai/current/tutorials/gepa_facilitysupportanalyzer/index.md) - [Tutorial: GEPA for Privacy-Conscious Delegation](https://dspy.ai/current/tutorials/gepa_papillon/index.md) - [Tutorial: GEPA for Trusted Monitoring (AI Control + Classification)](https://dspy.ai/current/tutorials/gepa_trusted_monitor/index.md) - [Image Generation Prompt iteration](https://dspy.ai/current/tutorials/image_generation_prompting/index.md) - [Tutorial: Math Reasoning](https://dspy.ai/current/tutorials/math/index.md) - [Tutorial: Multi-Hop Retrieval](https://dspy.ai/current/tutorials/multihop_search/index.md) - [Tutorial: ProgramOfThought](https://dspy.ai/current/tutorials/program_of_thought/index.md) - [Tutorial: Retrieval-Augmented Generation (RAG)](https://dspy.ai/current/tutorials/rag/index.md) - [Tutorial: Online RL for Multi-Hop Research](https://dspy.ai/current/tutorials/rl_multihop/index.md) - [Tutorial: Online RL over a Multi-Module DSPy Program](https://dspy.ai/current/tutorials/rl_papillon/index.md) - [Tutorial: Advanced Tool Use](https://dspy.ai/current/tutorials/tool_use/index.md) ## Community - [Built with DSPy](https://dspy.ai/current/community/built-with-dspy/index.md) - [Resources](https://dspy.ai/current/community/community-resources/index.md) - [Contributing](https://dspy.ai/current/community/how-to-contribute/index.md) - [DSPy 3.4 LM migration](https://dspy.ai/current/community/normalized-lm-api-migration/index.md) - [DSPy in Production](https://dspy.ai/current/community/use-cases/index.md) ## FAQ - [FAQs](https://dspy.ai/current/faqs/index.md): Common questions on DSPy usage, comparisons, optimization, and debugging - [DSPy Cheatsheet](https://dspy.ai/current/cheatsheet/index.md): DSPy cheatsheet for quick reference ## API Reference - [dspy.Adapter](https://dspy.ai/current/api/adapters/Adapter/index.md) - [dspy.ChatAdapter](https://dspy.ai/current/api/adapters/ChatAdapter/index.md) - [dspy.JSONAdapter](https://dspy.ai/current/api/adapters/JSONAdapter/index.md) - [dspy.TwoStepAdapter](https://dspy.ai/current/api/adapters/TwoStepAdapter/index.md) - [dspy.XMLAdapter](https://dspy.ai/current/api/adapters/XMLAdapter/index.md) - [Adapters](https://dspy.ai/current/api/adapters/index.md) - [dspy.evaluate.CompleteAndGrounded](https://dspy.ai/current/api/evaluation/CompleteAndGrounded/index.md) - [dspy.Evaluate](https://dspy.ai/current/api/evaluation/Evaluate/index.md) - [dspy.evaluate.EvaluationResult](https://dspy.ai/current/api/evaluation/EvaluationResult/index.md) - [dspy.evaluate.SemanticF1](https://dspy.ai/current/api/evaluation/SemanticF1/index.md) - [dspy.evaluate.answer_exact_match](https://dspy.ai/current/api/evaluation/answer_exact_match/index.md) - [dspy.evaluate.answer_passage_match](https://dspy.ai/current/api/evaluation/answer_passage_match/index.md) - [Evaluation](https://dspy.ai/current/api/evaluation/index.md) - [dspy.experimental.Citations](https://dspy.ai/current/api/experimental/Citations/index.md) - [Decision types and System One models](https://dspy.ai/current/api/experimental/DecisionTypes/index.md) - [dspy.experimental.Document](https://dspy.ai/current/api/experimental/Document/index.md) - [dspy.experimental.ReAnchor](https://dspy.ai/current/api/experimental/ReAnchor/index.md) - [Experimental](https://dspy.ai/current/api/experimental/index.md) - [API Reference](https://dspy.ai/current/api/index.md) - [dspy.BaseLM](https://dspy.ai/current/api/models/BaseLM/index.md) - [dspy.Embedder](https://dspy.ai/current/api/models/Embedder/index.md) - [dspy.LM](https://dspy.ai/current/api/models/LM/index.md) - [Models](https://dspy.ai/current/api/models/index.md) - [dspy.BestOfN](https://dspy.ai/current/api/modules/BestOfN/index.md) - [dspy.ChainOfThought](https://dspy.ai/current/api/modules/ChainOfThought/index.md) - [dspy.CodeAct](https://dspy.ai/current/api/modules/CodeAct/index.md) - [dspy.Flex](https://dspy.ai/current/api/modules/Flex/index.md) - [dspy.Module](https://dspy.ai/current/api/modules/Module/index.md) - [dspy.MultiChainComparison](https://dspy.ai/current/api/modules/MultiChainComparison/index.md) - [dspy.Parallel](https://dspy.ai/current/api/modules/Parallel/index.md) - [dspy.Predict](https://dspy.ai/current/api/modules/Predict/index.md) - [dspy.ProgramOfThought](https://dspy.ai/current/api/modules/ProgramOfThought/index.md) - [dspy.RLM](https://dspy.ai/current/api/modules/RLM/index.md) - [dspy.ReAct](https://dspy.ai/current/api/modules/ReAct/index.md) - [dspy.ReActV2](https://dspy.ai/current/api/modules/ReActV2/index.md) - [dspy.Refine](https://dspy.ai/current/api/modules/Refine/index.md) - [Modules](https://dspy.ai/current/api/modules/index.md) - [dspy.BetterTogether](https://dspy.ai/current/api/optimizers/BetterTogether/index.md) - [dspy.BootstrapFewShot](https://dspy.ai/current/api/optimizers/BootstrapFewShot/index.md) - [dspy.BootstrapFewShotWithRandomSearch](https://dspy.ai/current/api/optimizers/BootstrapFewShotWithRandomSearch/index.md) - [dspy.BootstrapFinetune](https://dspy.ai/current/api/optimizers/BootstrapFinetune/index.md) - [dspy.BootstrapRS](https://dspy.ai/current/api/optimizers/BootstrapRS/index.md) - [dspy.COPRO](https://dspy.ai/current/api/optimizers/COPRO/index.md) - [dspy.Ensemble](https://dspy.ai/current/api/optimizers/Ensemble/index.md) - [dspy.GEPA - Advanced Features](https://dspy.ai/current/api/optimizers/GEPA/GEPA_Advanced/index.md) - [dspy.GEPA: Reflective Prompt Optimizer](https://dspy.ai/current/api/optimizers/GEPA/overview/index.md) - [dspy.InferRules](https://dspy.ai/current/api/optimizers/InferRules/index.md) - [dspy.KNN](https://dspy.ai/current/api/optimizers/KNN/index.md) - [dspy.KNNFewShot](https://dspy.ai/current/api/optimizers/KNNFewShot/index.md) - [dspy.LabeledFewShot](https://dspy.ai/current/api/optimizers/LabeledFewShot/index.md) - [dspy.MIPROv2](https://dspy.ai/current/api/optimizers/MIPROv2/index.md) - [dspy.SIMBA](https://dspy.ai/current/api/optimizers/SIMBA/index.md) - [Optimizers](https://dspy.ai/current/api/optimizers/index.md) - [dspy.Audio](https://dspy.ai/current/api/primitives/Audio/index.md) - [dspy.Code](https://dspy.ai/current/api/primitives/Code/index.md) - [dspy.Example](https://dspy.ai/current/api/primitives/Example/index.md) - [dspy.History](https://dspy.ai/current/api/primitives/History/index.md) - [dspy.Image](https://dspy.ai/current/api/primitives/Image/index.md) - [dspy.Prediction](https://dspy.ai/current/api/primitives/Prediction/index.md) - [dspy.Tool](https://dspy.ai/current/api/primitives/Tool/index.md) - [dspy.ToolCalls](https://dspy.ai/current/api/primitives/ToolCalls/index.md) - [Primitives](https://dspy.ai/current/api/primitives/index.md) - [dspy.InputField](https://dspy.ai/current/api/signatures/InputField/index.md) - [dspy.OutputField](https://dspy.ai/current/api/signatures/OutputField/index.md) - [dspy.Signature](https://dspy.ai/current/api/signatures/Signature/index.md) - [Signatures](https://dspy.ai/current/api/signatures/index.md) - [dspy.ColBERTv2](https://dspy.ai/current/api/tools/ColBERTv2/index.md) - [dspy.retrievers.Embeddings](https://dspy.ai/current/api/tools/Embeddings/index.md) - [dspy.LocalInterpreter](https://dspy.ai/current/api/tools/LocalInterpreter/index.md) - [dspy.PythonInterpreter](https://dspy.ai/current/api/tools/PythonInterpreter/index.md) - [Tools](https://dspy.ai/current/api/tools/index.md) - [dspy errors](https://dspy.ai/current/api/utils/Errors/index.md) - [dspy.streaming.StatusMessage](https://dspy.ai/current/api/utils/StatusMessage/index.md) - [dspy.streaming.StatusMessageProvider](https://dspy.ai/current/api/utils/StatusMessageProvider/index.md) - [dspy.streaming.StreamListener](https://dspy.ai/current/api/utils/StreamListener/index.md) - [dspy.asyncify](https://dspy.ai/current/api/utils/asyncify/index.md) - [dspy.configure](https://dspy.ai/current/api/utils/configure/index.md) - [dspy.configure_cache](https://dspy.ai/current/api/utils/configure_cache/index.md) - [dspy.context](https://dspy.ai/current/api/utils/context/index.md) - [dspy.disable_litellm_logging](https://dspy.ai/current/api/utils/disable_litellm_logging/index.md) - [dspy.disable_logging](https://dspy.ai/current/api/utils/disable_logging/index.md) - [dspy.enable_litellm_logging](https://dspy.ai/current/api/utils/enable_litellm_logging/index.md) - [dspy.enable_logging](https://dspy.ai/current/api/utils/enable_logging/index.md) - [Utils](https://dspy.ai/current/api/utils/index.md) - [dspy.inspect_history](https://dspy.ai/current/api/utils/inspect_history/index.md) - [dspy.load](https://dspy.ai/current/api/utils/load/index.md) - [dspy.streamify](https://dspy.ai/current/api/utils/streamify/index.md)