# value_sanitize

> **Function** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/graphs/neo4j_graph/value_sanitize)

Sanitize the input dictionary or list.

Sanitizes the input by removing embedding-like values,
lists with more than 128 elements, that are mostly irrelevant for
generating answers in a LLM context. These properties, if left in
results, can occupy significant context space and detract from
the LLM's performance by introducing unnecessary noise and cost.

## Signature

```python
value_sanitize(
    d: Any,
) -> Any
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `d` | `Any` | Yes | The input dictionary or list to sanitize. |

## Returns

`Any`

The sanitized dictionary or list.

## ⚠️ Deprecated

Deprecated since version 0.3.8.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/graphs/neo4j_graph.py#L74)