> ## Documentation Index
> Fetch the complete documentation index at: https://futureagi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt Optimization Overview

> An introduction to prompt optimization with the `agent-opt` Python library. Learn why it's essential and explore advanced algorithms for refining AI responses.

**Agent Optimization** provides a structured, iterative approach to refining AI-generated outputs by systematically improving prompts. With the `agent-opt` Python library, you can programmatically enhance your prompts by adjusting their structure based on evaluation-driven feedback.

This library empowers you to move beyond manual trial-and-error, offering advanced algorithms to achieve higher-quality, more consistent, and more efficient LLM responses.

## Why Use the `agent-opt` Library for Optimization?

The `agent-opt` library provides access to state-of-the-art optimization algorithms that go beyond simple prompt variations:

* **Advanced Algorithms**: Access to 6+ distinct optimization strategies (Bayesian Search, Meta-Prompt, ProTeGi, GEPA, Random Search, PromptWizard).
* **Few-Shot Learning**: Automatically select and format optimal examples for few-shot tasks.
* **Iterative Refinement**: Systematic improvement through multiple rounds of evaluation and prompt modification.
* **Reproducibility**: Programmatic control allows for versioning and tracking of optimization experiments.
* **Cost Efficiency**: Smart evaluation strategies and targeted search methods help minimize API calls.

This section covers:

* **Why optimization is essential** for improving response clarity, consistency, and efficiency.
* **How optimization differs from experimentation** and when to use each approach.
* **Step-by-step guidance** on running optimizations using the Python SDK.
* **Deep dives into each optimizer** to help you choose the right strategy.

<CardGroup cols={2}>
  <Card title="Prompt Optimization Fundamentals" icon="lightbulb" href="/future-agi/get-started/optimization/optimizers/overview">
    Learn about optimization fundamentals and explore different optimization algorithms.
  </Card>

  <Card title="Using the Python SDK" icon="code" href="/future-agi/get-started/optimization/how-to/using-python-sdk">
    Programmatic optimization with advanced algorithms.
  </Card>
</CardGroup>
