# sorted_values

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/example_selectors/semantic_similarity/sorted_values)

Return a list of values in dict sorted by key.

## Signature

```python
sorted_values(
    values: dict[str, str],
) -> list[Any]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `values` | `dict[str, str]` | Yes | A dictionary with keys as input variables and values as their values. |

## Returns

`list[Any]`

A list of values in dict sorted by key.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/f0c5a28fa05adcda89aebcb449d897245ab21fa4/libs/core/langchain_core/example_selectors/semantic_similarity.py#L18)