# Ask Df Llm

**Module:** `sovai.extensions.ask_df_llm`

## Functions

### `sample_unique_values()`

```python
def sample_unique_values(df, max_samples = 5)
```

***

### `format_sample_data()`

```python
def format_sample_data(sample_data)
```

***

### `find_best_match()`

```python
def find_best_match(
    query: str,
    choices: List[str],
    threshold: int = 80,
) -> Union[str, None]
```

**Returns:** `Union[str, None]`

***

### `parse_value()`

```python
def parse_value(value: str) -> Union[float, int]
```

**Returns:** `Union[float, int]`

***

### `create_standard_query()`

```python
def create_standard_query(condition: str, df: pd.DataFrame) -> Tuple[str, str]
```

**Returns:** `Tuple[str, str]`

***

### `is_simple_condition()`

```python
def is_simple_condition(condition: str) -> bool
```

**Returns:** `bool`

***

### `split_conditions()`

```python
def split_conditions(condition: str) -> List[str]
```

**Returns:** `List[str]`

***


---

# 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.sov.ai/api-reference/extensions/ask-df-llm.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.
