> For the complete documentation index, see [llms.txt](https://docs.raga.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raga.ai/ragaai-catalyst/ragaai-metric-library/code-generation.md).

# Code Generation

Evaluate LLMs on generating executable code. Spot syntax or logic errors and improve development workflows.

{% hint style="info" %}
Exclusive to enterprise customers. [Contact us](https://calendly.com/nirmalya-raga/30min?month=2025-09\\) to activate this feature.
{% endhint %}

The **Code Generation Metrics** suite in RagaAI Catalyst evaluates the accuracy, robustness, and functionality of code generated by LLMs. These metrics assess aspects like structural correctness, similarity to reference code, adaptability to prompt changes, and success in passing functional tests. By measuring code-specific factors such as n-gram overlap, logical consistency, and robustness across prompt variations, these metrics provide comprehensive insights into the reliability and precision of code generation models.

{% content-ref url="/pages/5QVqq2ooIT4wbbLMQT4z" %}
[Functional Correctness](/ragaai-catalyst/ragaai-metric-library/code-generation/functional-correctness.md)
{% endcontent-ref %}

{% content-ref url="/pages/jxdrFZFz4ZhDGzk98oUk" %}
[ChrF](/ragaai-catalyst/ragaai-metric-library/code-generation/chrf.md)
{% endcontent-ref %}

{% content-ref url="/pages/9XTTdIgmS5gM8VyDN9Lp" %}
[Ruby](/ragaai-catalyst/ragaai-metric-library/code-generation/ruby.md)
{% endcontent-ref %}

{% content-ref url="/pages/PwAH3gID7CBggD3xUQDZ" %}
[CodeBLEU](/ragaai-catalyst/ragaai-metric-library/code-generation/codebleu.md)
{% endcontent-ref %}

{% content-ref url="/pages/KPSsZM8TVveiqz4xymN9" %}
[Robust Pass@k](/ragaai-catalyst/ragaai-metric-library/code-generation/robust-pass-k.md)
{% endcontent-ref %}

{% content-ref url="/pages/9YZXAqdMpM5RtOSCHtak" %}
[Robust Drop@k](/ragaai-catalyst/ragaai-metric-library/code-generation/robust-drop-k.md)
{% endcontent-ref %}

{% content-ref url="/pages/l2fxWtgnzgV61ydkMXaU" %}
[Pass-Ratio@n](/ragaai-catalyst/ragaai-metric-library/code-generation/pass-ratio-n.md)
{% endcontent-ref %}
