# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
