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

# similarity_search_with_score

Returns documents most similar to the query along with relevance scores.

```python theme={null}
similarity_search_with_score(
    query: str,
    k: int = 4,
    filter: Optional[Dict[str, Any]] = None,
    **kwargs
) -> List[Tuple[Document, float]]
```

### Parameters

| Parameter  | Type                       | Description                                     |
| ---------- | -------------------------- | ----------------------------------------------- |
| `query`    | `str`                      | Query text to search for                        |
| `k`        | `int`                      | Number of documents to return (default: 4)      |
| `filter`   | `Optional[Dict[str, Any]]` | *(Optional)* Metadata filters to apply          |
| `**kwargs` | `Any`                      | Additional keyword arguments (currently unused) |

### Returns

`List[Tuple[Document, float]]`: List of (Document, score) tuples where score is normalized \[0, 1]

### Example Usage

```python theme={null}
# Search with scores
results = store.similarity_search_with_score("neural networks", k=3)

for doc, score in results:
    print(f"Score: {score:.4f}")
    print(f"Content: {doc.page_content[:100]}...")
    print(f"Metadata: {doc.metadata}")
    print("---")

# Filter results by score threshold
threshold = 0.7
high_score_results = [
    (doc, score) for doc, score in results if score >= threshold
]
```
