> 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

{% 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.raga.ai/ragaai-catalyst/ragaai-metric-library/code-generation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
