> For the complete documentation index, see [llms.txt](https://cover-docs.diffblue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cover-docs.diffblue.com/features/cover-annotations/llm-input-annotations-beta.md).

# LLM Input Annotations (Beta)

## Using `@InTestsUseLLM`

The `@InTestsUseLLM` annotation allows you to request inputs from a configured LLM connection in order to provide more creative inputs for tests of a particular method under test. More creative values can often provide cosmetically better tests, but can sometimes lead to improved test strength through better assertions, and potentially improved coverage. See [LLM Configuration (Beta)](/features/cover-cli/environment-configuration/llm-configuration.md) to configure the LLM connection & credentials.

The annotation can be located on a method, class or package to identify the scope of methods under test where LLMs should be consulted. For example the following method validates credit card numbers and is annotated such that the LLM can provide some realistic and valid credit card numbers:

```java
/**
 * Validates a credit card number using the Luhn algorithm.
 * <p>
 * This method sanitizes the input by removing spaces and hyphens, 
 * then checks if the number passes the Luhn checksum.
 * It does not check card type or length.
 *
 * @param cardNumber the credit card number as a String; spaces and hyphens are allowed
 * @return true if the card number is valid according to the Luhn algorithm, false otherwise
 */
@InTestsUseLLM
public static boolean isValidCreditCardNumber(String cardNumber) {
    // ...
}
```
