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

# AL0066 - GenAI operation name should follow conventions

> Use 'chat', 'text_completion', or 'embeddings' as operation names

Source: [Al0066InvalidGenAiOperationNameAnalyzer.cs](https://github.com/ANcpLua/ANcpLua.Analyzers/blob/main/src/ANcpLua.Analyzers/Analyzers/Al0066InvalidGenAiOperationNameAnalyzer.cs)

## Description

GenAI operation names should follow the semantic conventions: `chat`, `text_completion`, or `embeddings`.

## Bad Code

```csharp theme={null}
activity?.SetTag("gen_ai.operation.name", "generate");
```

## Good Code

```csharp theme={null}
activity?.SetTag("gen_ai.operation.name", "chat");
```

## Properties

* **Category**: GenAI
* **Severity**: Warning
* **Enabled by default**: True
* **Code fix available**: False

## Configuration

```editorconfig theme={null}
dotnet_diagnostic.AL0066.severity = warning
```
